# HG changeset patch # User Christophe Lincoln # Date 1206104151 -3600 # Node ID eb339fcb32004e28b7d557555721a40cad74b150 # Parent 31837608fcdf555bd5de06d30da8dda3d28a1210 Manage default WM using /etc/X11/wm.default diff -r 31837608fcdf -r eb339fcb3200 etc/init.d/bootopts.sh --- a/etc/init.d/bootopts.sh Fri Mar 21 12:32:40 2008 +0000 +++ b/etc/init.d/bootopts.sh Fri Mar 21 13:55:51 2008 +0100 @@ -102,3 +102,23 @@ modprobe ac modprobe battery fi + +# Check for a Window Manager (for a flavor, default WM can be changed +# with boot option or with an addfile in /etc/X11/wm.default. +if grep -q "wm=" /proc/cmdline; then + mkdir -p /etc/X11 + WM=`cat /proc/cmdline | sed 's/.*wm=\([^ ]*\).*/\1/'` + case $WM in + jwm) + echo "jwm" > /etc/X11/wm.default ;; + ob|openbox|openbox-session) + echo "openbox" > /etc/X11/wm.default ;; + e17|enlightenment|enlightenment_start) + echo "enlightenment" > /etc/X11/wm.default ;; + esac +else + # If no default WM fallback to JWM. + if [ ! -f /etc/X11/wm.default ]; then + echo "jwm" > /etc/X11/wm.default + fi +fi diff -r 31837608fcdf -r eb339fcb3200 etc/init.d/hwconf.sh --- a/etc/init.d/hwconf.sh Fri Mar 21 12:32:40 2008 +0000 +++ b/etc/init.d/hwconf.sh Fri Mar 21 13:55:51 2008 +0100 @@ -66,9 +66,9 @@ sed -i s/'slim'/''/ /etc/rcS.conf status else - tazx + tazx `cat /etc/X11/wm.default` fi else - tazx + tazx `cat /etc/X11/wm.default` fi fi