[Pkg-dns-devel] Bug#826241: Bug#826241: Bug#826241: Bug#826241: Bug#826241: Bug#826241: unbound: Provide $named facility under systemd

Michael Biebl biebl at debian.org
Sat Jul 16 20:52:58 UTC 2016


Hi Robert

Am 16.07.2016 um 20:44 schrieb Robert Edmonds:

> That's weird, 'service' is in /usr/sbin… So I edited the hook script to
> print $PATH:
> 
>     Jul 16 18:22:37 unbound package-helper[2484]: run-parts: executing /etc/resolvconf/update-libc.d/postfix
>     Jul 16 18:22:37 unbound package-helper[2484]: + echo /sbin:/bin
>     Jul 16 18:22:37 unbound package-helper[2484]: /sbin:/bin
>     Jul 16 18:22:37 unbound package-helper[2484]: + service postfix status
>     Jul 16 18:22:37 unbound package-helper[2484]: /etc/resolvconf/update-libc.d/postfix: 7: /etc/resolvconf/update-libc.d/postfix: service: not found
>     Jul 16 18:22:37 unbound package-helper[2484]: + exit 0

> So, 'service' is in /usr/sbin, but /usr/sbin is not in $PATH, and
> 'service' is not invoked with an absolute path. Then I edited the hook
> script to fix $PATH:

That's a bit surprising. systemd should add /usr/sbin to PATH. A minimal
test case

# cat /etc/systemd/system/env.service
[Unit]
Description="dump env"

[Service]
ExecStart=/bin/sh -c "env"

# journalctl -u env
-- Logs begin at So 2016-05-08 15:58:46 CEST, end at Sa 2016-07-16
22:46:15 CEST. --
Jul 16 22:46:15 pluto systemd[1]: Started "dump env".
Jul 16 22:46:15 pluto sh[28592]:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Jul 16 22:46:15 pluto sh[28592]: LANG=en_US.UTF-8
Jul 16 22:46:15 pluto sh[28592]: PWD=/



So for some reason $PATH is reset. I wonder where that happens.
I noticed that postfix's resolvconf in jessie uses
/etc/init.d/postfix instead of service postfix, so doesn't run into this
issue.


> Anyway, this needs to be fixed before I can upload an unbound package
> with native service units. I can't upload an unbound that breaks
> postfix. Does the fix need to go in the unbound or resolvconf or postfix
> package?

So, it seems to me as something resets PATH within resolvconf.
If that is true, then this should also affect the old sysv init script
for unbound. Is this actually still working?

Regards,
Michael

-- 
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: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-dns-devel/attachments/20160716/e1067c93/attachment.sig>


More information about the pkg-dns-devel mailing list