Re: remote poweroff with systemd

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



On Wed, Aug 7, 2013 at 2:17 PM, Fons Adriaensen <fons@xxxxxxxxxxxxxx> wrote:
> On Wed, Aug 07, 2013 at 01:15:28PM +0200, Tom Gundersen wrote:
>
>> It is correct that systemtl poweroff is synchronous, but using telinit
>> or --no-block will avoid that.
>
> Are you sure about telinit ? It was the first thing I tried, assuming
> it would asynchronous. But the man page says nothing about it using
> --no-block.

If you use /bin/init (which is a symlink to systemctl) it is
synchronous, but if you change runlevel via the compatibility
/dev/initctl it is asynchronous. I couldn't find that we ship the
telinit binary in Arch, so don't know exactly what you were using, but
I assume it was the legacy one using /dev/initctl, so it should have
been async (I guess the man page should specify this).

>> The reason for the problem you are seeing here is that the network is
>> torn down before ssh is shutdown. This isn't actually a big problem,
>> as the remote machine is shutting down just fine. The only problem is
>> that the ssh client ends up hanging, which is annoying, but not really
>> critical (kill it/ignore it/whatever).
>
> The shutdowns are called from a script which is supposed to continue...

I'd make some hack like forking it off. Or better yet, use systemctl
-H (which I hope works...).

-t


[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