diff options
author | Dirk von Suchodoletz | 2007-07-14 15:11:12 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-07-14 15:11:12 +0200 |
commit | adf956f1687b3e277b0ed35e48547b2ab1d7f70c (patch) | |
tree | b2e6e0984760848b8ca24fe83532f66138178a19 /initramfs/distro-specs/ubuntu/functions-default | |
parent | deleted dhcpgen.conf File (diff) | |
download | core-adf956f1687b3e277b0ed35e48547b2ab1d7f70c.tar.gz core-adf956f1687b3e277b0ed35e48547b2ab1d7f70c.tar.xz core-adf956f1687b3e277b0ed35e48547b2ab1d7f70c.zip |
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
Diffstat (limited to 'initramfs/distro-specs/ubuntu/functions-default')
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-default | 53 |
1 files changed, 27 insertions, 26 deletions
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 ;; |