mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-20 12:30:45 +00:00
policycoreutils: fixfiles: handle unexpected spaces in command
I accidently ran `fixfiles "a b"` during testing. Let's fix this too. Before: /sbin/fixfiles: line 394: [: a: binary operator expected Usage: ... After: Usage: ... Signed-off-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
This commit is contained in:
parent
8c662db964
commit
d0fafe035d
@ -378,8 +378,8 @@ done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
# Check for the command
|
||||
command=$1
|
||||
if [ -z $command ]; then
|
||||
command="$1"
|
||||
if [ -z "$command" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
@ -391,17 +391,17 @@ shift
|
||||
#
|
||||
|
||||
if [ ! -z "$RPMFILES" ]; then
|
||||
process $command
|
||||
process "$command"
|
||||
if [ $# -gt 0 ]; then
|
||||
usage
|
||||
fi
|
||||
else
|
||||
if [ -z "$1" ]; then
|
||||
process $command
|
||||
process "$command"
|
||||
else
|
||||
while [ -n "$1" ]; do
|
||||
FILEPATH="$1"
|
||||
process $command
|
||||
process "$command"
|
||||
shift
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user