summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin/hwautocfg
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-01-19 00:35:53 +0100
committerDirk von Suchodoletz2006-01-19 00:35:53 +0100
commit1076a92a812b6ee88ef9c50d9a1edc071f145ee4 (patch)
tree51e8af31bde3001b307f9b6cfbcb363c5370b48c /initrd/initrd-stuff/bin/hwautocfg
parentHässlichen Bug bei dhclient IP Konfig. beseitig. Etliche Services (diff)
downloadcore-1076a92a812b6ee88ef9c50d9a1edc071f145ee4.tar.gz
core-1076a92a812b6ee88ef9c50d9a1edc071f145ee4.tar.xz
core-1076a92a812b6ee88ef9c50d9a1edc071f145ee4.zip
Hardware-Erkennung erweitert (erste Basics für CD und HD, Quickhack für
USB-Maus). Kleinere Fixes in Timings der Parallelisierung ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@19 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin/hwautocfg')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg47
1 files changed, 34 insertions, 13 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 52bf3d0c..a1f6f5de 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -82,11 +82,11 @@ local Modelines='
\tModeline "lcd1280x1024" 108.00 1280 1328 1440 1688 1024 1025 1028 1066\n
\tModeline "lcd1400x1050" 160.00 1400 1472 1672 1880 1050 1052 1055 1100'
local Device='\tIdentifier\t"StdGraphics"\n
-\tVendorName\t\t"XDESC"\n
+\tVendorName\t"XDESC"\n
\tDriver\t\t"XMODULE"'
local Screen='\tIdentifier\t"Screen 1"\n
-\tDevice\t"StdGraphics"\n
-\tMonitor\t"Default"\n
+\tDevice\t\t"StdGraphics"\n
+\tMonitor\t\t"Default"\n
\tDefaultColorDepth CDP'
local ServerLayout='\tIdentifier\t"Simple Layout"\n
\tScreen\t"Screen 1"\n
@@ -258,7 +258,20 @@ fi
. /etc/sysconfig/config
. /etc/distro-functions
-( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/completed ) &
+# set X11 configuration file
+if [ -n "${XF86CONFFILE}" ] ; then
+ XF86CONFFILE="/mnt/${XF86CONFFILE}"
+else
+ XF86CONFFILE="/mnt/etc/X11/xorg.conf"
+ error " You should define the variable XF86CONFFILE in yours distro \
+configuration\n file" nonfatal
+fi
+
+# USB core is needed for presence of /proc/bus/usb
+( modprobe ${MODPRV} usbcore && mount -n -t usbfs usbfs /proc/bus/usb ) &
+
+# start the knoppix hardware autodetection tool
+( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/hwrun1 ) &
# ACPI configuration
#if [ -d /proc/acpi ]; then
@@ -281,7 +294,7 @@ modprobe ${MODPRV} agpgart || \
modprobe ${MODPRV} agpgart agp_try_unsupported=1
# wait for /tmp/hwsetup.info to appear
-waitfor /tmp/completed 50000 || \
+waitfor /tmp/hwrun1 50000 || \
error " Expected information from hwsetup to appear in \
/tmp/hwsetup.info.\n Unable to configure parts of the systems hardware. \
Please check that\n hwsetup is properly installed and executable."
@@ -298,10 +311,9 @@ for DRIVER in ohci-hcd uhci-hcd ehci-hcd \
modprobe ${MODPRV} ${DRIVER}
DRIVERLIST="${DRIVERLIST} ${DRIVER}"; }
done
-## modules for already plugged devices might not be loaded in ramdisk
-#if [ -n "$USB" ] ; then
-#
-#fi
+# remove usb core if USB not present
+[ -z "$USB" ] && rmmod usbcore
+# check for PCMCIA / cardbus stuff
for DRIVER in yenta_socket i82365 pd6729 tcic; do
strinfile ${DRIVER} /tmp/hwsetup.info && {
modprobe ${MODPRV} ${DRIVER}
@@ -322,13 +334,13 @@ done
# sound card setup
. /etc/sysconfig/sound || DRIVER="snd-dummy"
modprobe ${MODPRV} ${DRIVER}
-DRIVERLIST="${DRIVERLIST} ${DRIVER}"
+DRIVERLIST="${DRIVERLIST} ${DRIVER} "
# remaining drivers listed in /tmp/hwsetup.info
cat /tmp/hwsetup.info| while read LINE ; do
if strinstr "driver:" "${LINE}"; then
DRIVER=${LINE##driver: }
- if ! strinstr "${DRIVER}" "${DRIVERLIST}"; then
+ if ! strinstr " ${DRIVER} " "${DRIVERLIST}"; then
strinstr "Card:" "${DRIVER}" || strinstr "ps/2" "${DRIVER}" || {
modprobe ${MODPRV} ${DRIVER} &
usleep 10; }
@@ -336,6 +348,16 @@ cat /tmp/hwsetup.info| while read LINE ; do
fi
fi
done
+# rerun the knoppix hardware autodetection tool for USB and ide devices
+# like dvd or harddisk - wait a few seconds so hopefully the ide driver
+# is initialized
+( usleep 20 &&
+hwsetup -v > /tmp/hwsetup.info
+strinfile "genericwheelusb" /tmp/hwsetup.info && modprobe ${MODPRV} usbhid
+if strinfile "IDE" /tmp/hwsetup.info ;then
+ strinfile "CDROM" /tmp/hwsetup.info && modprobe ${MODPRV} ide_cd
+ strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk &
+fi ) &
# configure some variables from configuration file - wait for dhcp or ldap
# confiurator to complete
@@ -357,11 +379,10 @@ echo -e "#!/bin/sh\n# entry added by $0: $date" \
>>/mnt/etc/${INITDIR}/boot.ld
echo -e "loadkeys -q ${KEYTABLE}\n" >>/mnt/etc/${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 "/mnt/etc/X11/xorg.conf" #${XF86CONFFILE}"
+displaysetup ${XF86CONFFILE}
echo "finished" > /tmp/hwcfg