/[baselayout]/trunk/init.d/netmount
Gentoo

Diff of /trunk/init.d/netmount

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 333 Revision 334
55 # umount -art $fstypes doesn't seem to work, so... 55 # umount -art $fstypes doesn't seem to work, so...
56 # NB: we have to check if any network filesystems is mounted, 56 # NB: we have to check if any network filesystems is mounted,
57 # else mount do not exit cleanly 57 # else mount do not exit cleanly
58 58
59 local sig retry 59 local sig retry
60 local remaining="$(awk '$3 ~ /coda|nfs|ncpfs|smbfs/ { print $2 }' /proc/mounts | sort -r)" 60 local remaining="$(awk '$3 ~ /coda|nfs|ncpfs|smbfs/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
61 61
62 # just keep things nice and uniform 62 # just keep things nice and uniform
63 if [ -z "${remaining}" ] 63 if [ -z "${remaining}" ]
64 then 64 then
65 ebegin "Unmounting network filesystems" 65 ebegin "Unmounting network filesystems"
77 else 77 else
78 ebegin "Unmounting network filesystems" 78 ebegin "Unmounting network filesystems"
79 umount ${remaining} &>/dev/null 79 umount ${remaining} &>/dev/null
80 eend $? "Failed to unmount filesystems" 80 eend $? "Failed to unmount filesystems"
81 fi 81 fi
82 remaining="$(awk '$3 ~ /coda|nfs|ncpfs|smbfs/ { print $2 }' /proc/mounts | sort -r)" 82 remaining="$(awk '$3 ~ /coda|nfs|ncpfs|smbfs/ { if ($2 != "/") print $2 }' /proc/mounts | sort -r)"
83 [ -z "${remaining}" ] && break 83 [ -z "${remaining}" ] && break
84 /bin/fuser -k -m ${sig} ${remaining} &>/dev/null 84 /bin/fuser -k -m ${sig} ${remaining} &>/dev/null
85 sleep 5 85 sleep 5
86 retry=$((${retry} -1)) 86 retry=$((${retry} -1))
87 sig=-9 87 sig=-9

Legend:
Removed from v.333  
changed lines
  Added in v.334

  ViewVC Help
Powered by ViewVC 1.1.20