[arch-general] /etc/rc.d/foo restart
Gerardo Exequiel Pozzi
vmlinuz386 at yahoo.com.ar
Thu May 28 20:23:25 EDT 2009
Daenyth Blank wrote:
> 2009/5/28 Frédéric Perrin <frederic.perrin at resel.fr>:
>> I'm just an user, but... if I ask the service to be restarted when it is
>> not started yet, I would expect the rc script to fail as early and
>> loudly as possible, no ?
> Currently the rc scripts just do a "stop" followed by a "start" to
> restart. Should this be done differently? Personally I have no issue
> with this, and it's beneficial to me.
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.
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 )
Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
More information about the arch-general