As per my notice at the meeting tonight, here's the solution if you are using apcupsd with a new version of systemd and if it shuts your system down you cannot login after reboot.
(Newest systemd 254.16 does not remove /etc/nologin on reboot, and the option to stop apcupsd from creating this file is broken.)
It can't hurt to implement this right away even if you won't be using a newer systemd for a long time... this running cannot hurt anything if something has laready removed /etc/nologin. If you don't and you get hit by this, your only recourse is to login as root to manually remove the file.
make a new script: /usr/local/sbin/apcupsd-rm-nologin ######## #!/bin/bash # apcupsd leaves /etc/nologin behind after reboot # and systemd no longer removes it # so do it here if [[ -f /etc/nologin && ! -L /etc/nologin ]]; then rm -f /etc/nologin fi #########
chmod 755 /usr/local/sbin/apcupsd-rm-nologin
make a new systemd service file: /etc/systemd/system/apcupsd-rm-nologin.service ######### [Unit] Description=Makes sure apcupds power-outage shutdown nologin file is removed on reboot After=syslog.target
[Service] Type=oneshot RemainAfterExit=no ExecStart=/usr/local/sbin/apcupsd-rm-nologin
[Install] WantedBy=multi-user.target #########
systemctl enable apcupsd-rm-nologin.service _______________________________________________ Roundtable mailing list -- roundtable@muug.ca To unsubscribe send an email to roundtable-leave@muug.ca