[1761] in SIPB_Linux_Development

home help back first fref pref prev next nref lref last post

Re: Shutting down afs before network

daemon@ATHENA.MIT.EDU (Emil Sit)
Thu Aug 21 03:43:14 1997

To: Fast Cart <fastcart@MIT.EDU>
Cc: linux-dev@MIT.EDU
In-Reply-To: Your message of "Thu, 21 Aug 1997 01:49:02 EDT."
             <9708210549.AA02097@skeleton-key.MIT.EDU> 
Date: Thu, 21 Aug 1997 03:43:04 EDT
From: Emil Sit <sit@MIT.EDU>


>            /etc/rc.d/init.d/athena.init stop
>            if grep "^libafs" /proc/modules; then
>             killall afsd
>             rmmod libafs
>            fi

Not
	kill -TERM `cat /var/run/afsd.pid`?

Note that "athena.init stop" will kill AFS (from the srvd):

	# Kill AFS
	if [ -d /afs/athena.mit.edu ]; then
		echo -n "AFS..."
		kill `cat /var/run/afsd.pid`
		sleep 10
		/sbin/rmmod libafs
	fi

> Now, Derek said we should also make it so that afs comes back up when the
> network is back up.  If I am to use what I did for shutting down the network
> as a basis, then I think we have a problem.  All I'm doing is calling the
> athena.init script from within the two network scripts.  If I were to start

Well. I don't particularly like the dependency. I don't like the idea
of the network scripts needing to worry explicitly about higher level stuff.
That should be handled manually or by something else.

I also don't see the reason you need to bother with init.d/network at all.
This is for handling on the fly addition/removal of network capability.
In the "normal" case, where we have network right at boot time, the old network
script starts just the network and when it hits runlevel 3 or 5 stuff, it
does athena.init. When shutting down, the K scripts in runlevel 6 take
down athena services before taking down network.

> 1) Just drop in the edited scripts as is.
>    b) Edit the afs package to add the changes into the networks scripts.  The
>       drawback is if someone uninstalls the afs package, the networks scripts
>       may not be left as they originally were, thus causing problems in them.

There are install/uninstall scripts which can be incorporated into RPMs.
We already do this sort of thing for the (old) athena-rc package.
 
> 2) Leave the network scripts alone and make it extremely clear that users
>    should shutdown afs before shutting down the network (which they'll just
>    ignore).

I would actually like it better if they had to run "athena.init start" 
manually after enabling network (and the reverse when disabling). If this
is handled by a PCMCIA (or PPP) script, then it would not be unreasonable
to put the commands in that script.

--
Emil Sit / Bronx Science '95, MIT '99 -- ESG, SIPB, Athena Consulting
PGP KeyID: 0xE63561E9 / Fingerprint: A68FD0693EDABA19 2671EC1F22498F58

home help back first fref pref prev next nref lref last post