I'm trying to check if this solution would help me with auto restarting after shutdown.
But command sudo systemctl enable haltusbpower.service
is followed by error:
Synchronizing state of haltusbpower.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable haltusbpower update-rc.d: error: haltusbpower Default-Start contains no runlevels, aborting.
My /usr/lib/systemd/system/haltusbpower.service
file:
[Unit]
Description=haltusbpower
Before=shutdown.target
DefaultDependencies=no
[Service]
ExecStart=/usr/local/bin/haltusbpower.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=shutdown.target
My /usr/local/bin/haltusbpower.sh
script:
#!/bin/bash
for i in /sys/bus/usb/devices/*/power/control;
do echo on > $i
done
It has execute option:
karol@karol:~$ ls -l /usr/local/bin/haltusbpower.sh
-rwxr-xr-x 1 root root 88 kwi 27 13:03 /usr/local/bin/haltusbpow
Why enabling haltusbpower doesn't work? And what followed error means? I don't understand where to look for errors.
/etc/init.d
directory so the system was trying to resolve the legacy code as well