One last netbooting issue
Mark Street
jet at sonic.net
Fri May 24 10:25:21 PDT 2002
This problem seems to be related to runlevel 0 rc scripts. The order with
which your network, dhcpcd, nfs go down is probably what is hanging the system.
Is this a RedHat box? In /etc/rc.d/rc0.d/ you will notice that all
services are KILLED one by one is specific order according to their
importance to system stability for an orderly shutdown. You could tweak
this order so your important services do not get shutdown. The last run
control script to run in run level 0 is the killall script which you are
describing below. Worst case if you turn it off you will probably have
some stale lock files in /var/run/subsys which may have to be cleaned up on
boot.
My RH 7.3 box /etc/rc.d/rc0.d directory listing, note the order in which
services are terminated - K05-K96. Note dhcpcd is killed early on, also
note the S00killall script that runs just before the S01halt script. You
could probably do the same thing for run level 6.
ls /etc/rc.d/rc0.d/
K05anacron K25sshd K50tux K73ypbind K91isdn
K05keytable K30qmail K50xinetd K74apmd K92ip6tables
K10xfs K34yppasswdd K60atd K74nscd K92ipchains
K12mysqld K35dhcpd K60crond K74ntpd K92iptables
K12postgresql K35smb K60lpd K74ypserv K95kudzu
K15gpm K35vncserver K61ldap K74ypxfrd K96irda
K15httpd K40mars-nwe K65identd K75netfs K96pcmcia
K20nfs K44rawdevices K65kadmin K80random S00killall
K20rstatd K45arpwatch K65kprop K86nfslock S01halt
K20rusersd K45named K65krb524 K87portmap
K20rwalld K50snmpd K65krb5kdc K88syslog
K20rwhod K50snmptrapd K72autofs K90network
S00killall
#!/bin/bash
# Bring down all unneeded services that are still running (there shouldn't
# be any, so this is just a sanity check)
for i in /var/lock/subsys/*; do
# Check if the script is there.
[ ! -f $i ] && continue
# Get the subsystem name.
subsys=${i#/var/lock/subsys/}
# Bring the subsystem down.
if [ -f /etc/init.d/$subsys.init ]; then
/etc/init.d/$subsys.init stop
elif [ -f /etc/init.d/$subsys ]; then
/etc/init.d/$subsys stop
else
rm -f $i
fi
done
At 03:26 PM 5/23/2002 -0700, Lincoln Peters wrote:
>I have gotten the netbooting system at RCHS to the point where only one
>problem remains that I don't already have the answer to.
>
>When a netbooting client shuts down, I need to prevent it from terminating
>dhcpcd, because if it does so at any point prior to shutdown, the system
>hangs. I fixed the symlinks that cause the network to shut down on any
>runlevel (0, 1, or 6), but when it gets to "Sending all processes the TERM
>signal", it terminates dhcpcd and the machine crashes (just like if I had
>unplugged the hard disk on a typical computer). Is there any way to
>prevent the system from sending the TERM signal to dhcpcd specifically, or
>maybe just prevent the "Sending processes the TERM signal" event from
>happening at all?
Yeah, turning off the S00killall script in runlevel 0
More information about the talk
mailing list