Re: /etc/rc.d/foo restart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Daenyth Blank wrote:
> 2009/5/28 Frédéric Perrin <frederic.perrin@xxxxxxxx>:
>   
>> 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 ?
>>
>> --
>> Fred
>>
>>     
>
> 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.
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 )
http://www.djgera.com.ar
KeyID: 0x1B8C330D
Key fingerprint = 0CAA D5D4 CD85 4434 A219  76ED 39AB 221B 1B8C 330D



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux