On Thu, 22 Mar 2007, TheOldFellow wrote:

> On Wed, 21 Mar 2007 14:55:42 +0000 (WET)
>
>>>
>>> If you logout of your last shell does it go faster?  There seems to
>>> be some delay before a tty is shut down.
>> I was doing it from the console, as root. X wasn't running, and there
>> wasn't any other shell running. Anyway, the "normal-looking messages"
>> said the getty services were down, so the big delay must be elsewhere.
>> (OTHH, VC1 had a getty, since the shell prompt still appeared...)
>
> OK, you still have to exit the last shell, otherwise you have to wait
> while it times out and kills it.
>
Yes, the messages show that the other gettys are gone and getty-1
received TERM and "wants down". I tried
        exec init 6
instead of
        init 6
and, sure enough, it goes down in about 1s or less. No time to see the
hint of a message!
Is this how you do it? Strange that it is not mentioned in the runit
docs. Or is there a more normal way? (Or maybe it's too obvious for most
runit users:))
>
> The way I do networks as runit services...
>
> 1) I wrote a little C program to wait:
>
> /* pause.c */
> main ()
> {
>        exit (pause());
> }
>
> 2) Then a service script like this:
>
> #!/bin/bash
> # modprobe eth0 if this is required to load a NIC module
> exec 2>&1
> # use the regular LFS network script to bring up the connection
> /etc/sysconfig/network-devices/ifup eth0
> # and wait until we get a TERM or KILL signal
> exec pause
>
> 3) and a finish script:
>
> #!/bin/bash
> # bring the connection down
> /etc/sysconfig/network-devices/ifdown eth0
>
> I've often wondered if I could dispense with the pause program, but
rw-sleep, from the runwhen package?
> everything I tried failed, so I just use that.
>
Thanks!

Jorge
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to