summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/bin/hwautocfg
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-05-01 20:01:03 +0200
committerDirk von Suchodoletz2006-05-01 20:01:03 +0200
commit383692f6329ff246bf1b639bdb32f0cd97c1f2ff (patch)
treea44d0d7ba698e5230a3392167f7d58073ce85f74 /initrd/initrd-stuff/bin/hwautocfg
parentDebians udev is working now. (diff)
downloadcore-383692f6329ff246bf1b639bdb32f0cd97c1f2ff.tar.gz
core-383692f6329ff246bf1b639bdb32f0cd97c1f2ff.tar.xz
core-383692f6329ff246bf1b639bdb32f0cd97c1f2ff.zip
added synaptics mouse support, temp. bugfix in init ($DEBUGLEVEL),
cleanups ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@207 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/bin/hwautocfg')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg68
1 files changed, 44 insertions, 24 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 75470349..14e40345 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -4,12 +4,12 @@
# script for linux diskless clients, using hwconfig from
# knoppix as base tool
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 09-04-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 01-05-2006
# Felix Endres
#
# Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg
#
-# Version: 0.3.2a
+# Version: 0.3.2b
# local functions used within hwautocfg
displaysetup () {
@@ -49,12 +49,28 @@ local InputMouseDef='\tIdentifier "Mouse1"\n
\tOption\t\t"Emulate3Buttons"\n
\tOption\t\t"ZAxisMapping"\t\t"4 5"\n
\tOption\t\t"Buttons"\t\t"3"'
+local InputMouseSyn='\tIdentifier "Mouse1"\n
+\tDriver\t\t"synaptics"\n
+\tOption\t\t"Protocol"\t\t"auto-dev"\n
+\tOption\t\t"Device"\t\t"/dev/psaux"\n
+\tOption\t\t"LeftEdge"\t\t"1700"\n
+\tOption\t\t"RightEdge"\t\t"5300"\n
+\tOption\t\t"TopEdge"\t\t"1700"\n
+\tOption\t\t"BottomEdge"\t\t"4200"\n
+\tOption\t\t"FingerLow"\t\t"25"\n
+\tOption\t\t"FingerHigh"\t\t"30"\n
+\tOption\t\t"MaxTapTime"\t\t"180"\n
+\tOption\t\t"MaxTapMove"\t\t"220"\n
+\tOption\t\t"VertScrollDelta"\t"100"\n
+\tOption\t\t"MinSpeed"\t\t"0.06"\n
+\tOption\t\t"MaxSpeed"\t\t"0.12"\n
+\tOption\t\t"AccelFactor"\t\t"0.0010"'
local Monitor='\tIdentifier "Default"\n
\tModelName\t"MODEL"\n
-\tOption\t"CalcAlgorithm"\t"CheckDesktopGeometry"\n
+\tOption\t\t"CalcAlgorithm"\t"CheckDesktopGeometry"\n
\tHorizSync\tHS\n
\tVertRefresh\tVS\n
-\tOption\t"DPMS"\t"true"'
+\tOption\t"DPMS"\t\t"true"'
local Device='\tIdentifier\t"StdGraphics"\n
\tVendorName\t"XDESC"\n
\tDriver\t\t"XMODULE"'
@@ -63,13 +79,13 @@ local Screen='\tIdentifier\t"Screen 1"\n
\tMonitor\t\t"Default"\n
\tDefaultColorDepth CDP'
local ServerLayout='\tIdentifier\t"Simple Layout"\n
-\tScreen\t"Screen 1"\n
-\tInputDevice "Keyboard1"\t"CoreKeyboard"\n
-\tInputDevice "Mouse1"\t"CorePointer"\n
-\tOption\t"BlankTime"\t"5"\n
-\tOption\t"StandbyTime"\t"10"\n
-\tOption\t"SuspendTime"\t"20"\n
-\tOption\t"OffTime"\t"30"'
+\tScreen\t\t"Screen 1"\n
+\tInputDevice\t"Keyboard1"\t"CoreKeyboard"\n
+\tInputDevice\t"Mouse1"\t"CorePointer"\n
+\tOption\t\t"BlankTime"\t"5"\n
+\tOption\t\t"StandbyTime"\t"10"\n
+\tOption\t\t"SuspendTime"\t"20"\n
+\tOption\t\t"OffTime"\t"30"'
local DRI='\tGroup\t\t"video"\n
\tMode\t\t0666'
@@ -89,8 +105,6 @@ systems color depth failed.\n $msg" nonfatal
CDP=${DEFAULTCOLORDPT}
fi
-
-
if [ -n "$hw_monitor" ] ; then
# just cut all starting from k(Hz) ...
HS=${hw_monitor%k*}
@@ -132,7 +146,6 @@ established. Using default resolutions (${DEFAULTMODES})" nonfatal
fi
monmanual=yes
-
# finally write config file
echo -e "#\n# autogenerated X hardware configuration by $0\n# \
Dirk von Suchodoletz <dirk@goe.net>, $date" >$xfc
@@ -199,9 +212,12 @@ pci/agp bus needed for acceleration." ; }
echo -e "EndSection\n\nSection \"$section\"" >>$xfc
# if special synaptics touchpad was detected and specific driver
# is present
- # strinfile " synaptics " /tmp/hwsetup.info
- # synaptics_drv.o
- echo -e $InputMouseDef >>$xfc
+ if strinfile "synaptics" /tmp/hwsetup.info && \
+ test -e /mnt/usr/X11R6/lib/modules/input/synaptics_drv.o ; then
+ echo -e $InputMouseSyn >>$xfc
+ else
+ echo -e $InputMouseDef >>$xfc
+ fi
;;
Screen)
echo -e ${Screen} | sed -e "s,CDP,${CDP}," >>$xfc
@@ -224,6 +240,9 @@ done
# functions common for all distros
. /etc/functions
+# functions common for all distros, messages contains all error and
+# info output (fixme!! put messages output into that file)
+. /etc/messages
# load distro specific configuration variables and functions. distro
# specific functions may overwrite functions defined in /etc/functions
. /etc/sysconfig/config
@@ -237,8 +256,7 @@ if [ -n "${D_XF86CONFFILE}" ] ; then
D_XF86CONFFILE="/mnt/${D_XF86CONFFILE}"
else
D_XF86CONFFILE="/mnt/etc/X11/xorg.conf"
- error " You should define the variable D_XF86CONFFILE in yours distro \
-configuration\n file" nonfatal
+ error "$hcfg_xcfg" nonfatal
fi
# USB core is needed for presence of /proc/bus/usb
@@ -251,7 +269,8 @@ DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev kanotix\
${D_HWMODTOIGNORE} "
# driver blacklist (real modules which fail to load)
DRIVERLIST=${DRIVERLIST}"hw_random genericwheelusb "
-# hack for pseudo modules (not to load)
+# hack for pseudo modules (not to load) hopefully "usbcore" is present
+# as a module, might be exchanged with any other existing ...
for i in $DRIVERLIST ; do
echo -e "alias\t$i\tusbcore" >> /etc/modprobe.conf
done
@@ -290,8 +309,9 @@ for DRIVER in cmd64x hpt366 piix slc90e66 cs5520 it821x rz1000 \
modprobe ${MODPRV} ${DRIVER} &
DRIVERLIST="${DRIVERLIST} ${DRIVER}"; }
done
-# check for IDE/SCSI (SATA) - incomplete list
-for DRIVER in ata_piix sata_via sata_nv sata_sil sata_sis; do
+# check for IDE/SCSI (SATA)
+for DRIVER in ata_piix sata_via sata_nv sata_sil sata_sis sata_svw \
+ sata_sx4 sata_uli sata_vsc sata_qstor sata_promise sata_mv; do
strinfile " ${DRIVER}" /tmp/hwsetup.info && {
#SCSIIDE="yes"
modprobe ${MODPRV} ${DRIVER} &
@@ -392,11 +412,11 @@ if [ -z "${KEYTABLE}" ] ; then
'${DEFKEYTABLE}' defined\nin $0."
KEYTABLE=${DEFKEYTABLE}
fi
+# keytable will be loaded during early init process
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
+. /etc/sysconfig/xserver >/dev/null 2>&1 || error "$hcfg_hwsetup" nonfatal
( displaysetup /etc/xorg.conf; echo "ready" > /tmp/xready ) &
# wait for completion of clients root filesystem in /mnt