Commit 6ae0042f authored by Tim Schumacher's avatar Tim Schumacher Committed by Paul Moore
Browse files

selinux: Chain up tool resolving errors in install_policy.sh



Subshell evaluations are not exempt from errexit, so if a command is
not available, `which` will fail and exit the script as a whole.
This causes the helpful error messages to not be printed if they are
tacked on using a `$?` comparison.

Resolve the issue by using chains of logical operators, which are not
subject to the effects of errexit.

Fixes: e37c1877 ("scripts/selinux: modernize mdp")
Signed-off-by: default avatarTim Schumacher <tim.schumacher1@huawei.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 2c2b1e05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment