Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 101 Details for
Bug 444
autofs does not handle --timeout option correctly (patch included)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
quick hack for /etc/init.d/autofs to make it handle the timeout option correctly
autofs-timeout.patch (text/plain), 2.19 KB, created by
Gert Menke
on 2002-01-30 16:38:47 UTC
(
hide
)
Description:
quick hack for /etc/init.d/autofs to make it handle the timeout option correctly
Filename:
MIME Type:
Creator:
Gert Menke
Created:
2002-01-30 16:38:47 UTC
Size:
2.19 KB
patch
obsolete
>--- autofs.orig Wed Jan 30 19:05:47 2002 >+++ autofs Wed Jan 30 19:05:52 2002 >@@ -31,13 +31,14 @@ > -a x`echo "$map" | cut -c1` != 'x-' ] > then > map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'` >- options=`echo "$options" | sed -e 's/\(^\|[ \t]\)-/\1/g'` >+ timeout=`echo $options | sed --silent -e 's/\(.*\)\(--timeout=[0-9]\+\)\(.*\)/\2/g ; /--timeout=[0-9]\+/ p'` >+ options=`echo $options | sed -e 's/\(.*\)\(--timeout=[0-9]\+\)\(.*\)/\1\3/g ; s/\(^\|[ \t]\)-/\1/g'` > if [ -x $map ]; then >- echo "/usr/sbin/automount $dir program $map $options $localoptions" >+ echo "/usr/sbin/automount $timeout $dir program $map $options $localoptions" > elif [ -f $map ]; then >- echo "/usr/sbin/automount $dir file $map $options $localoptions" >+ echo "/usr/sbin/automount $timeout $dir file $map $options $localoptions" > else >- echo "/usr/sbin/automount $dir `basename $map` $options $localoptions" >+ echo "/usr/sbin/automount $timeout $dir `basename $map` $options $localoptions" > fi > fi > done >@@ -63,7 +64,7 @@ > options=`echo "$options" | sed -e ' > s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g > s/\(^\|[ \t]\)-/\1/g'` >- echo "/usr/sbin/automount $dir yp $map $options $localoptions" >+ echo "/usr/sbin/automount $mountoptions $dir yp $map $options $localoptions" > fi > done > ) >@@ -72,17 +73,24 @@ > > start() { > ebegin "Starting automounter" >- getmounts | while read cmd mnt rest >+ getmounts | while read cmd timeout mnt rest > do >+ #FIXME: this works but it really sucks >+ if echo $timeout|grep -v -- '--timeout' >/dev/null ; then >+ rest="$mnt $rest" >+ mnt="$timeout" >+ timeout="" >+ fi >+ > echo -n " $mnt" > pidfile=/var/run/autofs`echo $mnt | sed 's/\//./'`.pid > start-stop-daemon --start --pidfile $pidfile --quiet \ >- --exec /usr/sbin/automount -- $mnt $rest >+ --exec /usr/sbin/automount -- $timeout $mnt $rest > # > # Automount needs a '--pidfile' or '-p' option. > # For now we look for the pid ourself. > # >- ps ax | grep "[0-9]:[0-9][0-9] /usr/sbin/automount $mnt" | ( >+ ps ax | grep "[0-9]:[0-9][0-9] /usr/sbin/automount $timeout \?$mnt" | ( > read pid rest > echo $pid > $pidfile > echo "$mnt $rest" >> $pidfile
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444
: 101