From 291fdcb4a79c04def0d56972a6da9e26aa7cd367 Mon Sep 17 00:00:00 2001 From: Nico Dietrich Date: Tue, 4 Apr 2006 17:16:07 +0000 Subject: fix gdm, kdm in debian, ubuntu git-svn-id: http://svn.openslx.org/svn/openslx/ld4@152 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/distro-specs/ubuntu/config-5.10 | 3 +- initrd/distro-specs/ubuntu/functions-5.10 | 58 +++++++++++++++---------------- 2 files changed, 30 insertions(+), 31 deletions(-) (limited to 'initrd/distro-specs/ubuntu') diff --git a/initrd/distro-specs/ubuntu/config-5.10 b/initrd/distro-specs/ubuntu/config-5.10 index d81ce635..a4110833 100644 --- a/initrd/distro-specs/ubuntu/config-5.10 +++ b/initrd/distro-specs/ubuntu/config-5.10 @@ -43,7 +43,8 @@ D_BINDMNT="# " D_INITDIR="/init.d" D_INITBOOTD="/rcS.d" D_RCDIRS="/rc0.d /rc1.d /rc2.d /rc3.d /rc4.d /rc5.d /rc6.d" -D_INITSCRIPTS="mountvirtfs udev procps.sh bootlogd keymap.sh hwclock.sh sudo dbus gdm" +D_INITDEFAULT="3" +D_INITSCRIPTS="mountvirtfs udev procps.sh bootlogd boot.ld hwclock.sh sudo dbus" D_XF86CONFFILE="/etc/X11/xorg.conf" D_XFONTPATH="/usr/share/fonts/*" D_DEFAULTCOUNTRY="de" diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index 2ae3f191..4aa74e8f 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -28,22 +28,23 @@ postinit () { # distro specific function called from servconfig script config_distro () { # add the halt link to the 0 and 6 runlevel directories -# fixmee!! check ... -# ln -sf ../halt /mnt/etc/rc0.d/S90halt -# ln -sf ../halt /mnt/etc/rc6.d/S90reboot - : + ln -sf ../halt /mnt/etc/rc0.d/S90halt + ln -sf ../reboot /mnt/etc/rc6.d/S90reboot + + # set default runlevel + sed -e "s/.*initdefault/id:${D_INITDEFAULT}:initdefault/" -i /mnt/etc/inittab } # AUS SuSE-9.3 # udev/hotplug - auto device discovery service udev_hotplug () { -local result=0 -[ -d /etc/hotplug -a -d /etc/hotplug.d ] || error " Hotplug subdirectory \ -is missing! udev(d) might not work as expected." nonfatal -echo "Enabling hotplug/udev" -udevstart || result=1 -udevd -d || result=1 -return $result + local result=0 + [ -d /etc/hotplug -a -d /etc/hotplug.d ] || error " Hotplug subdirectory \ + is missing! udev(d) might not work as expected." nonfatal + echo "Enabling hotplug/udev" + udevstart || result=1 + udevd -d || result=1 + return $result } ## udev service @@ -69,8 +70,8 @@ local start="$2" local stop="$3" # empty runlevel links - decision on running certain services is # passed via configuration -for i in rc3.d/K$stop$script rc5.d/K$stop$script \ - rc3.d/S$start$script rc5.d/S$start$script ; do +for i in rc2.d/K$stop$script rc3.d/K$stop$script \ + rc2.d/S$start$script rc3.d/S$start$script ; do if ! [ -f ../$script ]; then echo "Target `pwd`../$script does not exist. Skipping links" break @@ -155,20 +156,6 @@ if [ "x$start_snmp" = "xyes" ] ; then fi } -# configure display manager (runlevel links and kind of manager) -config_dm () { - # should be stated that entries were made (fixmee how??) - #sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \ - # -e "s,.*_XSERVER.*,DISPLAYMANAGER_STARTS_XSERVER=\"$dsx\"," \ - # /mnt/etc/sysconfig/displaymanager > /etc/displaymanager - #cp /etc/displaymanager /mnt/etc/sysconfig/displaymanager - # fixme - different runlevel scripts for diff. displaymanager?? - echo -e "\t/etc/init.d/xdm start >${LOGFILE} 2>&1\n" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - ln -sf /etc/init.d/xdm /mnt/etc/init.d/rc5.d/S01xdm - ln -sf /etc/init.d/xdm /mnt/etc/init.d/rc5.d/K20xdm -} - # consolefont consolefont () { echo -e "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \ @@ -187,13 +174,24 @@ config_xdm () { # configure gdm as display manager config_gdm () { - : -# do not forget to add the $vmsessions (see SuSE config) + # start the display manager as early as possible, but avoid that is + # started twice during bootup - quickhack ... + #ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm + ln -sf ../gdm /mnt/etc/${D_INITDIR}/rc3.d/K20gdm + echo -e "\t/etc/${D_INITDIR}/gdm start >${LOGFILE} 2>&1\n\ + \t( sleep 120; ln -sf ../gdm /etc/${D_INITDIR}/rc3.d/S01gdm \ + >${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld + # append gdm user + echo "gdm:x:113:">>/etc/group + echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" >>/etc/passwd } # configure kdm as display manager config_kdm () { - : + ln -sf ../kdm /mnt/etc/${D_INITDIR}/rc3.d/K20kdm + echo -e "\t/etc/${D_INITDIR}/kdm start >${LOGFILE} 2>&1\n\ + \t( sleep 120; ln -sf ../gdm /etc/${D_INITDIR}/rc3.d/S01kdm \ + >${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld } # configure hal, dbus, resmgr and services like that -- cgit v1.2.3-55-g7522