summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/displaymanager/XX_displaymanager.sh
blob: aa064ebec2375cfe59539e328cb606788d78cccb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /bin/sh
#
# stage3 part of 'displaymanager' plugin - the runlevel script
#
. /etc/functions
. /etc/distro-functions
. /etc/sysconfig/config
if [ -e /initramfs/plugin-conf/displaymanager.conf ]; then
	. /initramfs/plugin-conf/displaymanager.conf
	if [ $displaymanager_active -ne 0 ]; then
		[ $DEBUGLEVEL -gt 0 ] && echo "executing the 'displaymanager' os-plugin ...";
	
		testmkd /mnt/var/lib/openslx/themes
                testmkd /mnt/var/lib/openslx/config

                if [ -d /usr/share/config/gdm ]; then
                        cp /usr/share/config/gdm.conf /mnt/etc/gdm/gdm.conf
                        cp -a /usr/share/themes/displaymanager/gdm /mnt/var/lib/openslx/themes
                        sed -i "s,^\(GraphicalThemeDir=.*\)$,#\1 \nGraphicalThemeDir=/var/lib/openslx/themes," \
                                /mnt/etc/gdm/gdm.conf
                        sed -i "s,^\(GraphicalTheme=.*\)$,#\1 \nGraphicalTheme=gdm," /mnt/etc/gdm/gdm.conf
                fi

                if [ -d /usr/share/config/gdm ]; then
                        cp /usr/share/config/kdmrc /mnt/${D_KDMRCPATH}
                        cp -a /usr/share/themes/displaymanager/kdm /mnt/var/lib/openslx/themes
                        sed -i "s,UseTheme=.*,UseTheme=true," /mnt/${D_KDMRCPATH}/kdmrc
                fi

		[ $DEBUGLEVEL -gt 0 ] && echo "done with 'displaymanager' os-plugin ...";

        fi
fi