generic-poky/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
Andreas Oberritter e894f0e71c initscripts: mount and unmount cifs network filesystems
* Added cifs to mountnfs.sh and umountnfs.sh.

(From OE-Core rev: c44e51f281101c8933679f679e3d4a75a41bedf7)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 23:25:53 +00:00

34 lines
711 B
Bash
Executable file

#!/bin/sh
### BEGIN INIT INFO
# Provides: umountnfs
# Required-Start:
# Required-Stop: umountfs
# Should-Stop: $network $portmap
# Default-Start:
# Default-Stop: 0 6
# Short-Description: Unmount all network filesystems
### END INIT INFO
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Write a reboot record to /var/log/wtmp before unmounting
halt -w
echo "Unmounting remote filesystems..."
test -f /etc/fstab && (
#
# Read through fstab line by line and unount network file systems
#
while read device mountpt fstype options
do
if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs || test "$fstype" = cifs
then
umount -f $mountpt
fi
done
) < /etc/fstab
: exit 0