Using the LSB Bootscripts

Bryan Kadzban bryan at kadzban.is-a-geek.net
Mon May 9 20:36:21 PDT 2011


Jeremy Huntwork wrote:
> On 5/9/11 1:57 AM, Bryan Kadzban wrote:
>> Right, but you have no way to know (in the static config, or the
>> DHCP config, for instance) whether a pppd was running and needs to
>> be killed, or whether DNS needs to be unregistered (unlikely, but
>> not impossible), or whether a wireless card needs to be
>> disassociated.
> 
> There has to be ways to check in the running system how a device is 
> configured if it's active.

Yeah, but a single "everything goes down this way" script would need to
know about all the possibilities.

(But see DJ's recent mail.)

>> I can see that logic, I suppose.  But bootscript config (which is
>> what both /etc/sysconfig/rtc and friends, and
>> /etc/sysconfig/network*, are today) seems different enough from
>> systemwide defaults for new users, to warrant a different
>> directory.  Maybe the useradd defaults file should have been stuck
>> somewhere near /etc/skel or something.  But at least in my mind,
>> separating the two makes sense.
>> 
>> (Then again, my mind is a scary place.  :-P)
> 
> The /etc/sysconfig/network* have already been moved to /etc/network.
> What is now /etc/default/rc as per the changes is really just
> default configurations for how the bootscripts run.

Right, but the former /etc/sysconfig/network* was also default
configuration for how the bootscripts run.  Well, the network script
anyway.  :-)

>> What happens if the machine shuts down with ssh sessions active,
>> without this?  Do they just hang and eventually time out?  Or do
>> they die when the NIC gets taken down?  (...Is the kernel that
>> smart?)  Or does something log all users out earlier?  (What about
>> killall5, run from sendsignals?  That might be too late though?)
> 
> Without this, the terminal hangs until the timeout is reached and
> then the session closes and the terminal becomes active on the
> localhost again.

So networking goes down before the per-client sshd processes, and the
kernel isn't smart enough to kill those connections at interface-down
time.  :-(

In that case, this should work.  Maybe with a comment explaining why
it's necessary though.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20110509/a41ab837/attachment.sig>


More information about the lfs-dev mailing list