[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 646e523 1/6: Define a variable immediately be
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 646e523 1/6: Define a variable immediately before use |
Date: |
Thu, 5 Mar 2020 11:31:46 -0500 (EST) |
branch: master
commit 646e52345534db33d0e248a024cd1fe3e7cf6c0f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Define a variable immediately before use
---
install_redhat.sh | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/install_redhat.sh b/install_redhat.sh
index 5a50909..d2e6f7c 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -28,9 +28,6 @@ set -evx
stamp0=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "Started: $stamp0"
-# Timestamp usable as a component of a portable filename.
-fstamp=$(date -u +"%Y%m%dT%H%MZ" -d "$stamp0")
-
assert_su
assert_not_chrooted
@@ -165,6 +162,8 @@ schroot --chroot=${CHRTNAME} --preserve-environment
--user="${NORMAL_USER}" --di
# 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}"
- [lmi-commits] [lmi] master updated (e1520a8 -> 2cdab78), Greg Chicares, 2020/03/05
- [lmi-commits] [lmi] master 92ee4b5 2/6: Regularize layout (and certain options), Greg Chicares, 2020/03/05
- [lmi-commits] [lmi] master 83b0221 4/6: Change permissions more preemptively, Greg Chicares, 2020/03/05
- [lmi-commits] [lmi] master 0367668 5/6: Say when umask is overridden, Greg Chicares, 2020/03/05
- [lmi-commits] [lmi] master b4d014c 3/6: Download 'lmi_setup_inc.sh' before sourcing it, Greg Chicares, 2020/03/05
- [lmi-commits] [lmi] master 646e523 1/6: Define a variable immediately before use,
Greg Chicares <=
- [lmi-commits] [lmi] master 2cdab78 6/6: Pass variables in a temporary file, avoiding preserve-env flags, Greg Chicares, 2020/03/05