| Summary: | Add cifs support in netfs | ||
|---|---|---|---|
| Product: | ALT Linux 2.4 | Reporter: | Sviatoslav Sviridov <svd> |
| Component: | net-scripts | Assignee: | Denis Ovsienko <pilot> |
| Status: | CLOSED FIXED | QA Contact: | Andrey Cherepanov <cas> |
| Severity: | enhancement | ||
| Priority: | P2 | ||
| Version: | 2.4 | ||
| Hardware: | all | ||
| OS: | Linux | ||
|
Description
Sviatoslav Sviridov
2005-01-26 11:54:45 MSK
Вот и патчик:
--- netfs~ 2005-01-26 22:49:05 +0200
+++ netfs 2005-01-26 22:52:17 +0200
@@ -22,9 +22,11 @@ LOCKFILE=/var/lock/subsys/netfs
NFSFSTAB=`grep -vs '^#' /etc/fstab |awk '{ if (($3 == "nfs") && ($4 !~
/noauto/)) print $2}'`
SMBFSTAB=`grep -vs '^#' /etc/fstab |awk '{ if (($3 == "smbfs") && ($4 !~
/noauto/)) print $2}'`
+CIFSFSTAB=`grep -vs '^#' /etc/fstab |awk '{ if (($3 == "cifs") && ($4 !~
/noauto/)) print $2}'`
NCPFSTAB=`grep -vs '^#' /etc/fstab |awk '{ if (($3 == "ncpfs") && ($4 !~
/noauto/)) print $2}'`
NFSMTAB=`grep -vs '^#' /proc/mounts |awk '{ if (($3 == "nfs") && ($2 != "/"))
print $2}'`
SMBMTAB=`grep -vs '^#' /proc/mounts |awk '{ if (($3 == "smbfs") && ($2 != "/"))
print $2}'`
+CIFSMTAB=`grep -vs '^#' /proc/mounts |awk '{ if (($3 == "cifs") && ($2 != "/"))
print $2}'`
NCPMTAB=`grep -vs '^#' /proc/mounts |awk '{ if (($3 == "ncpfs") && ($2 != "/"))
print $2}'`
start()
@@ -38,6 +40,7 @@ start()
action "Mounting NFS filesystems:" mount -a -t nfs
fi
[ -z "$SMBFSTAB" ] || action "Mounting SMB filesystems:" mount -a -t smbfs
+ [ -z "$CIFSFSTAB" ] || action "Mounting CIFS filesystems:" mount -a -t cifs
[ -z "$NCPFSTAB" ] || action "Mounting NCP filesystems:" mount -a -t ncpfs
# action "Mounting other filesystems (if any):" mount -a -t
noproc,nfs,smbfs,ncpfs
@@ -60,6 +63,13 @@ stop()
"Unmounting SMB filesystem (retry)"
fi
+ if [ -n "$CIFSMTAB" ]; then
+ UnmountFilesystems 3 5 \
+ '$3 == "cifs" && $2 != "/" {print $2}' \
+ "Unmounting CIFS filesystem" \
+ "Unmounting CIFS filesystem (retry)"
+ fi
+
if [ -n "$NCPMTAB" ]; then
UnmountFilesystems 3 5 \
'$3 == "ncpfs" && $2 != "/" {print $2}' \
Кстати, было бы неплохо, наверно, переписать netfs таким образом, чтоб можно было проще определять (или угадывать?) какие типы файловых систем надо размонтировать... А то тут еще в голову лезут всякие fuse, lufs/lufis... |