[systemd-devel] [PATCH] detect-virt: do not return exit failure code when the state is none

Franck Bui fbui at suse.de
Fri May 25 08:25:08 UTC 2018


Hi Joey,

On 05/25/2018 09:33 AM, joeyli wrote:
> 
> Do you have good idea to inhibit the exit failure to avoid the subsequent
> activity be blocked?
> 

For the context the actual rule is:

SUBSYSTEM=="memory", ACTION=="add",
PROGRAM=="/usr/bin/systemd-detect-virt", RESULT!="zvm", ...

You can use PROGRAM=="/bin/sh -c '/usr/bin/systemd-detect-virt || :'" so
the exit status of systemd-detect-virt is explicitly ignored.

I assume that if systemd-detect-virt fails then the value of RESULT will
be the empty string (you should check).


More information about the systemd-devel mailing list