summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-07-14 15:46:44 +0200
committerDirk von Suchodoletz2007-07-14 15:46:44 +0200
commit32e8ef9f9794a1a9747673523b7c9e74bba1295c (patch)
tree2cb3f26f77572cd2de5a68004e0ad8af9aaf8f0c /initramfs
parentFixes for gdm/kdm configuration in Ubuntu. Cleanup of functions-7.04 (unneeded (diff)
downloadcore-32e8ef9f9794a1a9747673523b7c9e74bba1295c.tar.gz
core-32e8ef9f9794a1a9747673523b7c9e74bba1295c.tar.xz
core-32e8ef9f9794a1a9747673523b7c9e74bba1295c.zip
Removed late_dm option (too confusing and too little effect), small fix
for Ubuntu functions-default, added "binfinder" function. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1242 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r--initramfs/distro-specs/debian/functions-default27
-rw-r--r--initramfs/distro-specs/gentoo/functions-default7
-rw-r--r--initramfs/distro-specs/suse/functions-default17
-rw-r--r--initramfs/distro-specs/ubuntu/functions-default4
-rw-r--r--initramfs/initrd-stuff/etc/functions18
5 files changed, 37 insertions, 36 deletions
diff --git a/initramfs/distro-specs/debian/functions-default b/initramfs/distro-specs/debian/functions-default
index e5454861..4af35da2 100644
--- a/initramfs/distro-specs/debian/functions-default
+++ b/initramfs/distro-specs/debian/functions-default
@@ -193,28 +193,25 @@ sed -e "s,LANG=.*,LANG=\"${LANG}\" # set within initramfs," \
# configure gdm as display manager
config_gdm () {
ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc3.d/K20gdm
-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 120; 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
+# check for gdm user in passwd file and add it if not present
+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
- # check for gdm user in passwd and group files
- # fixme!!
-# echo "gdm:x:113:">>/mnt/etc/group
-# echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \
-# >>/mnt/etc/passwd
+# fixme: any directory with certain permissions needed?
+# 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
}
# configure kdm as display manager
config_kdm () {
# first define directories for kdm
-kdmrcdir=/etc/kde3/kdm
-xdmdir=/etc/kde3/kdm
-
+local kdmrcdir=/etc/kde3/kdm
+local xdmdir=/etc/kde3/kdm
testmkd /mnt/${kdmrcdir}
-
ln -sf ../${D_INITDIR}/kdm /mnt/etc/rc3.d/K20kdm
ln -sf ../${D_INITDIR}/kdm /mnt/etc/rc3.d/S20kdm
diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default
index 6e1d45e1..edbcf0c1 100644
--- a/initramfs/distro-specs/gentoo/functions-default
+++ b/initramfs/distro-specs/gentoo/functions-default
@@ -239,12 +239,7 @@ config_dm_entry () {
local displmng=$1
if [ -f /mnt/etc/${D_INITDIR}/xdm ] ; then
config_rc_entry "DISPLAYMANAGER" "${displmng}"
- if [ "x$late_dm" = "xyes" ] ; then
- rllinker xdm
- else
- D_INITSCRIPTS="${D_INITSCRIPTS} ${displmng}"
- rllinker xdm "${lastinit}"
- fi
+ rllinker xdm
else
error "" nonfatal
fi
diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default
index 41dfa5a4..6ae7b376 100644
--- a/initramfs/distro-specs/suse/functions-default
+++ b/initramfs/distro-specs/suse/functions-default
@@ -229,19 +229,10 @@ local dm="$1"
sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"$start_xdmcp\"," \
-e "s,.*_XSERVER.*,DISPLAYMANAGER_STARTS_XSERVER=\"$dm\"," \
-i /mnt/etc/${D_SYSCONFDIR}/displaymanager
-# start the display manager as early as possible, but avoid that it is
-# started twice during bootup ... late_dm can postpone the start of
-# displaymanager and X if problems with keyboard, console occur ...
-# might be connected to running startup scripts in parallel, see above ...
-if [ "x$late_dm" = "xno" ] ; then
- ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITBOOTD}/S12boot.xdm
- echo -e "\t(sleep 60; ln -sf ../xdm /etc/${D_INITDIR}/rc5.d/S01xdm; \
- rm /etc/${D_INITBOOTD}/S12boot.xdm) &\n" >>/mnt/etc/${D_INITDIR}/boot.slx
-else
- ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm
- ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/K18xdm
- sed -e "s,xdm: .*,xdm:," -i /mnt/etc/${D_INITDIR}/.depend.start
-fi
+# start the display manager as early as possible in runlevel 5
+ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/S01xdm
+ln -sf /etc/${D_INITDIR}/xdm /mnt/etc/${D_INITDIR}/rc5.d/K18xdm
+sed -e "s,xdm: .*,xdm:," -i /mnt/etc/${D_INITDIR}/.depend.start
}
# configure X display manager (runlevel links and kind of manager)
config_xdm () {
diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default
index 5f4a1edf..f02d8778 100644
--- a/initramfs/distro-specs/ubuntu/functions-default
+++ b/initramfs/distro-specs/ubuntu/functions-default
@@ -207,8 +207,8 @@ if ! grep "gdm:" /etc/passwd >/dev/null 2>&1; then
>>/mnt/etc/passwd
fi
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
+echo -e "\tchown gdm:gdm /var/lib/gdm/.fontconfig\n\tchown root:gdm \
+/var/lib/gdm\n" >>/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\
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index 543b1887..1690b03b 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -195,6 +195,24 @@ else
fi
}
#############################################################################
+# replacement for which command to find executables inside stage4 rootfs
+binfinder()
+{
+local program="$1"
+local s4path
+local notfound=1
+for s4path in bin sbin usr/bin usr/sbin usr/local/bin \
+ usr/local/sbin usr/bin/X11; do
+ if [ -f "/mnt/$s4path/$program" ] && \
+ [ -x "/mnt/$s4path/$program" ]; then
+ printf '%s\n' "/$s4path/$program"
+ notfound=0
+ break
+ fi
+done
+return $notfound
+}
+#############################################################################
# disk formatter and mounter. some proper error message output should be
# added
diskfm () {