90-update-alternatives: activate wm-ng only if it is registered as x-window-manager
authorMichael Prokop <mika@grml.org>
Mon, 10 Aug 2009 11:12:27 +0000 (13:12 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 10 Aug 2009 11:12:27 +0000 (13:12 +0200)
etc/grml/fai/config/scripts/GRMLBASE/90-update-alternatives

index 234e56a..67f0998 100755 (executable)
@@ -51,7 +51,10 @@ if [ -r $target/usr/bin/w3m ] ; then
 fi
 
 if [ -r $target/usr/bin/wm-ng ] ; then
-   $ROOTCMD update-alternatives --set x-window-manager /usr/bin/wm-ng
+   # activate wm-ng only if it is registered as x-window-manager:
+   if update-alternatives --list x-window-manager | grep -q wm-ng ; then
+     $ROOTCMD update-alternatives --set x-window-manager /usr/bin/wm-ng
+   fi
 fi
 
 ## END OF FILE #################################################################