summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin/hwautocfg
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/initrd-stuff/bin/hwautocfg')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg57
1 files changed, 33 insertions, 24 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index bc9ffd11..cfd2c74a 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -240,14 +240,6 @@ pci/agp bus needed for acceleration." ; }
esac
echo -e "EndSection\n" >>$xfc
done
-# only if X is link itself (normally to /var/X11R6/bin/X) check!!
-link=`ls -l /mnt/usr/X11R6/bin/X 2>/dev/null`
-if strinstr "/var/X11R6" "$link" ; then
- testmkd /mnt/var/X11R6/bin
- for i in /usr/X11R6/bin/Xorg /usr/X11R6/bin/XFree86 ; do
- [ -e "/mnt/$i" ] && { ln -sf $i /mnt/var/X11R6/bin/X; break; }
- done
-fi
}
#######################################################################
@@ -412,12 +404,31 @@ data via dhcp until now ..." nonfatal
waitfor /tmp/ldap-done 10000 || error " Did not get any configuration \
data via ldap until now ..." nonfatal
. /etc/machine-setup
+
+# postpone some commands into normal bootup environment
+echo -e "\t# entries added by $0: $date" >> /etc/boot.ld
+# run localizator and configure keyboard and console fonts
+DEFKEYTABLE="de-latin1-nodeadkeys"
+localization $country
+if [ -z "${KEYTABLE}" ] ; then
+ msg "Keyboard setup" "No settings found for keyboard, using default of \
+'${DEFKEYTABLE}' defined\nin $0."
+ KEYTABLE=${DEFKEYTABLE}
+fi
+echo -e "\tloadkeys -q ${KEYTABLE}" >> /etc/boot.ld
+
+# run X11 / Xorg configurator
+. /etc/sysconfig/xserver >/dev/null 2>&1 || error " The xserver \
+configuration file generated by hwsetup could not\n be found." nonfatal
+( displaysetup /etc/xorg.conf; echo "ready" > /tmp/xready ) &
+
# wait for completion of clients root filesystem in /mnt
waitfor /tmp/fscmpl 40000
-# postpone some commands into normal bootup environment
-echo -e "\t# entry added by $0: $date" \
- >>/mnt/etc/${D_INITDIR}/boot.ld
+# add entries to boot.ld
+cat /etc/boot.ld >> /mnt/etc/${D_INITDIR}/boot.ld
+[ -n "${CONSOLE_FONT}" ] && consolefont
+
# get idea of availabe harddisk partitions, put swap partitions into
# (/mnt)/etc/fstab and format and mount partitions of type 44 (unknown)
for hd in $(cat /tmp/hwsetup.info|sed -n -e '/HD$/,/device:/p'| \
@@ -448,19 +459,17 @@ done
# determine if tmp preparation should wait for format/mount or not
[ -z "$part44" ] && echo "finished" > /tmp/tmpready
-# run localizator and configure keyboard and console fonts
-DEFKEYTABLE="de-latin1-nodeadkeys"
-localization $country
-if [ -z "${KEYTABLE}" ] ; then
- msg "Keyboard setup" "No settings found for keyboard, using default of \
-'${DEFKEYTABLE}' defined\nin $0."
- KEYTABLE=${DEFKEYTABLE}
+# finalize X configuration
+# only if X is link itself (normally to /var/X11R6/bin/X) check!!
+link=`ls -l /mnt/usr/X11R6/bin/X 2>/dev/null`
+if strinstr "/var/X11R6" "$link" ; then
+ testmkd /mnt/var/X11R6/bin
+ for i in /usr/X11R6/bin/Xorg /usr/X11R6/bin/XFree86 ; do
+ [ -e "/mnt/$i" ] && { ln -sf $i /mnt/var/X11R6/bin/X; break; }
+ done
fi
-echo -e "\tloadkeys -q ${KEYTABLE}\n" >>/mnt/etc/${D_INITDIR}/boot.ld
-[ -n "${CONSOLE_FONT}" ] && consolefont
-# run X11 / Xorg configurator
-. /etc/sysconfig/xserver >/dev/null 2>&1 || error " The xserver \
-configuration file generated by hwsetup could not\n be found." nonfatal
-displaysetup ${D_XF86CONFFILE}
+# wait for completion of Xorg configuration
+waitfor /tmp/xready 1000
+cp /etc/xorg.conf ${D_XF86CONFFILE}
echo "finished" > /tmp/hwcfg