diff options
author | Tom Gundersen <teg@jklm.no> | 2011-04-26 00:28:14 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2011-04-26 00:47:48 +0200 |
commit | e04d6599f19532c996f541835d5f8f0aa87b2e3a (patch) | |
tree | eb51ee34fe3ee6e9a978cd6a48ce0babbb36ae22 /rc.shutdown | |
parent | cd0ec05a9682ccaaf8d288ab4685edf1c311ec8f (diff) | |
download | initscripts-e04d6599f19532c996f541835d5f8f0aa87b2e3a.tar.xz |
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 <teg@jklm.no>
Diffstat (limited to 'rc.shutdown')
-rwxr-xr-x | rc.shutdown | 3 |
1 files changed, 2 insertions, 1 deletions
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 |