[HEADS-UP] systemd for F14 - the next steps
Daniel J Walsh
dwalsh at redhat.com
Wed Jul 14 19:03:53 UTC 2010
On 07/14/2010 02:54 PM, Lennart Poettering wrote:
> On Wed, 14.07.10 13:31, Chris Adams (cmadams at hiwaay.net) wrote:
>> Once upon a time, Lennart Poettering <mzerqung at 0pointer.de> said:
>>> Yes this would work, though in a different syntax:
>>> ExecStartPre=-/bin/mkdir -p /var/run/foo ; -/sbin/restorecon /var/run/foo
>>> (The initial - btw means that the exit code of the command is ignored)
>> Why would you ignore the exit code? If you can't make the directory and
>> set the context, you shouldn't start the service.
> Well, dunno, maybe if SELinux is disabled via selinux=0 restorcon fails?
> And we don't want that? Dunno?
> Generally I think it is a good idea to ignore errors like this if they
> are clearly caught by later commands, simply for robustness
> reasons. i.e. if the command really fails to label the dir properly,
> then the daemon won't be able to access the dir and will then terminate
> with an error.
> But well, this may of course be left to the maintainers, what they
> prefer. I have no strong opinions on this.
> The default is of course to check all return values, i.e. you have to
> explicitly prefix the commands with "-" to ignore them.
BTW: restorecon exits silently if SELinux is disabled.
More information about the devel