You are not logged in.

#1 2015-01-02 17:01:47

n0rv
Member
Registered: 2012-02-27
Posts: 49

[solved][netctl] Disabled profiles restored on next boot

Netctl restores each disabled profile that was active before reboot and has not been manually stopped.
Is this a bug or feature? Is there some undocumented option to prevent from restoring disabled profile?

Last edited by n0rv (2015-01-02 19:44:40)

Offline

#2 2015-01-02 17:30:29

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [solved][netctl] Disabled profiles restored on next boot

I can't duplicate that behaviour and it doesn't sound like a feature. Enabling a netctl profile just results in a systemd .service file in /etc/systemd/system, and a symlink to it in /etc/systemd/system/multi-user.target.wants (by default at least). Disabling should remove both, check if that happens.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2015-01-02 19:17:49

n0rv
Member
Registered: 2012-02-27
Posts: 49

Re: [solved][netctl] Disabled profiles restored on next boot

After closer look, I think this is intentional (and clever), because when netctl.service is stopped, this command is called:

ExecStop=/usr/bin/netctl store

Store command saves active profiles to state file (/var/lib/netctl/netctl.state) and these profiles are restored on next boot, because restore command is used:

ExecStart=-/usr/bin/netctl restore

So, it looks like I just need to disable netctl.service to stop profiles restoring.

Last edited by n0rv (2015-01-02 19:18:31)

Offline

#4 2015-01-02 19:29:44

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [solved][netctl] Disabled profiles restored on next boot

That also explains why I don't see the same behaviour. All of my netctl services are based on netctl@.service rather than netctl.service. The two have very different functions:

$  cat /usr/lib/systemd/system/netctl.service 
[Unit]
Description=(Re)store the netctl profile state
...
$ cat /usr/lib/systemd/system/netctl@.service 
[Unit]
Description=Networking for netctl profile %I
...

Last edited by alphaniner (2015-01-02 19:30:07)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB