netenv doesn't come up initializing via systemd

Michael Biebl biebl at debian.org
Sat May 31 14:09:21 BST 2014


Am 31.05.2014 14:29, schrieb Elimar Riesebieter:
> severity 739190 grave
> forwarded 739190 pkg-systemd-maintainers at lists.alioth.debian.org
> thanks
> 
> 
> * Elimar Riesebieter <riesebie at lxtec.de> [2014-02-16 17:42 +0100]:
> 
>> Package: netenv
>> Version: 0.94.3-30
>> Severity: normal
>>
>> Don't know how to debug?
>> "systemctl netenv start" doesn't start the dialog.
>>
>> Running netenv by sysvinit everthing seems to be ok.

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) "

A grep over the archive shows
apache2/init.d/apache2:# X-Interactive:     true
console-common/init.d/keymap.sh:# X-Interactive:        true
cryptsetup/init.d/cryptdisks:# X-Interactive:     true
cryptsetup/init.d/cryptdisks-early:# X-Interactive:     true
drbd8-utils/init.d/drbd:# X-Interactive:  true
initscripts/init.d/checkfs.sh:# X-Interactive:     true
initscripts/init.d/checkroot.sh:# X-Interactive:     true
kbd/init.d/kbd:# X-Interactive:     true
keyboard-configuration/init.d/console-setup:# X-Interactive:     true
keyboard-configuration/init.d/keyboard-setup:# X-Interactive:     true
live-config-sysvinit/init.d/live:# X-Interactive:       true
live-config-sysvinit/init.d/live-config:# X-Interactive:        true
lxc/init.d/lxc:# X-Interactive: true
netenv/init.d/netenv:# X-Interactive:     true
openvpn/init.d/openvpn:# X-Interactive:     true
sysv-rc/init.d/README:# X-Interactive:     true


cryptsetup support is built-in, console-setup/kbd do not really need to
prompt. Remains openvpn and apache2 which potentially require it to
unlock SSL certificates, but openvpn now ships a native service file.

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.



[1] http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities/
[2] http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents/
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140531/5701315b/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list