hi ya peter

okay... I see it now...

I just checked /etc/rc.d/init.d/autofs ( yup redhat box )

  ...
  stop)
        #
        # change -TERM to -USR2 here ?
        #
--->>   kill -TERM $(/sbin/pidof /usr/sbin/automount)
        rm -f /var/lock/subsys/automount
        ;;

  reload|restart)
        ....
            while read pid tt stat time command; do
                echo "$command" >>$TMP2
                if ! grep -q "^$command" $TMP2; then
--->>                   kill -USR2 $pid
                        echo "Stop $command"
                fi
            done
        )

        ....
   #
   # I'd add this to it
   #
   force_kill)
        echo "AutoFS Going down...and might NOT come back up..."
        sleep 10 ; 
--->>   kill -TERM $(/sbin/pidof /usr/sbin/automount)
        rm -f /var/lock/subsys/automount
        ;;
        
guess we can change those options around ??

so as it is... autofs stop will kill autofs...
        ( which is what I usually do )

and "autofs reload" will try to reload only the changes
to auto.master/auto.misc

guess one could experiment with changing -TERM to -USR2 
to stop it from shutdown completely and not being able to restart ?

thanx
alvin

> > > > yes... if you could...please use some kind of detection schem
> > > > where autofs will refuse to shutdown and just flag that /home
> > > > is in use.... instead of going down anyway...and not be able
> > > > to restart to remount the other dirs that the users now wants
> > > > but can't get since autofs won't come back up without killing
> > > > all the old processes...
> > > > 
> > > 
> > > Sure; currently that's what autofs uses if you send it SIGUSR1; would
> > > it make sense if I made it behave that way for SIGTERM as well?
> > 
> > Am not 100% sure...but doesn't SIGTERM kill the process ??
> 
> SIGTERM is the "normal" kill (not kill -9, which is SIGKILL).
> Software can, and does, trap SIGTERM for a clean shutdown.  In the
> case of autofs, it umounts what it cans and then puts autofs into
> catatonic mode.
> 
> > All I'm wondering is autofs flags that it cannot umount a used mount point
> > and merrily continues it's way out....and cannot get autofs restarted...
> > 
> > - so am, wondering, can we give it an option to force it to continue
> >   and shutdown like it does now, knowing that it ( autofs) won't come back up
> >   .. the other option is to NOT shutdown if it finds "used mountpoints"
> 
> You already have this option: SIGTERM (and SIGQUIT) does the former,
> and SIGUSR2 (not SIGUSR1 as I said before) does the latter.
> 
> Perhaps it would make more sense to have SIGTERM do the latter (I
> presume SIGTERM is what the rc scripts send) and only have SIGQUIT do
> the former?
> 
> >     - I have this problem with /usr/local and don't really want to
> >       shutdown the machine... and similarly if /var/spool/mail was
> >       unmounted and autofs shutdowns when no one was reading mail...
> >       and we're stuck with whatever used mountpoints we have...
> >       no /var/spool/mail... which is not critical .. just annoying..
> > 
> >     - if I play with /home....than all users are kicked off anyway
> >       and the machine rebooted to test the changes...
> 
>       -hpa
> 

Reply via email to