Skip to content

Commit

Permalink
98-clean-chroot: check existence of updatedb binary via $ROOTCMD.
Browse files Browse the repository at this point in the history
/usr/bin/updatedb might point to /etc/alternatives/updatedb which
points to another updatedb binary. When testing for precense of
/usr/bin/updatedb the test might fail because test(1) dereferences
symbolic links. So make sure to check existence of updatedb
binary inside $target using $ROOTCMD.
  • Loading branch information
mika committed Jul 10, 2011
1 parent 1d6dbfb commit 4a05b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot
Expand Up @@ -198,7 +198,7 @@ else
EOF
fi

if ! [ -x $target/usr/bin/updatedb ] ; then
if ! $ROOTCMD test -x /usr/bin/updatedb ; then
echo "Warning: updatedb not installed"
else
echo "Updating locate-database"
Expand Down

0 comments on commit 4a05b54

Please sign in to comment.