On 1/11/22 11:21 PM, Manuel Wolfshant wrote:> 2. Run the following commands: > > #systemctl disable nut-driver > > #systemctl enable nut-driver.timerWhen I run this command, I get this warning: # systemctl enable nut-driver.timer The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: ? A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. ? A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. ? A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). ? In case of template units, the unit is meant to be enabled with some instance name specified. I don't think it's loading: # systemctl | grep nut ? nut-driver.service loaded failed failed Network UPS Tools - power device driver controller ? nut-monitor.service loaded failed failed Network UPS Tools - power device monitor and shutdown controller nut-server.service loaded active running Network UPS Tools - power devices information server
Manuel Wolfshant
2022-Feb-04 23:31 UTC
[Nut-upsuser] ups services not starting at boot time
On 2/5/22 00:33, Timur Tabi wrote:> On 1/11/22 11:21 PM, Manuel Wolfshant wrote: > >> 2. Run the following commands: >> >> #systemctl disable nut-driver >> >> #systemctl enable nut-driver.timer > > When I run this command, I get this warning: > > # systemctl enable nut-driver.timer > The unit files have no installation config (WantedBy=, RequiredBy=, > Also=, > Alias= settings in the [Install] section, and DefaultInstance= for > template > units). This means they are not meant to be enabled using systemctl. > > Possible reasons for having this kind of units are: > ? A unit may be statically enabled by being symlinked from another unit's > ? .wants/ or .requires/ directory. > ? A unit's purpose may be to act as a helper for some other unit which > has > ? a requirement dependency on it. > ? A unit may be started when needed via activation (socket, path, timer, > ? D-Bus, udev, scripted systemctl call, ...). > ? In case of template units, the unit is meant to be enabled with some > ? instance name specified. > > I don't think it's loading: > > # systemctl | grep nut > ? nut-driver.service ????????????????????????????????? loaded failed > failed??? Network UPS Tools - power device driver controller > ? nut-monitor.service ????????????????????????????????? loaded failed > failed??? Network UPS Tools - power device monitor and shutdown > controller > ? nut-server.service ?????????????????????????????????? loaded active > running?? Network UPS Tools - power devices information serverQuite odd. I tested on my CentOS 7 prior to mailing and there were no complains when I enabled it. I can only guess that the systemd shipped in Fedora has more restrictions/checks. Try the next one: [root at wolfy3 ~]# cat /usr/lib/systemd/system/nut-driver.timer [Unit] Description=Delay startup of nut-driver by as many seconds as specified in the [Timer] section [Timer] OnBootSec=20 [Install] WantedBy=default.target [root at wolfy3 ~]# systemctl enable nut-driver.timer Created symlink from /etc/systemd/system/default.target.wants/nut-driver.timer to /usr/lib/systemd/system/nut-driver.timer.