summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_sysfs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-11-11 21:33:43 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:29 +0100
commit2a9079644708eedd190b82675a76372f9c8abd7e (patch)
treed222e17f8924c7660e9d598e9ea52fe88e409765 /helpers/lh_chroot_sysfs
parent7059380cd8e60e81c1c4c462471a291035c56ec2 (diff)
downloadvyos-live-build-2a9079644708eedd190b82675a76372f9c8abd7e.tar.gz
vyos-live-build-2a9079644708eedd190b82675a76372f9c8abd7e.zip
Making umount calls check if they are actually necessary.
Diffstat (limited to 'helpers/lh_chroot_sysfs')
-rwxr-xr-xhelpers/lh_chroot_sysfs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helpers/lh_chroot_sysfs b/helpers/lh_chroot_sysfs
index fef710dd9..b7931ae04 100755
--- a/helpers/lh_chroot_sysfs
+++ b/helpers/lh_chroot_sysfs
@@ -79,7 +79,10 @@ case "${1}" in
then
# Unmounting /sys
#fuser -km chroot/sys
- ${LH_ROOT_COMMAND} umount chroot/sys > /dev/null 2>&1
+ if [ -e chroot/sys/kernel ]
+ then
+ ${LH_ROOT_COMMAND} umount chroot/sys
+ fi
else
rm -rf chroot/sys
mkdir -p chroot/sys