Skip to content

Commit

Permalink
use if instead of &&
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed May 27, 2015
1 parent 594d257 commit 97b3c2f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/fai-statoverride
Expand Up @@ -4,8 +4,9 @@
# call dpkg-statoverride with multiple files,
# this command is idempotent

# copyright Thomas Lange, Uni Koeln, 2005
# copyright Thomas Lange, Uni Koeln, 2005-2015

set -x
err=0

owner=$1;shift
Expand All @@ -16,7 +17,10 @@ for f in $* ;do
$ROOTCMD dpkg-statoverride --list | grep -q " $f"
if [ "$?" -eq 1 ]; then
echo "Overriding owner and mode: $owner $group $mode $f"
$ROOTCMD dpkg-statoverride --update --add $owner $group $mode $f && err=1
$ROOTCMD dpkg-statoverride --update --add $owner $group $mode $f
if [ $? -ne 0 ]; then
err=1
fi
fi
done

Expand Down

0 comments on commit 97b3c2f

Please sign in to comment.