Hello community, here is the log from the commit of package autofs checked in at Sat May 17 02:31:04 CEST 2008. -------- --- autofs/autofs.changes 2008-04-21 17:11:51.000000000 +0200 +++ autofs/autofs.changes 2008-05-16 17:37:26.000000000 +0200 @@ -1,0 +2,8 @@ +Fri May 16 16:31:01 CEST 2008 - mkoenig@suse.de + +- more shutdown improvements to minimize the risk of mounted + leftovers in the shutdown process + differentiate between direct/indirect mounts + enforce lazy umount since USR2 seems not to work currently + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autofs.spec ++++++ --- /var/tmp/diff_new_pack.Z23059/_old 2008-05-17 02:30:25.000000000 +0200 +++ /var/tmp/diff_new_pack.Z23059/_new 2008-05-17 02:30:25.000000000 +0200 @@ -19,7 +19,7 @@ AutoReqProv: on Requires: grep Version: 5.0.3 -Release: 27 +Release: 36 Summary: A Kernel-Based Automounter BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.bz2 @@ -150,6 +150,11 @@ /usr/sbin/automount %changelog +* Fri May 16 2008 mkoenig@suse.de +- more shutdown improvements to minimize the risk of mounted + leftovers in the shutdown process + differentiate between direct/indirect mounts + enforce lazy umount since USR2 seems not to work currently * Mon Apr 21 2008 mkoenig@suse.de - improve shutdown in init script * Wed Jan 30 2008 mkoenig@suse.de ++++++ autofs-suse-autofs_init.patch ++++++ --- /var/tmp/diff_new_pack.Z23059/_old 2008-05-17 02:30:25.000000000 +0200 +++ /var/tmp/diff_new_pack.Z23059/_new 2008-05-17 02:30:25.000000000 +0200 @@ -2,7 +2,7 @@ =================================================================== --- autofs-5.0.3.orig/samples/rc.autofs.in +++ autofs-5.0.3/samples/rc.autofs.in -@@ -2,116 +2,148 @@ +@@ -2,116 +2,187 @@ # # rc file for automount using a Sun-style "master map". # @@ -104,20 +104,7 @@ - RETVAL=$? - [ $RETVAL = 0 -a -z "`pidof $DAEMON`" ] || sleep 3 - count=`expr $count + 1` -+ case "$RUNLEVEL" in -+ [016sS]) -+ for sig in TERM KILL ; do -+ while read type mnt fs rest ; do -+ test "$fs" = autofs || continue -+ for path in $mnt/* ; do -+ # skip ghost dirs -+ test "`stat -f -c '%t' $path`" = "187" && continue -+ test -e $path || continue -+ /bin/fuser -k -$sig -m $path > /dev/null 2>&1 -+ done -+ done < /proc/mounts -+ [ $sig = TERM ] && sleep 2 - done +- done - if [ -n "`pidof $DAEMON`" ] ; then - echo "done." - else @@ -125,7 +112,63 @@ - fi - return $RETVAL -} -- ++ case "$RUNLEVEL" in ++ [016sS]) ++ # we really want to shutdown, so kill all processes which ++ # keep autofs mounted filesystems busy ++ for sig in TERM KILL ; do ++ while read map mnt fstype options dummy ; do ++ test "$fstype" = autofs || continue ++ case "$options" in ++ *indirect*) ++ # we need to dive in, because the automount process ++ # itself needs to be avoided ++ for path in $mnt/* ; do ++ test "$path" = "$mnt/*" && break ++ # ghost dir skip optimization ++ test "$(stat -f -c '%t' $path)" = "187" && continue ++ /bin/fuser -k -$sig $path > /dev/null 2>&1 ++ done ++ ;; ++ *[^i][^n]direct*) ++ # automount process does not appear for direct mounts ++ /bin/fuser -k -$sig $mnt > /dev/null 2>&1 ++ ;; ++ *) ;; ++ esac ++ done < /proc/mounts ++ [ $sig = TERM ] && sleep 2 ++ done ++ /sbin/killproc -USR2 $DAEMON ++ sleep 2 ++ esac ++ /sbin/killproc -G -TERM $DAEMON ++ ++ # at this point there should not be any autofs filesystems mounted. ++ # to ensure that there are no leftovers, we lazy umount any remaining ++ # autofs filesystem which have been still kept busy for some reason ++ # (this should have been done by the USR2 signal but currently this ++ # does not work) ++ while read map mnt fstype options dummy; do ++ test "$fstype" = "autofs" || continue ++ case "$options" in ++ *indirect*) ++ for path in $mnt/* ; do ++ test "$path" = "$mnt/*" && break ++ test -e $path && umount -l $path ++ done ++ test -e $mnt && umount -l $mnt ++ ;; ++ *[^i][^n]direct*) ++ # umount 2 times: one for the real fs, one for autofs ++ # because mountpoint and autofs mp are identical here! ++ test -e $mnt && umount -l $mnt ++ test -e $mnt && umount -l $mnt ++ ;; ++ *) ;; ++ esac ++ done < /proc/mounts + -function restart() { - stop - start @@ -142,10 +185,6 @@ - RETVAL=0 - fi - return $RETVAL -+ /sbin/killproc -USR2 $DAEMON -+ sleep 2 -+ esac -+ /sbin/killproc -G -TERM $DAEMON + return $RETVAL } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de