From adf956f1687b3e277b0ed35e48547b2ab1d7f70c Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 14 Jul 2007 13:11:12 +0000 Subject: Fixes for gdm/kdm configuration in Ubuntu. Cleanup of functions-7.04 (unneeded duplicate of default) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1241 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/distro-specs/ubuntu/functions-default | 53 +++++++++++++------------ 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'initramfs/distro-specs/ubuntu/functions-default') diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default index 52705a5d..5f4a1edf 100644 --- a/initramfs/distro-specs/ubuntu/functions-default +++ b/initramfs/distro-specs/ubuntu/functions-default @@ -191,19 +191,24 @@ config_acpi () { config_gdm () { ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc3.d/K20gdm if [ "x$start_xdmcp" = "xgdm" ]; then - echo /usr/sbin/gdm > /mnt/etc/X11/default-display-manager + # configure fallback if no gdm binary present + if ! binfinder gdm; then + config_kdm + # error "" nonfatal + else + echo $(binfinder gdm) > /mnt/etc/X11/default-display-manager + fi fi -if [ "x$late_dm" = "xyes" ] ; then - ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc3.d/S01gdm -else - echo -e "\t/etc/${D_INITDIR}/gdm start >${LOGFILE} 2>&1\n\ - \t( sleep 60; ln -sf /etc/${D_INITDIR}/gdm /etc/rc3.d/S01gdm \ - >${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.slx +ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc3.d/S01gdm +# append gdm user; check for presence first +if ! grep "gdm:" /etc/passwd >/dev/null 2>&1; then + echo "gdm:x:113:" >>/mnt/etc/group + echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \ + >>/mnt/etc/passwd fi -# append gdm user -echo "gdm:x:113:">>/etc/group -echo "gdm:x:106:113:Gnome Display Manager" >> /etc/shadow - +testmkd /mnt/var/lib/gdm/.fontconfig +echo -e "\tchown gdm:gdm /var/lib/gdm/.fontconfig\n\t\chown root:gdm \ +/var/lib/gdm" >> /mnt/etc/${D_INITDIR}/boot.slx # fixme: check if a gdm.conf was provided via ConfTGZ # [ -f /rootfs/etc/gdm/gdm.conf ??? ] || \ echo -e "# /etc/gdm/gdm.conf - file generated by $0\n\ @@ -318,21 +323,17 @@ config_kdm () { # first define directories for kdm kdmrcdir=/etc/kde3/kdm xdmdir=/etc/kde3/kdm - testmkd /mnt/${kdmrcdir} - -#if [ "x$late_dm" = "xyes" ] ; then - rllinker "kdm" 25 1 - if [ "x$start_xdmcp" = "xkdm" ]; then - echo /usr/bin/kdm > /mnt/etc/X11/default-display-manager - fi -#else -# ln -sf ../${D_INITDIR}/kdm /mnt/etc/rc3.d/K20kdm -# echo -e "\t/etc/${D_INITDIR}/kdm start >${LOGFILE} 2>&1\n\ -# \t( sleep 120; ln -sf /etc/${D_INITDIR}/kdm /etc/rc3.d/S01kdm \ -# >${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.slx -#fi - +rllinker "kdm" 25 1 +if [ "x$start_xdmcp" = "xkdm" ]; then + # configure fallback if no kdm binary is present + if ! binfinder kdm; then + config_gdm + # error "kdm configured but bin not found" nonfatal + else + echo $(binfinder kdm) >/mnt/etc/X11/default-display-manager + fi +fi # write configuration file # use general config in /etc/functions config_kdm_template @@ -359,7 +360,7 @@ case "$switch" in from $0\n# after you applied changes to the creation scripts you have to \ rerun\n# the mkdxsinitrd script to get them applied\n\n\ . /lib/lsb/init-functions\n" >/mnt/etc/${D_INITDIR}/$name - echo -e "\n\ncase \"\$1\" in\n start)\n\tlog_begin_msg \"* $info\"" \ + echo -e "\n\ncase \"\$1\" in\n start)\n\tlog_begin_msg \"$info\"" \ >>/mnt/etc/${D_INITDIR}/$name chmod u+x /mnt/etc/${D_INITDIR}/$name ;; -- cgit v1.2.3-55-g7522