You are not logged in.

#1 2022-04-23 12:58:13

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 83

[SOLVED] Prevent systemd to autostart netctl profile

I use netctl as a network manager. When i plug USB WiFi dongle, new interface wlan0 appears. Systemd attempts to start netctl@wlan0 automatically:

kernel: usbcore: registered new interface driver rtl88x2bu
systemd[1]: Starting Load/Save RF Kill Switch Status...
systemd-udevd[97504]: Using default interface naming scheme 'v250'.
systemd[1]: Started Load/Save RF Kill Switch Status.
systemd[1]: Starting Networking for netctl profile wlan0...
network[97515]: Profile 'wlan0' does not exist or is not readable
systemd[1]: netctl@wlan0.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: netctl@wlan0.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Networking for netctl profile wlan0.
systemd-udevd[97504]: wlan0: Process '/usr/bin/netctl start wlan0' failed with exit code 1.
systemd[1]: systemd-rfkill.service: Deactivated successfully.

I have no 'wlan0' profile and don't want to bring up anything automatically. Is it possible to do subj?

Last edited by dimich (2022-04-23 14:43:37)

Offline

#2 2022-04-23 13:25:59

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,069

Re: [SOLVED] Prevent systemd to autostart netctl profile

About the only way that could happen is if netctl-auto@wlan0.service is enabled, but enabling that should require manual action .

Please post output of

$ find /etc/systemd -type l -exec test -f {} \; -print

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-04-23 13:42:02

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 83

Re: [SOLVED] Prevent systemd to autostart netctl profile

$ find /etc/systemd -type l -exec test -f {} \; -print
/etc/systemd/system/getty.target.wants/getty@tty1.service
/etc/systemd/system/network-online.target.wants/netctl-wait-online.service
/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
/etc/systemd/system/display-manager.service
/etc/systemd/system/sockets.target.wants/cups.socket
/etc/systemd/system/multi-user.target.wants/cups.path
/etc/systemd/system/multi-user.target.wants/connection-monitor.service
/etc/systemd/system/multi-user.target.wants/atd.service
/etc/systemd/system/multi-user.target.wants/iptables.service
/etc/systemd/system/multi-user.target.wants/smartd.service
/etc/systemd/system/multi-user.target.wants/ip6tables.service
/etc/systemd/system/multi-user.target.wants/lm_sensors.service
/etc/systemd/system/multi-user.target.wants/netctl.service
/etc/systemd/system/multi-user.target.wants/amixer-fix.service
/etc/systemd/system/multi-user.target.wants/sshd.service
/etc/systemd/system/multi-user.target.wants/docker.service
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/etc/systemd/system/multi-user.target.wants/named.service
/etc/systemd/system/multi-user.target.wants/containerd.service
/etc/systemd/system/multi-user.target.wants/netctl@lan0.service
/etc/systemd/system/multi-user.target.wants/cronie.service
/etc/systemd/system/printer.target.wants/cups.service
/etc/systemd/user/default.target.wants/xdg-user-dirs-update.service
/etc/systemd/user/sockets.target.wants/gpg-agent-ssh.socket
/etc/systemd/user/sockets.target.wants/gpg-agent-browser.socket
/etc/systemd/user/sockets.target.wants/dirmngr.socket
/etc/systemd/user/sockets.target.wants/gpg-agent.socket
/etc/systemd/user/sockets.target.wants/p11-kit-server.socket
/etc/systemd/user/sockets.target.wants/gcr-ssh-agent.socket
/etc/systemd/user/sockets.target.wants/pulseaudio.socket
/etc/systemd/user/sockets.target.wants/gpg-agent-extra.socket
/etc/systemd/user/sockets.target.wants/pipewire.socket

Also there is no any file or symlink with '@wlan0':

$ find /etc/systemd /usr/lib/systemd -name '*wlan0*'
$

Offline

#4 2022-04-23 14:19:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,069

Re: [SOLVED] Prevent systemd to autostart netctl profile

/etc/systemd/system/multi-user.target.wants/netctl.service

/etc/systemd/system/multi-user.target.wants/netctl@lan0.service

netctl.service restores the last profile used, netctl@lan0.service starts the lan0 profile .
Using both is unneccesary and could lead to issues.

Other then that I don't see other issues.

I suggest you disable netctl.service , reboot and verify if plugging in the dongle still starts a netctl service.
Incase it does, post full journal from that boot.

Last edited by Lone_Wolf (2022-04-23 14:19:52)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2022-04-23 14:43:23

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 83

Re: [SOLVED] Prevent systemd to autostart netctl profile

I found the reason. There was a custom udev rule I added some time ago and forgot about it.

ACTION=="add", SUBSYSTEM=="net", ENV{ID_BUS}=="usb", RUN+="/usr/bin/netctl start $env{INTERFACE}"

Offline

Board footer

Powered by FluxBB