I had enabled nut-driver.target, nut-server & nut-monitor: "# systemctl enable nut-driver.target nut-monitor nut-server" But after reboot all of them are loaded but don't start: "# systemctl status nut-driver.target nut-monitor nut-server ○ nut-driver.target - Network UPS Tools - target for power device drivers on this system Loaded: loaded (/usr/lib/systemd/system/nut-driver.target; enabled; preset: disabled) Active: inactive (dead) ○ nut-monitor.service - Network UPS Tools - power device monitor and shutdown controller Loaded: loaded (/usr/lib/systemd/system/nut-monitor.service; enabled; preset: disabled) Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: inactive (dead) ○ nut-server.service - Network UPS Tools - power devices information server Loaded: loaded (/usr/lib/systemd/system/nut-server.service; enabled; preset: disabled) Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: inactive (dead)" I have to start them manually: "# systemctl start nut-driver.target nut-monitor nut-server" I would like they start automatically at boot. Could you fix it? Thanks. Reproducible: Always Steps to Reproduce: reboot Actual Results: nut-driver.target, nut-server & nut-monitor are loaded but inactive. Expected Results: nut-driver.target, nut-server & nut-monitor must be loaded and active. I just want to manage my "eaton 3 s" UPS following this tuto: https://lukas.zapletalovi.com/posts/2019/configuring-eaton-3s-ups-with-fedora-30/
Those installation instructions seem outdated. What happens if you do 'systemctl enable --now nut.target' ? Please attach the boot log ('journactl -b -o short-unix --no-hostname').
Oh, right. nut-driver.target nut-server.service nut-monitor.service all have [Install] WantedBy=nut.target, but nut.target pulls them in uncoditionally via 'Wants=local-fs.target nut-driver.target nut-server.service nut-monitor.service', so enabling nut-driver.target nut-server.service nut-monitor.service has no effect. Maintainers, please drop the [Install] section in those three units and add a not in the README to tell users to use 'systemctl enable --now nut.taget'. (When the [Install] sections are dropped, systemctl will complain if enable is attempted.)
Hi Zbigniew, I did: # systemctl enable --now nut.target Created symlink /etc/systemd/system/multi-user.target.wants/nut.target → /usr/lib/systemd/system/nut.target. # The result after reboot is: # systemctl status nut* ● nut-monitor.service - Network UPS Tools - power device monitor and shutdown c> Loaded: loaded (/usr/lib/systemd/system/nut-monitor.service; enabled; pres> Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: active (running) since Wed 2023-11-15 21:07:20 CET; 11min ago Process: 1374 ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpf> Main PID: 1376 (upsmon) Tasks: 2 (limit: 18865) Memory: 1.4M CPU: 32ms CGroup: /system.slice/nut-monitor.service ├─1376 /usr/sbin/upsmon -F └─1379 /usr/sbin/upsmon -F nov. 15 21:07:20 fedora.home systemd[1]: Starting nut-monitor.service - Network> nov. 15 21:07:20 fedora.home systemd[1]: Started nut-monitor.service - Network > nov. 15 21:07:20 fedora.home nut-monitor[1376]: fopen /run/nut/upsmon.pid: No s> nov. 15 21:07:20 fedora.home nut-monitor[1376]: Could not find PID file to see > nov. 15 21:07:20 fedora.home nut-monitor[1376]: UPS: eaton3s@localhost (primary> nov. 15 21:07:20 fedora.home nut-monitor[1376]: Using power down flag file /etc> nov. 15 21:07:20 fedora.home nut-monitor[1379]: Login on UPS [eaton3s@localhost> ● nut-driver - Network UPS Tools - device driver for NUT device> lines 1-23...skipping... ● nut-monitor.service - Network UPS Tools - power device monitor and shutdown c> Loaded: loaded (/usr/lib/systemd/system/nut-monitor.service; enabled; pres> Drop-In: /usr/lib/systemd/system/service.d └─10-timeout-abort.conf Active: active (running) since Wed 2023-11-15 21:07:20 CET; 11min ago Process: 1374 ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpf> Main PID: 1376 (upsmon) Tasks: 2 (limit: 18865) Memory: 1.4M CPU: 32ms CGroup: /system.slice/nut-monitor.service ├─1376 /usr/sbin/upsmon -F └─1379 /usr/sbin/upsmon -F nov. 15 21:07:20 fedora.home systemd[1]: Starting nut-monitor.service - Network> nov. 15 21:07:20 fedora.home systemd[1]: Started nut-monitor.service - Network > nov. 15 21:07:20 fedora.home nut-monitor[1376]: fopen /run/nut/upsmon.pid: No s> nov. 15 21:07:20 fedora.home nut-monitor[1376]: Could not find PID file to see > nov. 15 21:07:20 fedora.home nut-monitor[1376]: UPS: eaton3s@localhost (primary> nov. 15 21:07:20 fedora.home nut-monitor[1376]: Using power down flag file /etc> nov. 15 21:07:20 fedora.home nut-monitor[1379]: Login on UPS [eaton3s@localhost> It works! $ journalctl -b -o short-unix --no-hostname | fpaste Uploading (275.6KiB)... https://paste.centos.org/view/bb6c3a12 $ I thank you very much for your help. Alexandre