[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b8175f5 4/5: Allow 'schroot --location' to fa
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b8175f5 4/5: Allow 'schroot --location' to fail |
Date: |
Wed, 19 Aug 2020 10:33:29 -0400 (EDT) |
branch: master
commit b8175f5065cb22728f41da1786549db2ff15a345
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Allow 'schroot --location' to fail
Without this change, the script stops (due to 'set -e') if
$CHRTNAME is not found.
---
lmi_setup_02.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lmi_setup_02.sh b/lmi_setup_02.sh
index 3b58ee6..4515d5b 100755
--- a/lmi_setup_02.sh
+++ b/lmi_setup_02.sh
@@ -82,7 +82,7 @@ findmnt | grep "${CHRTNAME}" && exit 9
# (e.g., if the chroot's '.conf' file is missing).
loc0=/srv/chroot/"${CHRTNAME}"
-loc1="$(schroot --chroot="${CHRTNAME}" --location)"
+loc1="$(schroot --chroot="${CHRTNAME}" --location)" || true
if [ -n "${loc1}" ] && [ "${loc0}" != "${loc1}" ]; then
echo "chroot found in unexpected location--remove it manually"
exit 9