/etc/init.d/umountfs (initscripts) in Dapper

Steven Shiau steven at nchc.org.tw
Thu May 25 03:56:42 UTC 2006


Hi,
The /etc/init.d/umountfs in Dapper:
---------------------
...
DIRS=""
while read DEV DIR TYPE REST ; do
case "$DIR" in
/|/proc|/dev|/dev/pts|/proc/*|/sys)
continue # Ignoring virtual file systems needed later
;;
esac

case $TYPE in
proc|procfs|linprocfs|devfs|sysfs|usbfs|usbdevfs|devpts)
continue # Ignoring non-tmpfs virtual file systems
;;
esac
DIRS="$DIRS $DIR"
done
umount -r -d $DIRS
---------------------
Actually in some situation, especially in a diskless environment, the
DIRS will be nothing.
Is that possible to change
umount -r -d $DIRS
to
[ -n "$DIRS" ] && umount -r -d $DIRS
Otherwise, it will show umount usage message when rebooting.

Steven.




More information about the ubuntu-users mailing list