Dear all,
I want to make the startup script which run the command Âip route add 192.168.1.0/24 dev eth0Â.
But I canÂt find the method in the Guide.
Could you tell me the method of making startup script?
Best regard,
Dear all,
I want to make the startup script which run the command Âip route add 192.168.1.0/24 dev eth0Â.
But I canÂt find the method in the Guide.
Could you tell me the method of making startup script?
Best regard,
Hi and welcome to the Forum
If using wicked, you should just be able to go into YaST Network Settings and add. Else just create a simple systemd service to call your script after the network interface is up and running.
#!/bin/bash
ip route add 192.168.1.0/24 dev eth0
# /etc/systemd/system/add_my_route.service
[Unit]
Description=Add route to eth0
After=wickedd.service
[Service]
Type=simple
ExecStart=/bin/sh -c "/path/to/script/add_my_route
[Install]
WantedBy=multi-user.target
Hi malcolmlewis,
you should just be able to go into YaST Network Settings and add
I set the 2 route by YaST.
I checked the route, and 192.168.2.0/24 is not reflected.
Can’t we set the Gateway on the Yast?
Thank you and regards,
what worked for me: it’\s creating a simple bash script