When enabling profiles with a dash, systemd encodes it as x2d and netctl fails to find profile #66

Closed
kaihendry opened this Issue Nov 13, 2013 · 10 comments

Projects

None yet

3 participants

@kaihendry

Full log: http://sprunge.us/OSfj

Nov 13 12:00:40 pihsg network[869]: Profile 'wlan0x2dKGBFREE' does not exist or is not readable
Nov 13 12:00:40 pihsg systemd[1]: netctl@wlan0x2dKGBFREE.service: main process exited, code=exited, status=1/FAILURE
@joukewitteveen
Owner

Don't blame netctl for your own faults:

# systemctl start netctl@wlan0\x2dKGBFREE.service

This line causes the output you report as a bug. The argument contains a /, hence it needs to be quoted/escaped. On top of that, this is not the right way to use netctl, but you seem to know that. Instead of the above command, you needed:

netctl start wlan0-KGBFREE

Quoting and escaping for systemd is handled by netctl.

@kaihendry

No, the problem is when I ran:

netctl start 'wlan0-Mac4 - Weilun'
Job for netctl@wlan0\x2dMac4\x20\x2d\x20Weilun.service failed. See 'systemctl status netctl@wlan0\x2dMac4\x20\x2d\x20Weilun.service' and 'journalctl -xn' for details.

I then renamed it to get workaround this.

@joukewitteveen
Owner

No, you did not. The renaming was not needed. You can use netctl status <your-profile> as a shorthand for systemctl status netctl@<your-profile-but-escaped>.service.

@kaihendry

Ok, most people would probably stick to using systemctl like they do with the rest of their system and run into this issue again and again.

@WurdahMekanik

I agree... It's a little counter intuitive to have a program designed to
act like systemd not play nice with systemd. I've run into this problem
often as well.
On Nov 17, 2013 6:37 PM, "Kai Hendry" notifications@github.com wrote:

Ok, most people would probably stick to using systemctl like they do with
the rest of their system and run into this issue again and again.


Reply to this email directly or view it on GitHubhttps://github.com/joukewitteveen/netctl/issues/66#issuecomment-28668950
.

@joukewitteveen
Owner

If you don't understand systemd escaping, you don't understand systemd.

@WurdahMekanik

So even when generating profiles through wifi-menu or netctl procedures and
then using systemctl enable/start netctl-auto@[wireless-device] and seeing
similar errors upon startup, that is still somehow me failing to escape
systemd properly?
On Nov 18, 2013 4:31 AM, "Jouke Witteveen" notifications@github.com wrote:

If you don't understand systemd escaping, you don't understand systemd.


Reply to this email directly or view it on GitHubhttps://github.com/joukewitteveen/netctl/issues/66#issuecomment-28687835
.

@joukewitteveen
Owner

Yes, indeed.

@WurdahMekanik

So you're saying that even when I type in something with no hyphens such
as:

systemctl enable/start netctl-auto@wlp3s0.service

I'm somehow failing to escape something when systemd attempts to switch
profiles automatically for me? Profile renaming helps, as does connecting
manually in either way you describe, yet I can't seem to get systemd to
switch automatically.

Now this may actually not even be an issue with naming and could be
something else, but the errors aren't very forthcoming so at the moment it
seems like I'll have to stick to my current procedure of manually
connecting all the time until I find the problem.
On Nov 18, 2013 7:23 AM, "Jouke Witteveen" notifications@github.com wrote:

Yes, indeed.


Reply to this email directly or view it on GitHubhttps://github.com/joukewitteveen/netctl/issues/66#issuecomment-28697143
.

@joukewitteveen
Owner

systemctl <enable|start> netctl-auto@wlp3s0.service is the proper way to use netctl-auto and documented as such in netctl.special(7). No problem there. I will not reply to this thread anymore, as there is no actual issue that is being discussed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment