25-locales: make sure the localepurge package exists, not only the binary.
authorMichael Prokop <mika@grml.org>
Thu, 18 Aug 2011 16:33:55 +0000 (18:33 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 18 Aug 2011 16:33:57 +0000 (18:33 +0200)
localepurge might be a left-over of a removed package (brrr)
and might no longer exist as a package, therefore make the
check more reliable.

etc/grml/fai/config/scripts/GRMLBASE/25-locales

index 9987614..fc5fb3d 100755 (executable)
@@ -38,7 +38,7 @@ fi
 # make sure:
 # localepurge     localepurge/nopurge     multiselect ....
 # is set so localepurge works as expected
-if [ -x $target/usr/sbin/localepurge ] ; then
+if $ROOTCMD dpkg --list localepurge >/dev/null 2>&1 ; then
    $ROOTCMD dpkg-reconfigure -f noninteractive localepurge
 fi