DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Its been a while since I have posted anything in this forum so hello. Long story short, I have a Debian distro in which I decided to not network-manager to control my wireless nics but rather /etc/network/interfaces and wpa_supplicant.conf. Everything works fine using:
Code:
apt-get remove network-manager
...
...
cat /etc/network/interfaces
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid "Mindyourdamnbusiness"
#key_mgmt="NONE"
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/run/wpa_supplicant
update_config=1
network={
ssid="Mindyourdamnbusiness"
#scan_ssid=1
key_mgmt=NONE
}
All works fine with connecting to the AP as it assigns an ip, subnet but oddly does not add the default GW. So what I have to do is manually add it as in:
Code:
sudo ip route add default via 192.168.1.1
So since Debian 9 went away with rc.local, I added a service using systemd: https://wiki.debian.org/systemd/Services
pointing to my little shell script that simply adds the gateway. I dont understand why the dhclient is not doing this automatically this would prevent the need to do this entirely.
manwiththemasterplan@Confucious:~$ sudo systemctl status dhclient
[sudo] password for manwiththemasterplan:
Unit dhclient.service could not be found.
manwiththemasterplan@Confucious:~$sudo apt-get install isc-dhcp-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
isc-dhcp-common is already the newest version (4.4.1-2).
0 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
One thing that I didnt notice in the logs that stood out was:
Code:
/var/log/syslog-Oct 28 08:34:24 Confucious systemd[1]: Started Network Manager Script Dispatcher Service.
/var/log/syslog:Oct 28 08:34:24 Confucious systemd[1]: sroute.service: Service RestartSec=100ms expired, scheduling restart.
/var/log/syslog:Oct 28 08:34:24 Confucious systemd[1]: sroute.service: Scheduled restart job, restart counter is at 3.
/var/log/syslog-Oct 28 08:34:24 Confucious systemd[1]: Stopped static route.
/var/log/syslog-Oct 28 08:34:24 Confucious systemd[1]: Started static route.
/var/log/syslog-Oct 28 08:34:24 Confucious systemd[1]: Started Login Service.
/var/log/syslog:Oct 28 08:34:24 Confucious sroute[781]: Error: Nexthop has invalid gateway.
/var/log/syslog-Oct 28 08:34:24 Confucious NetworkManager[658]: <info> [1572266064.4033] device (wlan0): driver supports Access Point (AP) mode
/var/log/syslog:Oct 28 08:34:24 Confucious systemd[1]: sroute.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
/var/log/syslog:Oct 28 08:34:24 Confucious systemd[1]: sroute.service: Failed with result 'exit-code'.
/var/log/syslog-Oct 28 08:34:24 Confucious NetworkManager[658]: <info> [1572266064.4053] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
So I removed network-manager like suggested and its the same results:
Code:
Oct 28 09:52:56 Confucious /usr/lib/gdm3/gdm-x-session[821]: (II) xfree86: Adding drm device (/dev/dri/card0)
Oct 28 09:52:56 Confucious systemd[1]: sroute.service: Service RestartSec=100ms expired, scheduling restart.
Oct 28 09:52:56 Confucious systemd[1]: sroute.service: Scheduled restart job, restart counter is at 5.
Oct 28 09:52:56 Confucious systemd[1]: Stopped static route.
Oct 28 09:52:56 Confucious systemd[1]: sroute.service: Start request repeated too quickly.
Oct 28 09:52:56 Confucious systemd[1]: sroute.service: Failed with result 'exit-code'.
Oct 28 09:52:56 Confucious systemd[1]: Failed to start static route.
Last edited by metallica1973; 10-28-2019 at 09:03 AM.
Distribution: Ubuntu based stuff for the most part
Posts: 1,173
Rep:
Check if systemd.networkd is installed, if so it is 'helping' and needs to be removed also for your manual settings to work.
I had to remove it to get WICD to work when I replaced Network-Mangler.
Oct 28 09:52:56 Confucious systemd[1]: sroute.service: Start request repeated too quickly.
To me, this indicates an error in the sroute configuration which makes sroute fail immediately. It is started again, fails again etc.
Check the config. You should find it in the sroute.service unit file. The name of the sroute.service unit file is displayed by the systemctl status command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.