GRMLBASE/25-locales: fix check for presence of localepurge
authorMichael Prokop <mika@grml.org>
Wed, 11 Jan 2012 11:37:35 +0000 (12:37 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 11 Jan 2012 11:37:37 +0000 (12:37 +0100)
It's not enough to check just for the *availability* of the
package but of course we need to actually check whether
localepurge is *installed*.

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

index fc5fb3d..6dc4d66 100755 (executable)
@@ -38,7 +38,7 @@ fi
 # make sure:
 # localepurge     localepurge/nopurge     multiselect ....
 # is set so localepurge works as expected
-if $ROOTCMD dpkg --list localepurge >/dev/null 2>&1 ; then
+if $ROOTCMD dpkg --list localepurge 2>&1 | grep -q '^ii' ; then
    $ROOTCMD dpkg-reconfigure -f noninteractive localepurge
 fi