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 <alan.christopher.jenkins@gmail.com>
This commit is contained in:
Alan Jenkins 2017-05-07 12:05:51 +01:00 committed by James Carter
parent 2aa88f7201
commit f499b02feb

View File

@ -387,7 +387,7 @@ else
else
while [ -n "$1" ]; do
FILEPATH="$1"
process "$command"
process "$command" || exit $?
shift
done
fi