[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 47295e3 04/10: Reduce gratuitous differences
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 47295e3 04/10: Reduce gratuitous differences between scripts |
Date: |
Thu, 28 May 2020 20:34:09 -0400 (EDT) |
branch: master
commit 47295e3856381008087b092cafe471550fc6df61
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Reduce gratuitous differences between scripts
Copied some lines from 'install_redhat.sh' that other scripts lacked.
---
install_centos.sh | 2 ++
lmi_setup_00.sh | 19 +++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/install_centos.sh b/install_centos.sh
index 9812762..cda2863 100755
--- a/install_centos.sh
+++ b/install_centos.sh
@@ -147,3 +147,5 @@ echo "Finished: $stamp1"
seconds=$(($(date -u '+%s' -d "$stamp1") - $(date -u '+%s' -d "$stamp0")))
elapsed=$(date -u -d @"$seconds" +'%H:%M:%S')
echo "Elapsed: $elapsed"
+
+echo Finished creating debian chroot. >/dev/tty
diff --git a/lmi_setup_00.sh b/lmi_setup_00.sh
index 7065c80..39dd8ce 100755
--- a/lmi_setup_00.sh
+++ b/lmi_setup_00.sh
@@ -84,6 +84,16 @@ assert_not_chrooted
./lmi_setup_10.sh
./lmi_setup_11.sh
+
+# BEGIN ./lmi_setup_13.sh
+# For caveats, see:
+# https://lists.nongnu.org/archive/html/lmi/2020-05/msg00040.html
+mkdir -p /srv/cache_for_lmi
+du -sb /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi || echo "Okay."
+mkdir -p /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
+mount --bind /srv/cache_for_lmi /srv/chroot/"${CHRTNAME}"/srv/cache_for_lmi
+# END ./lmi_setup_13.sh
+
cp -a lmi_setup_*.sh /tmp/schroot_env /srv/chroot/${CHRTNAME}/tmp
schroot --chroot=${CHRTNAME} --user=root --directory=/tmp
./lmi_setup_20.sh
schroot --chroot=${CHRTNAME} --user=root --directory=/tmp
./lmi_setup_21.sh
@@ -98,9 +108,18 @@ schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}"
--directory=/tmp ./lmi_setu
schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp
./lmi_setup_42.sh
schroot --chroot=${CHRTNAME} --user="${NORMAL_USER}" --directory=/tmp
./lmi_setup_43.sh
+# Copy log files that may be useful for tracking down problems with
+# certain commands whose output is voluminous and often uninteresting.
+# Embed a timestamp in the copies' names (no colons, for portability).
+fstamp=$(date -u +"%Y%m%dT%H%MZ" -d "$stamp0")
+cp -a /srv/chroot/${CHRTNAME}/home/"${NORMAL_USER}"/log
/home/"${NORMAL_USER}"/lmi_rhlog_"${fstamp}"
+cp -a /srv/chroot/${CHRTNAME}/tmp/${CHRTNAME}-apt-get-log
/home/"${NORMAL_USER}"/apt-get-log-"${fstamp}"
+
stamp1=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "Finished: $stamp1"
seconds=$(($(date -u '+%s' -d "$stamp1") - $(date -u '+%s' -d "$stamp0")))
elapsed=$(date -u -d @"$seconds" +'%H:%M:%S')
echo "Elapsed: $elapsed"
+
+echo Finished creating debian chroot. >/dev/tty
- [lmi-commits] [lmi] master updated (9ed6f1d -> 565e243), Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master bfd0cf7 01/10: Use --bind when --rbind is unnecessary, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master 47295e3 04/10: Reduce gratuitous differences between scripts,
Greg Chicares <=
- [lmi-commits] [lmi] master 6d1ca69 05/10: Rename a script, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master 2566530 02/10: Improve documentation, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master 565e243 10/10: Write log files elsewhere, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master 5a6c188 07/10: Extract blocks into sub-scripts #01, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master a13e9f6 08/10: Extract block into sub-script #00 centos, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master b290253 09/10: Expunge a redundant line, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master 5b452d6 03/10: Rearrange some independent script blocks, Greg Chicares, 2020/05/28
- [lmi-commits] [lmi] master 7482438 06/10: Always wget all lmi_setup_*, Greg Chicares, 2020/05/28