From c202dbe67d57af630c2bf7dc5b521d1f6bae8c5f Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 31 Jan 2011 13:44:24 +0100 Subject: [PATCH] Resolve unneeded subshell --- defaults/linuxrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index bbe397e..ee33a35 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -724,8 +724,13 @@ fi cd "${CHROOT}" mkdir "${CHROOT}/proc" "${CHROOT}/sys" 2>/dev/null echo -ne "${BOLD}.${NORMAL}" + # If devtmpfs is mounted assume genkernel mounted it at /dev and try unmounting it -grep -qs devtmpfs /proc/mounts && ( umount /dev || echo '*: Failed to unmount the devtmpfs /dev!' ) +if grep -qs devtmpfs /proc/mounts +then + umount /dev || echo '*: Failed to unmount the devtmpfs /dev!' +fi + umount /sys || echo '*: Failed to unmount the ramdisk /sys!' umount /proc || echo '*: Failed to unmount the ramdisk /proc!' echo -e "${BOLD}.${NORMAL}" -- 2.26.2