From e04d6599f19532c996f541835d5f8f0aa87b2e3a Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 26 Apr 2011 00:28:14 +0200 Subject: fixup: umount tmpfs on shutdown As suggested by seblu: - add comment to explain what we unmount and why, and - use /bin/grep rather than grep Also add some more redirects to /dev/null. Signed-off-by: Tom Gundersen --- rc.shutdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rc.shutdown') diff --git a/rc.shutdown b/rc.shutdown index f847ddf..ec5fb9b 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -54,9 +54,10 @@ if [[ $USELVM =~ yes|YES && -x /sbin/lvm && -d /sys/block ]]; then fi stat_busy "Unmounting Filesystems" -if grep -q devtmpfs /proc/filesystems 2>/dev/null; then +if /bin/grep -q devtmpfs /proc/filesystems &>/dev/null; then /bin/umount -a -r -t nosysfs,noproc,nodevtmpfs,nodevpts -O no_netdev else + # if we don't have devtmpfs support, /dev is mounted as tmpfs, so don't unmount it /bin/umount -a -r -t notmpfs,nosysfs,noproc,nodevpts -O no_netdev fi stat_done -- cgit v1.2.3