FS#31377 - [netcfg] Unable to get netcfg working with systemd

Attached to Project: Arch Linux
Opened by persson (persson) - Saturday, 01 September 2012, 12:59 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 11 September 2012, 07:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I switched to a pure systemd installation following the instructions described here: https://wiki.archlinux.org/index.php/Systemd.
I'm not using any login manager. After console login, I type "startx" if I want to start a graphical environment.

I have NETWORKS=(menu) in /etc/conf.d/netcfg. I tried adding the netcfg service to systemd (equivalent to the old net-profiles), following this table: https://wiki.archlinux.org/index.php/Daemon#List_of_Daemons, so

# systemctl enable netcfg.service
ln -s '/usr/lib/systemd/system/netcfg.service' '/etc/systemd/system/multi-user.target.wants/netcfg.service'

Now upon reboot I get a failure:

[FAILED] Failed to start Netcfg multi-profile daemon.
See 'systemctl status netcfg.service' for details.

# systemctl status netcfg.service
netcfg.service - Netcfg multi-profile daemon
Loaded: loaded (/usr/lib/systemd/system/netcfg.service; enabled)
Active: failed (Result: exit-code) since Sat, 01 Sep 2012 16:49:07 +0200; 1min 10s ago
Process: 268 ExecStart=/usr/bin/netcfg-daemon start (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/netcfg.service

Sep 01 16:49:02 vader netcfg-daemon[268]: cannot open tty-output
Sep 01 16:49:07 vader netcfg-daemon[268]: :: wired-eth up No connection
Sep 01 16:49:07 vader netcfg-daemon[268]: [fail]

"wired-eth" happens to be the first item that would get listed in the netcfg-menu tool. It's not connected, so it fails, but what I'd like is really to get the menu and be able to choose a connection myself.

After some reading, I tried adding StandardInput=tty, StandardOutput=tty, StandardError=tty but no change. Also tty-force does not work.

I may be doing something wrong because it's the first systemd installation I try, but I don't know where to go from here.
Thanks for any help.
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Tuesday, 11 September 2012, 07:38 GMT
Reason for closing:  Not a bug
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 01 September 2012, 15:22 GMT
menu => interactive => not work by systemd design [#1] see item 5

[#1] http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities
Comment by persson (persson) - Saturday, 01 September 2012, 15:30 GMT
Ok, I'm not going to comment about this. Just so I know: is there a way, any way, to do what I'm after (even through some other mean), or will systemd prevent any interaction with users during boot? If so, it looks broken to me.
And anyway, if the stdin to /dev/null redirection cannot be changed, then I wonder why bother with StandardInput= et al in the man page, they're just misleading.
Comment by Matthew Iversen (Ivoz) - Monday, 03 September 2012, 20:10 GMT
I have net-auto-wired.service and netcfg.service enabled. netcfg and ifplugd are installed.

The following netcfg: http://pastie.org/4658185

I end up with both eth0 and wlan0 up by the time I'm logged in.
Comment by Jouke Witteveen (jouke) - Tuesday, 04 September 2012, 21:29 GMT
Indeed the requested behavior does not work by design. You could try to also add type=idle to your modifications, but I doubt it will ever function properly.

A possible workaround is to have multiple grub entries, corresponding to multiple profiles. For that to work you need to add Requires=default.target to netcfg@.service and add systemd.unit=netcfg@<profile>.service to the kernel boot command. This might not work, but it could.

Please post your findings. I will mark the bug as "won't fix" afterwards.
Comment by persson (persson) - Wednesday, 05 September 2012, 10:54 GMT
This is obviously not archlinux's fault...but doesn't this all sound just broken by design? I mean, multiple grub entries? For something as simple as being able to choose a network profile, which "just worked" with sysV init? Or being forced to enable all connections? Are we kidding?
It looks like systemd could improve on this. After all, it already has provisions to allow for interaction (password dialog to enter password to unlock encrypted volumes), so adding a way to perform other types of interactions could certainly be done. And since systemd's design is *already* all but "clean", I'd say it wouldn't make it worse than what it is.

And still I don't understand what's the point of StandardInput= et al. if they don't work. Again, nothing against archlinux, don't get me wrong.

Thanks for the suggestions.

Loading...