From f499b02feb48803a094340b2cba6030f8ed163ad Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Sun, 7 May 2017 12:05:51 +0100 Subject: [PATCH] policycoreutils: fixfiles: if restorecon aborts, we should too New users may try something like `fixfiles restore -v /dir/file` - not realizing they are required to use `fixfiles -v restore /dir/file`. Detect that `restorecon` aborts due to being run on the non-existent file `-v`, and stop immediately. This will show the error much more clearly, instead of continuing to restore `/dir/file` *without* verbose messages. Signed-off-by: Alan Jenkins --- policycoreutils/scripts/fixfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles index 014ab040..1b173e69 100755 --- a/policycoreutils/scripts/fixfiles +++ b/policycoreutils/scripts/fixfiles @@ -387,7 +387,7 @@ else else while [ -n "$1" ]; do FILEPATH="$1" - process "$command" + process "$command" || exit $? shift done fi