aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-03-17 00:38:41 +0000
committerBill Nottingham <notting@redhat.com>2004-03-17 00:38:41 +0000
commitb59731cdf4ad4e1e46b3ad728cf94396f559ce89 (patch)
treef5b39e3615071191eb7238ac9ff52e483f4f7755
parent373d85d010a4387198caec566c3681b90ff02f6f (diff)
downloadinitscripts-b59731cdf4ad4e1e46b3ad728cf94396f559ce89.tar
initscripts-b59731cdf4ad4e1e46b3ad728cf94396f559ce89.tar.gz
initscripts-b59731cdf4ad4e1e46b3ad728cf94396f559ce89.tar.bz2
initscripts-b59731cdf4ad4e1e46b3ad728cf94396f559ce89.tar.xz
initscripts-b59731cdf4ad4e1e46b3ad728cf94396f559ce89.zip
handle CIFS (#115691)
-rwxr-xr-xrc.d/init.d/netfs16
1 files changed, 14 insertions, 2 deletions
diff --git a/rc.d/init.d/netfs b/rc.d/init.d/netfs
index 85bf6ada..a5469a5d 100755
--- a/rc.d/init.d/netfs
+++ b/rc.d/init.d/netfs
@@ -7,7 +7,7 @@
#
# chkconfig: 345 25 75
# description: Mounts and unmounts all Network File System (NFS), \
-# SMB (Lan Manager/Windows), and NCP (NetWare) mount points.
+# SMB/CIFS (Lan Manager/Windows), and NCP (NetWare) mount points.
### BEGIN INIT INFO
# Provides: $local_fs $remote_fs
### END INIT INFO
@@ -21,10 +21,12 @@
NFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $4 !~ /noauto/ { print $2 }' /etc/fstab`
SMBFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
+CIFSFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
NCPFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
NETDEVMTAB=`LC_ALL=C awk '!/^#/ && $4 ~ /_netdev/ && $2 != "/" { print $2 }' /proc/mounts`
NFSMTAB=`LC_ALL=C awk '!/^#/ && $3 ~ /^nfs/ && $2 != "/" { print $2 }' /proc/mounts`
SMBMTAB=`LC_ALL=C awk '!/^#/ && $3 == "smbfs" { print $2 }' /proc/mounts`
+CIFSMTAB=`LC_ALL=C awk '!/^#/ && $3 == "cifs" { print $2 }' /proc/mounts`
NCPMTAB=`LC_ALL=C awk '!/^#/ && $3 == "ncpfs" { print $2 }' /proc/mounts`
# See how we were called.
@@ -36,9 +38,10 @@ case "$1" in
action $"Mounting NFS filesystems: " mount -a -t nfs,nfs4
}
[ -n "$SMBFSTAB" ] && action $"Mounting SMB filesystems: " mount -a -t smbfs
+ [ -n "$CIFSFSTAB" ] && action $"Mounting CIFS filesystems: " mount -a -t cifs
[ -n "$NCPFSTAB" ] && action $"Mounting NCP filesystems: " mount -a -t ncpfs
touch /var/lock/subsys/netfs
- action $"Mounting other filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs
+ action $"Mounting other filesystems: " mount -a -t nonfs,nfs4,smbfs,cifs,ncpfs
;;
stop)
# Unmount loopback stuff first
@@ -108,6 +111,7 @@ case "$1" in
done
}
[ -n "$SMBMTAB" ] && action $"Unmounting SMB filesystems: " umount -a -t smbfs
+ [ -n "$CIFSMTAB" ] && action $"Unmounting CIFS filesystems: " umount -a -t cifs
[ -n "$NCPMTAB" ] && action $"Unmounting NCP filesystems: " umount -a -t ncpfs
rm -f /var/lock/subsys/netfs
;;
@@ -121,6 +125,10 @@ case "$1" in
echo $"Configured SMB mountpoints: "
for fs in $SMBFSTAB; do echo $fs ; done
}
+ [ -n "$CIFSFSTAB" ] && {
+ echo $"Configured CIFS mountpoints: "
+ for fs in $CIFSFSTAB; do echo $fs ; done
+ }
[ -n "$NCPFSTAB" ] && {
echo $"Configured NCP mountpoints: "
for fs in $NCPFSTAB; do echo $fs ; done
@@ -133,6 +141,10 @@ case "$1" in
echo $"Active SMB mountpoints: "
for fs in $SMBMTAB; do echo $fs ; done
}
+ [ -n "$CIFSMTAB" ] && {
+ echo $"Active CIFS mountpoints: "
+ for fs in $CIFSMTAB; do echo $fs ; done
+ }
[ -n "$NCPMTAB" ] && {
echo $"Active NCP mountpoints: "
for fs in $NCPMTAB; do echo $fs ; done