/etc/rc.d/init.d/netfs не имеет поддержки cifs. В связи с этим попытка размонтирования cifs происходит в тот момент, когда сеть уже остановлена, получаем зависон... Steps to Reproduce: 1. mount cifs share 2. shut down 3. enjoy looking on frozed umount process 4. use Alt+SysRq to continue :)
Вот и патчик: --- 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...
#0 и #2 приняты
#0 пошёл в net-scripts-0.5.2, а #2 в TODO к /etc/net