[arch-general] /etc/rc.d/foo restart
daenyth+arch at gmail.com
Thu May 28 20:43:16 EDT 2009
On Thu, May 28, 2009 at 20:23, Gerardo Exequiel Pozzi
<vmlinuz386 at yahoo.com.ar> wrote:
> The only small issue for me is for example the sshd.
> This is the scenario:
> 1) Login with ssh to Arch Linux machine.
> 2) Do some task.
> 3) shutdown/reboot
> The ssh session is _hold_ no ^C ^D respond. This is because only the
> "sshd master" is killed on stop, and not the childrens. Then when
> network is stop.... just freeze. At this point can happends two scenarios:
> 4a) timeout ocurr at some time acording to tcp timeout setting, so the
> local shell is again for you. (if remote machine is shutdown)
> 4b) the ssh session continues normally when remote machine is up again.
> (an openssh feature?) (if remote machine is reboot)
> Solutions can have many:
> S1) Just killall on sshd "stop" (but not on "restart", because can be
> useful doing a "restart" on some upgrade, an users connected to the
> system, can stay on it, and new users will get the new configuration/libs)
> S2) Do not stop network in the loop, just omit them. And stop, after the
> killall5 commands. This also ensure that all daemons and your childs are
> stopped, the shutdown the network.
> S3) Any other better idea. :)
> Gerardo Exequiel Pozzi ( djgera )
> KeyID: 0x1B8C330D
> Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
I'm not really sure what the best behavior in this case is... If you
look at the example of a multi-user system, killing all sshd processes
has the potential to boot off quite a few users unexpectedly.. It
seems to me that the only time you would want that behavior is when
you're the only one using it. Either that or you'd want to «wall»
More information about the arch-general