initscripts/etc/rc.d/init.d/netfs

34 lines
697 B
Bash
Executable File

#!/bin/sh
# mountfs - File System Mount Script
# Based on mountfs script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans <gerard@linuxfromscratch.org>
# Modified by Davide Madrisan <davide.madrisan@gmail.com>
. /etc/sysconfig/rc
. $rc_functions
case "$1" in
start)
NET_FS="nfs,smbfs,cifs"
echo -n "Mounting network file systems: "
mount -a -t $NET_FS
evaluate_retval
echo
;;
stop)
echo -n "Unmounting currently mounted network file systems: "
NET_FS="nfs,smbfs,cifs"
sync
umount -a -f -r -t $NET_FS >/dev/null 2>&1
evaluate_retval
echo
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac