Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard x86 linux install service will not start on boot #153

Closed
sadkisson opened this issue Oct 20, 2022 · 7 comments
Closed

Standard x86 linux install service will not start on boot #153

sadkisson opened this issue Oct 20, 2022 · 7 comments

Comments

@sadkisson
Copy link

I am using this script on a x86 linux install with systemd. I cannot get the script to auto start on boot.

sudo systemctl enable sqm@wan
Created symlink /etc/systemd/system/sys-devices-virtual-net-wan.device.wants/[email protected] → /usr/lib/systemd/system/[email protected].
Unit /usr/lib/systemd/system/[email protected] is added as a dependency to a non-existent unit sys-devices-virtual-net-wan.device.

When I check the status after rebooting:
sudo systemctl status sqm@wan
[email protected] - SQM scripts for iface wan
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; preset: disabled)
Active: inactive (dead)

When I start manually after booting the script works:
sudo systemctl start sqm@wan
[email protected] - SQM scripts for iface wan
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; preset: disabled)
Active: active (exited) since Thu 2022-10-20 21:14:19 UTC; 5s ago
Process: 542 ExecStart=/usr/lib/sqm/start-sqm (code=exited, status=0/SUCCESS)
Main PID: 542 (code=exited, status=0/SUCCESS)
CPU: 370ms

Oct 20 21:14:19 router systemd[1]: Starting SQM scripts for iface wan...
Oct 20 21:14:19 router start-sqm[542]: Starting SQM script: piece_of_cake.qos on wan, in: 50000 Kbps, out: 9500 Kbps
Oct 20 21:14:19 router start-sqm[542]: piece_of_cake.qos was started on wan successfully
Oct 20 21:14:19 router systemd[1]: Finished SQM scripts for iface wan.

Thanks for making this, it works great!

@tohojo
Copy link
Owner

tohojo commented Oct 20, 2022 via email

@sadkisson
Copy link
Author

yes, i renamed the interface to wan using systemd link file in /etc/systemd/network

[Match]
MACAddress=xx:xx:xx:xx:xx:xx

[Link]
Description=Ethernet WAN Interface
Name=wan

@tohojo
Copy link
Owner

tohojo commented Oct 20, 2022 via email

@sadkisson
Copy link
Author

sudo systemctl | grep wan
sys-devices-pci0000:00-0000:00:1c.0-0000:01:00.0-net-wan.device loaded active plugged 82583V Gigabit Network Connection
sys-devices-virtual-net-ifb4wan.device loaded active plugged /sys/devices/virtual/net/ifb4wan
sys-subsystem-net-devices-ifb4wan.device loaded active plugged /sys/subsystem/net/devices/ifb4wan
sys-subsystem-net-devices-wan.device loaded active plugged 82583V Gigabit Network Connection
[email protected] loaded active exited SQM scripts for iface wan

@tohojo
Copy link
Owner

tohojo commented Oct 20, 2022 via email

@sadkisson
Copy link
Author

The post above is with the script active after manually start. This is what it looks like on reboot before starting the script.

sudo systemctl | grep wan
sys-devices-pci0000:00-0000:00:1c.0-0000:01:00.0-net-wan.device loaded active plugged 82583V Gigabit Network Connection
sys-subsystem-net-devices-wan.device loaded active plugged 82583V Gigabit Network Connection

@sadkisson
Copy link
Author

I made the change and ran

sudo systemctl enable sqm@wan
Created symlink /etc/systemd/system/sys-subsystem-net-devices-wan.device.wants/[email protected] → /usr/lib/systemd/system/[email protected].
Unit /usr/lib/systemd/system/[email protected] is added as a dependency to a non-existent unit sys-subsystem-net-devices-wan.device.

I rebooted and ran systemctl status sqm@wan:

[sadkisson@router ~]$ sudo systemctl status sqm@wan

[email protected] - SQM scripts for iface wan
Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; preset: disabled)
Active: active (exited) since Thu 2022-10-20 21:55:41 UTC; 48s ago
Process: 333 ExecStart=/usr/lib/sqm/start-sqm (code=exited, status=0/SUCCESS)
Main PID: 333 (code=exited, status=0/SUCCESS)
CPU: 393ms

Oct 20 21:55:40 router systemd[1]: Starting SQM scripts for iface wan...
Oct 20 21:55:40 router start-sqm[333]: Starting SQM script: piece_of_cake.qos on wan, in: 50000 Kbps, out: 9500 Kbps
Oct 20 21:55:41 router start-sqm[333]: piece_of_cake.qos was started on wan successfully
Oct 20 21:55:41 router systemd[1]: Finished SQM scripts for iface wan.

That appears to have fixed it! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants