File SuSEconfig.wdm of Package wdm

#!/bin/bash
# Copyright (c) 1998 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
# please send bugfixes or comments to feedback@suse.de.

#
# check if we are started as root
# only one of UID and USER must be set correctly
#
if test "$UID" != 0 -a "$USER" != root; then
  echo "ERROR: You must be root to start $0."
  exit 1
fi
    
#
# source /etc/sysconfig/language
#
test -f /etc/sysconfig/language && . /etc/sysconfig/language

r=$ROOT

#
# load SuSEconfig functions
#
if test ! -f $r/lib/YaST/SuSEconfig.functions; then
  echo "ERROR: Can not find needed $r/lib/YaST/SuSEconfig.functions - exiting"
  exit 1
fi
. $r/lib/YaST/SuSEconfig.functions
    

#
# source /etc/profile to get $WINDOWMANAGER
#
test -f $r/etc/profile && . $r/etc/profile

#
# Check path (paranoid?)
#
type -p wmlist > /dev/null 2>&1 || PATH=$PATH:$r/usr/X11R6/bin

	
#
# create new wmlist
#
WMLIST=`grep -h ^Exec= /usr/share/xsessions/*.desktop`
WMLIST=`for wm in $WMLIST; do echo -n ${wm#Exec=}:; done `
WMLIST="${WMLIST%%:}"


WDMCONFIG=/etc/X11/wdm/wdm-config
XDMCONFIG=/etc/X11/xdm/xdm-config

# update wdm-config
cat >$r$WDMCONFIG.SuSEconfig <<EOT 
! This is wdm-config file generated by SuSEconfig
! 
! Following part is taken from xdm-config:
!==============================================================================
EOT

cat $r$XDMCONFIG >>$r$WDMCONFIG.SuSEconfig

cat >>$r$WDMCONFIG.SuSEconfig <<EOT 
!==============================================================================
! 
! Following part contains wdm specific options and is taken from wdm-config.in:
!==============================================================================
EOT
sed -e "s|Geeko\.xpm|SUSE.png|" $r$WDMCONFIG.in >>$r$WDMCONFIG.SuSEconfig

cat >>$r$WDMCONFIG.SuSEconfig <<EOT 
!==============================================================================
!
! Following part is generated by SuSEconfig:
!==============================================================================

DisplayManager*wdmWm:           $WMLIST
DisplayManager*wdmLocale:       $RC_LANG

EOT

check_md5_and_move $r$WDMCONFIG

exit 0

openSUSE Build Service is sponsored by