From 023e5b9ce20d9dbe1c83c2b3fb0aa6e191556cf7 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Tue, 1 Mar 2011 11:04:26 +0100 Subject: [PATCH] [scripts] improve reliability of remaster_error_script.sh --- scripts/remaster_error_script.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/remaster_error_script.sh b/scripts/remaster_error_script.sh index 8626be9..321aa33 100755 --- a/scripts/remaster_error_script.sh +++ b/scripts/remaster_error_script.sh @@ -1,7 +1,11 @@ #!/bin/sh -if [ -d "${CHROOT_DIR}" ]; then +if [ -d "${CHROOT_DIR}/proc" ]; then + echo "Unmounting ${CHROOT_DIR}/proc" umount "${CHROOT_DIR}/proc" fi -echo "Umounting bind to ${CHROOT_PKGS_DIR}" -umount "${CHROOT_PKGS_DIR}" || exit 1 +CHROOT_PKGS_DIR="${CHROOT_DIR}/var/lib/entropy/client/packages" +if [ -d "${CHROOT_PKGS_DIR}" ]; then + echo "Umounting bind to ${CHROOT_PKGS_DIR}" + umount "${CHROOT_PKGS_DIR}" || exit 1 +fi