Bug#753046: systemd: fails to run quotarpc.service if rpcbind is not installed
Michael Biebl
biebl at debian.org
Sun Jun 29 10:49:50 BST 2014
Hi there,
Am 29.06.2014 09:50, schrieb Michael Meskes:
>> Looking more closely, it seems the quota package only suggests the
>> rpcbind package, yet the quotarpc.service contains:
>>
>> Requires=rpcbind.service
>> After=rpcbind.service
>>
>> Requires means, the service will fail to start if the dependency is not
>> available.
>
> All correct, I actually didn't think about that case.
>
>> You either need to add a hard dependency on the rpcbind package or you
>> should demote the Requires to Wants.
>
> This is where it gets difficult. quota has lots of users that don't need or
> want quotarpc and thus don't need rpcbind. So a hard dependency is no option.
> But then quotarpc does require rpcbind to run, so only a Wants is not
> suffcient. I supposes there is no "Requires, but skip if not available" option
> for systemd? Then the only option I see is to create my own check in the script
> itself.
So quotarpc.service is only supposed to run if rpcbind is installed?
I think what you want here then is Wants/After + a Condition [1].
i.e.
[Unit]
Wants=rpcbind.service
After=rpcbind.service
ConditionFileIsExecutable=/sbin/rpcbind
....
[1] man systemd.unit
--
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://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20140629/42bbeed3/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list