Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 6411 Details for
Bug 11983
netmount doesn't trigger start of portmap
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
My netmount script
netmount (text/plain), 2.52 KB, created by
Chip Marshall
on 2002-12-11 15:46:52 UTC
(
hide
)
Description:
My netmount script
Filename:
MIME Type:
Creator:
Chip Marshall
Created:
2002-12-11 15:46:52 UTC
Size:
2.52 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2002 Gentoo Technologies, Inc. ># Distributed under the terms of the GNU General Public License v2 ># $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/netmount,v 1.20 2002/11/18 13:07:02 azarah Exp $ > > >depend() { > > local myneed="net" > local myuse="" > > # > # Only have Portmap as a dependency if there is a nfs mount in fstab > # that should be mounted at boot time. Also filter out comments. > # > local nfsmounts="$(awk '!/^#/ && $3 == "nfs" && $4 !~ /noauto/ { print $0 }' /etc/fstab)" > > if [ -n "${nfsmounts}" ] > then > local myneed="${myneed} portmap" > local myuse="${myuse} nfs" > fi > > need ${myneed} > use ${myuse} >} > >start() { > local rcfilesystems="" > > # Only try to mount NFS filesystems if portmap was started. > # This is to fix "hang" problems for new users who do not > # add portmap to the default runlevel. > if [ -L ${svcdir}/started/portmap ] > then > rcfilesystems="coda,nfs,ncpfs,smbfs" > else > rcfilesystems="coda,ncpfs,smbfs" > fi > > ebegin "Mounting network filesystems" > mount -at ${rcfilesystems} >/dev/null > > if [ "$?" -ne 0 ] > then > ewend 1 "Could not mount all network filesystems!" > else > eend 0 > fi > > return 0 >} > >stop() { > # umount -art $fstypes doesn't seem to work, so... > # NB: we have to check if any network filesystems is mounted, > # else mount do not exit cleanly > > local sig retry > local remaining="$(cat /proc/mounts | awk '{ print $3 " " $2 }' | \ > grep -E ^'coda|nfs|ncpfs|smbfs' | awk '{ print $2 }' |sort -r)" > > # just keep things nice and uniform > if [ -z "${remaining}" ] > then > ebegin "Unmounting network filesystems" > eend 0 > else > sig= > retry=3 > while [ -n "${remaining}" -a "${retry}" -gt 0 ] > do > if [ "${retry}" -lt 3 ] > then > ebegin "Unmounting network filesystems (retry)" > umount ${remaining} &>/dev/null > eend $? "Failed to unmount filesystems this retry" > else > ebegin "Unmounting network filesystems" > umount ${remaining} &>/dev/null > eend $? "Failed to unmount filesystems" > fi > remaining="$(cat /proc/mounts | awk '{ print $3 " " $2 }' | \ > grep -E ^'coda|nfs|ncpfs|smbfs' | awk '{ print $2 }' |sort -r)" > [ -z "${remaining}" ] && break > /bin/fuser -k -m ${sig} ${remaining} &>/dev/null > sleep 5 > retry=$((${retry} -1)) > sig=-9 > done > fi >} > > ># vim:ts=4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11983
: 6411 |
6433