Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#32043 - [netcfg] Add support to logout connected users on a server reboot (systemd)
Attached to Project:
Arch Linux
Opened by John (graysky) - Wednesday, 17 October 2012, 20:40 GMT
Last edited by Jouke Witteveen (jouke) - Saturday, 27 October 2012, 15:13 GMT
Opened by John (graysky) - Wednesday, 17 October 2012, 20:40 GMT
Last edited by Jouke Witteveen (jouke) - Saturday, 27 October 2012, 15:13 GMT
|
DetailsDescription: My server is running netcfg+ifplugd using an ethernet-static configuration; systemd is bring it up via the /usr/lib/systemd/system/net-auto-wired.service just fine, but if I tell the box to reboot to shutdown, all ssh connections hang. Under sysv, the NETWORK_PERSIST="yes" in /etc/rc.conf fixed this via a hook. Support for this via netcfg would be great.
Additional info: * package version(s) 2.8.11-2 Steps to reproduce: Ask a systemd server to reboot or shutdown while connect via ssh to it. % sudo shutdown -h now <<terminal hangs>> |
This task depends upon
Closed by Jouke Witteveen (jouke)
Saturday, 27 October 2012, 15:13 GMT
Reason for closing: Won't implement
Saturday, 27 October 2012, 15:13 GMT
Reason for closing: Won't implement
# /bin/ps aux | /usr/bin/grep ssh | /usr/bin/grep -v grep | /usr/bin/awk {'print $2'} | /usr/bin/xargs -r kill
Connection to mars closed by remote host.
Connection to mars closed.
Does it work when placed literally in PRE_DOWN for a given profile?
PRE_DOWN='/bin/ps aux | /usr/bin/grep ssh | /usr/bin/grep -v grep | /usr/bin/awk {"print $2"} | /usr/bin/xargs -r kill'
1) The string of commands proposed isn't really elegant. Is there a more "correct" method that you're aware of to accomplish this? I spend a good 45 minutes googling sshd-native commands to force a logout of all users but came up empty.
2) Perhaps we can edit the included example profiles to include this or a similar line so users do not need to rely on the wiki and have these in the Arch package. How do you feel about this solution?
3) Is this really a netcfg issue? Perhaps that or a similar command should really go into the sshd.service or .socket files?
2) No, this is typical wiki material.
3) No, it should be part of ExecStop in the sshd service. In fact, if sshd behaves nicely, the spawned instances would belong to the right process group. All that would matter in that case, is that sshd is brought down before netcfg.
https://bugs.archlinux.org/task/32251