On 29.10.2012, at 16:08, Guillaume Gardet wrote:
Le 29/10/2012 15:59, Alexander Graf a écrit :
On 29.10.2012, at 15:30,
wrote: home:Guillaume_G:branches:openSUSE:12.2:ARM/JeOS -> openSUSE:12.2:ARM/JeOS
https://build.opensuse.org/request/show/139673
Description: * Fix /etc/sysconfig/windowmanager hack to get XFCE as default * Boot in runlevel 5 (gfx mode) instead of 3 (default)
++++++ config.sh --- config.sh +++ config.sh @@ -88,8 +88,26 @@ #-------------------------------------- # XXX only do for XFCE image types if [ -e /etc/sysconfig/displaymanager ]; then - sed -i 's/^DISPLAYMANAGER=.*/DISPLAYMANAGER="lightdm"' /etc/sysconfig/displaymanager - sed -i 's/^DEFAULT_WM=.*/DEFAULT_WM="xfce"' /etc/sysconfig/windowmanager + baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER lightdm +# baseUpdateSysConfig is working only on existing vars and DEFAULT_WM is not always defined, so test if exist
In which case is it not defined? Can we assume that any case we care about it is defined? If so, we can just shove it into another if [ -e /etc/sysconfig/windowmanager ] && ! grep -q DEFAULT_WM /etc/sysconfig/windowsmanager; then ... block
In our case it is _not_ defined. On my host x86 computer it is defined (with kde4).
Would be interesting to find out who wrote it there.
+ grep_result=$(grep DEFAULT_WM /etc/sysconfig/windowmanager) + if [ "$grep_result" == "" ]; then + echo ' Better use the EOF variant used in other spots in this file. I'm not sure we really need this path though. Please verify.
We need to define DEFAULT_WM since it is not defined in our case.
So it's never defined? Unconditionally cat the file into place then :).
+## Path: Desktop/Window manager +## Description: +## Type: string(gnome,kde4,kde,lxde,xfce,twm,icewm) +## Default: xfce +## Config: profiles,kde,susewm +# +# Here you can set the default window manager (kde, fvwm, ...) +# changes here require at least a re-login +DEFAULT_WM="xfce"' >> /etc/sysconfig/windowmanager + else + baseUpdateSysConfig /etc/sysconfig/windowmanager DEFAULT_WM xfce + fi +# We want to start in gfx mode Wrong indent :)
+ baseSetRunlevel 5 + suseConfig Do we need this really?
runlevel 5 is needed to boot in gfx mode.
Yes, that part is clear :).
For suseConfig, I guess we need to call it to update all settings?
I don't think we need to call suseConfig. All the bits should take their runtime configuration from the sysconfig files we modify above. Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org