You are not logged in.

#1 2019-04-05 02:49:17

dojero
Member
Registered: 2011-11-26
Posts: 37

<SOLVED>Netctl and systemctl lists not in sync?

I have enabled a netctl connection. When I run "netctl list" after boot, the connection shows as active (it has an asterisk in front of it). When I run 'netctl enable <profile>, netctl reports that the profile is already enabled. And, of course, I'm connected to the net using this wifi connection. So all is exactly as it should be.

But when I run "systemctl list-unit-files", the netctl@profile is not listed. This happens only on one laptop I'm using, I've never had it happen before. Any ideas why the unit-file for the active netctl profile isn't showing in the systemctl list?

Last edited by dojero (2019-04-05 19:59:40)

Offline

#2 2019-04-05 03:31:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: <SOLVED>Netctl and systemctl lists not in sync?

Please paste the output of `systemctl list-unit-files --state=enabled`


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-04-05 17:24:17

dojero
Member
Registered: 2011-11-26
Posts: 37

Re: <SOLVED>Netctl and systemctl lists not in sync?

$ sudo systemctl list-unit-files --state enabled
UNIT FILE                              STATE  
acpid.service                          enabled
autovt@.service                        enabled
bluetooth.service                      enabled
dbus-org.bluez.service                 enabled
dbus-org.freedesktop.timesync1.service enabled
getty@.service                         enabled
piavpn.service                         enabled
systemd-timesyncd.service              enabled
remote-fs.target                       enabled

9 unit files listed.

and

sudo netctl enable allentown
The profile 'allentown' is already enabled

Offline

#4 2019-04-05 17:54:42

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: <SOLVED>Netctl and systemctl lists not in sync?

I've noticed that systemctl sometimes doesn't list all enabled units, particularly after enabling & disabling some beforehand.

Try this instead:

ls -lR /etc/systemd/system

Do the netctl units show up in that list?


Jin, Jîyan, Azadî

Offline

#5 2019-04-05 19:03:45

dojero
Member
Registered: 2011-11-26
Posts: 37

Re: <SOLVED>Netctl and systemctl lists not in sync?

Yes, netctl shows up there. But isn't this a list of the active units (as opposed to the enabled units)?

Offline

#6 2019-04-05 19:21:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: <SOLVED>Netctl and systemctl lists not in sync?

No, that command shows enabled units — the unit files are symlinked to the .target directories to enable them.

It won't show --user services though, run ls -lR on ~/.config/systemd/user for those.

To list active units run

systemd-cgls

Or

systemd-cgtop

Jin, Jîyan, Azadî

Offline

#7 2019-04-05 19:59:01

dojero
Member
Registered: 2011-11-26
Posts: 37

Re: <SOLVED>Netctl and systemctl lists not in sync?

Excellent. Thanks very much for the help. Marking this solved.

Offline

#8 2019-04-06 12:19:10

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: <SOLVED>Netctl and systemctl lists not in sync?

dojero wrote:

Marking this solved.

Well it was a workaround rather than a solution, perhaps you should open an issue about this – systemctl should list everything.

(I would pursue it myself but I've switched to OpenRC.)


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB