You are not logged in.

#1 2012-10-17 16:50:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Systemd+netcfg does not logout ssh sessions on reboot [SOLVED]

Title says it all.  What is the trick to getting systemd to logout users connected via ssh on a reboot?  My server is running the netcfg+ifplugd using an ethernet-static configuration; systemd is bring it up via the /usr/lib/systemd/system/net-auto-wired.service

Thanks!

 % sudo shutdown -h now
<<terminal hangs>>

Under sysv, the NETWORK_PERSIST="yes" in /etc/rc.conf fixed this.

EDIT: solution is detailed in bug report in post #3.

Last edited by graysky (2012-10-19 23:53:26)

Offline

#2 2012-10-17 16:58:06

Gusar
Member
Registered: 2009-08-25
Posts: 3,607

Re: Systemd+netcfg does not logout ssh sessions on reboot [SOLVED]

Nothing to do with netcfg. The openssh package installs a hook that closes all connections at shutdown. But of course hooks are an initscripts thing, so the same trick doesn't work with systemd. One would need to come up with a systemd thingy that does something equivalent to the initscripts hook.

Offline

#3 2012-10-17 20:08:01

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Systemd+netcfg does not logout ssh sessions on reboot [SOLVED]

Conceivably, if you're using dhcpcd, you could add the -p flag to the unit to leave the interface configured.

Yes, this needs a proper workaround in systemd.

Offline

#4 2012-10-17 20:34:42

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Re: Systemd+netcfg does not logout ssh sessions on reboot [SOLVED]

falconindy wrote:

Conceivably, if you're using dhcpcd, you could add the -p flag to the unit to leave the interface configured.

Yes, this needs a proper workaround in systemd.

I don't think there is an equivalent option for /usr/bin/netcfg that I see in the manpage sad  I would open a bug with upstream, but I'm not totally sure what to ask for since I'm using Arch-specific software (netcfg).  Maybe open a bug against netcfg?

EDIT: https://bugs.archlinux.org/task/32043

Last edited by graysky (2012-10-17 20:40:43)

Offline

Board footer

Powered by FluxBB