rev 5086 - trunk/packages/kdebase/debian
Fathi Boudra
fboudra-guest at alioth.debian.org
Thu Dec 7 10:23:09 CET 2006
Author: fboudra-guest
Date: 2006-12-07 10:23:09 +0100 (Thu, 07 Dec 2006)
New Revision: 5086
Modified:
trunk/packages/kdebase/debian/changelog
trunk/packages/kdebase/debian/kdm.init
Log:
Add kdm customization support
Modified: trunk/packages/kdebase/debian/changelog
===================================================================
--- trunk/packages/kdebase/debian/changelog 2006-12-06 21:00:50 UTC (rev 5085)
+++ trunk/packages/kdebase/debian/changelog 2006-12-07 09:23:09 UTC (rev 5086)
@@ -5,6 +5,7 @@
* debian-kde_default.png.desktop
* 21_default_background_image.diff.uu
* 22_default_backgrounds.diff
+ * Add kdm customization support.
+++ Changes by Sune Vuorela
* Add kdelibs-dbg to kdebase-dbg dependencies
Modified: trunk/packages/kdebase/debian/kdm.init
===================================================================
--- trunk/packages/kdebase/debian/kdm.init 2006-12-06 21:00:50 UTC (rev 5085)
+++ trunk/packages/kdebase/debian/kdm.init 2006-12-07 09:23:09 UTC (rev 5086)
@@ -27,12 +27,53 @@
PIDFILE=/var/run/kdm.pid
UPGRADEFILE=/var/run/kdm.upgrade
+# parameters to support kdm customization
+KDMRC=/etc/kde3/kdm/kdmrc
+BACKGROUNDRC=/etc/kde3/kdm/backgroundrc
+KDMOVERRIDEDIR=/etc/kdm.d
+KDMCFGDIR=/var/run/kdm
+KDMCFG=$KDMCFGDIR/kdmrc
+
+# initialize with default values
+USEBACKGROUND=`grep '^UseBackground=' $KDMRC | cut -f2 -d '='`
+BACKGROUNDCFG=$KDMCFGDIR/backgroundrc
+USETHEME=`grep '^UseTheme=' $KDMRC | cut -f2 -d '='`
+THEME=`grep '^Theme=' $KDMRC | cut -f2 -d '='`
+WALLPAPER=`grep -m1 '^Wallpaper=' $BACKGROUNDRC | cut -f2 -d '='`
+
test -x $DAEMON || exit 0
# uncomment, if you want auto-logon to be runlevel-dependant
#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; }
#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog
+# uncomment, if you want tons of debug info in your syslog
+#ARG="$ARG -debug 255"
+
+# we use an alternative kdm master configuration file
+ARG="$ARG -config $KDMCFG"
+
+# we source overrides. run-parts sorts the list in a predictable order
+if [ -d "$KDMOVERRIDEDIR" ]; then
+ for part in $(run-parts --list "$KDMOVERRIDEDIR" 2>/dev/null || true); do
+ . "$part"
+ done
+fi
+
+# we generate kdm configuration files
+genkdmconf --in $KDMCFGDIR 1> /dev/null
+
+# we update kdm configuration files
+sed -i "s|^UseBackground=.*|UseBackground=$USEBACKGROUND|" $KDMCFG
+sed -i "s|^BackgroundCfg=.*|BackgroundCfg=$BACKGROUNDCFG|" $KDMCFG
+sed -i "s|^UseTheme=.*|UseTheme=$USETHEME|" $KDMCFG
+sed -i "s|^Theme=.*|Theme=$THEME|" $KDMCFG
+sed -i "s|^Wallpaper=.*|Wallpaper=$WALLPAPER|" $BACKGROUNDCFG
+
+# uncomment, if you want auto-logon to be runlevel-dependant
+#test "$runlevel" || { runlevel=`runlevel`; runlevel=${runlevel#* }; }
+#test "$runlevel" = 4 && ARG=-autolog || ARG=-noautolog
+
# uncomment, if you want tons of debug info in your syslog
#ARG="$ARG -debug 255"
More information about the pkg-kde-commits
mailing list