From e2ee36ac9ef274d40b99967320bd3169c36479f0 Mon Sep 17 00:00:00 2001 From: Marco Lima Date: Thu, 30 Jul 2009 13:49:44 -0700 Subject: Add _netdev support to netfs (also add glusterfs support) The system-wide mount will no longer mount items in fstab marked as _netdev (requires a network device). These _netdev items are handled by the netfs daemon now. Additionally, add support for glusterfs :) Signed-off-by: Aaron Griffin --- netfs | 14 +++++++++++--- rc.shutdown | 2 +- rc.sysinit | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/netfs b/netfs index 25db4e1..60516e7 100755 --- a/netfs +++ b/netfs @@ -4,11 +4,16 @@ . /etc/rc.conf . /etc/rc.d/functions +rc=0 + case "$1" in start) stat_busy "Mounting Network Filesystems" - /bin/mount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,fuse,fuseblk - if [ $? -gt 0 ]; then + /bin/mount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,glusterfs,fuse,fuseblk,fuse.glusterfs + rc=$? + /bin/mount -a -O _netdev + rc=$(($rc+$?)) + if [ $rc -gt 0 ]; then stat_fail else add_daemon netfs @@ -17,7 +22,10 @@ case "$1" in ;; stop) stat_busy "Unmounting Network Filesystems" - umount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,fuse,fuseblk + /bin/umount -a -O _netdev + rc=$? + /bin/umount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,glusterfs,fuse,fuseblk,fuse.glusterfs + rc=$(($rc+$?)) if [ $? -gt 0 ]; then stat_fail else diff --git a/rc.shutdown b/rc.shutdown index 1e1c6bf..ef13dec 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -99,7 +99,7 @@ stat_busy "Deactivating Swap" stat_done stat_busy "Unmounting Filesystems" -/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc +/bin/umount -a -r -t noramfs,notmpfs,nosysfs,noproc -O no_netdev stat_done # Kill non-root encrypted partition mappings diff --git a/rc.sysinit b/rc.sysinit index 298f446..160f70e 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -233,7 +233,7 @@ status "Mounting Root Read-only" /bin/mount -n -o remount,ro / FORCEFSCK= [ -f /forcefsck ] && FORCEFSCK="-- -f" -NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk" +NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs" fsck_reboot() { echo "Automatic reboot in progress..." @@ -291,7 +291,7 @@ if [ -e /proc/mounts ]; then /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab fi # now mount all the local filesystems -/bin/mount -a -t $NETFS +/bin/mount -a -t $NETFS -O no_netdev stat_done status "Activating Swap" /sbin/swapon -a -- cgit v1.2.3