Bug#739190: netenv doesn't come up initializing via systemd
Arnaud Fontaine
arnau at debian.org
Wed Jun 11 07:15:14 BST 2014
Hello,
Michael Biebl <biebl at debian.org> writes:
> Under systemd all services run in a defined context.
> This also means you can't prompt for input by reading from the console.
>
> # X-Interactive: true
>
> as used by the netenv sysv init script does not work by design. See [1]:
>
> " Services cannot read from stdin, as this will be connected to
> /dev/null. That means interactive init scripts are not supported (i.e.
> Debian's X-Interactive in the LSB header is not supported either.)
> Thankfully most distributions do not support interaction in init scripts
> anyway. If you need interaction to ask disk or SSL passphrases please
> consider using the minimal password querying framework systemd supports.
> (details, manual page) "
>
> [...]
>
> That leaves netdev.
> Tbh I don't know what to do about that. The password agents [2] were
> designed to prompt for passphrases, not to select from a list from
> pre-defined values. So they are not applicable to the case.
>
> While you can change a service file's StandardInput= setting so it
> actually get's access to the console during boot, a "systemctl start
> netdev.service" in you terminal emulator does not work with that either
> afair. But for this case you could simply provide a command-line tool
> like netenv-select or so
>
> As a closing remark, let me add that it is generally discouraged to
> prompt for input during boot.
Since when has it been discouraged? I may have misunderstood something
but, considering the password agents built in systemd, I don't see any
reason why only inputting passwords should be allowed/available at boot
time and not something else at the end (especially for system-level
prompt such as system-wide network configuration as netenv does),
whatever the technical reason is...
Cheers,
--
Arnaud Fontaine
More information about the Pkg-systemd-maintainers
mailing list