summaryrefslogtreecommitdiffstats
path: root/initrd
diff options
context:
space:
mode:
authorNico Dietrich2006-02-17 01:35:31 +0100
committerNico Dietrich2006-02-17 01:35:31 +0100
commit6b768f803fc8bf786f6a1ad397d22c9c8001d9f6 (patch)
treefe1a2827dec6e9173bf096ec013d97e9e23a1f3e /initrd
parentpostinit function added (e.g. for running udevstart again) (diff)
downloadcore-6b768f803fc8bf786f6a1ad397d22c9c8001d9f6.tar.gz
core-6b768f803fc8bf786f6a1ad397d22c9c8001d9f6.tar.xz
core-6b768f803fc8bf786f6a1ad397d22c9c8001d9f6.zip
fixes: dhclient in ubuntu, ide-generic
git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@79 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg11
-rw-r--r--initrd/initrd-stuff/etc/functions18
-rwxr-xr-xinitrd/initrd-stuff/init3
3 files changed, 17 insertions, 15 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 29cf98b8..772b658d 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -284,7 +284,7 @@ modprobe ${MODPRV} usbcore &
modprobe ${MODPRV} mousedev
# start the knoppix hardware autodetection tool
-( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/hwrun1 ) &
+( hwsetup -v > /tmp/hwsetup.info && echo "hwsetup" > /tmp/hwrun1 ) &
# ACPI configuration - at least not needed with SuSE 9.3/10.0
#if [ -d /proc/acpi ]; then
@@ -311,11 +311,10 @@ 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."
-
# "drivers" (pseudo, placeholder strings, ...) to exclude from loading
DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev"
# driver blacklist (real modules which fail to load)
-DRIVERLIST=${DRIVERLIST}" hw_random ichxrom"
+DRIVERLIST=${DRIVERLIST}" hw_random ichxrom kanotix genericwheelusb "
# load ide drivers first, takes a while to initialize
for DRIVER in cmd64x hpt366 piix slc90e66 cs5520 it821x rz1000 \
triflex aec62xx cs5530 ns87415 sc1200 trm290 alim15x3 \
@@ -358,6 +357,7 @@ if [ -f /etc/sysconfig/sound ] ; then
else DRIVER="snd-dummy"
fi
modprobe ${MODPRV} ${DRIVER}
+
DRIVERLIST="${DRIVERLIST} ${DRIVER} "
modprobe -a ${MODPRV} snd_pcm_oss snd_mixer_oss
# check for PCMCIA / cardbus stuff
@@ -387,11 +387,12 @@ done
# like dvd or harddisk - wait a few seconds so hopefully the ide driver
# is initialized
test -f /proc/bus/usb/devices || mount -n -t usbfs usbfs /proc/bus/usb
+[ -n "$IDE" ] && modprobe -q ide_generic 2>/dev/null
usleep 10 && hwsetup -v > /tmp/hwsetup.info
# check if USB mouse and/or keyboard is connected and remove usbhid if
# not
strinfile "genericwheelusb" /tmp/hwsetup.info || \
- strinfile "keybdev" /tmp/hwsetup.info || rmmod usbhid
+ (strinfile "keybdev" /tmp/hwsetup.info || rmmod usbhid)
# load IDE high level drivers
if [ -n "$IDE" ] ; then
@@ -400,6 +401,7 @@ if [ -n "$IDE" ] ; then
strinfile "CDROM" /tmp/hwsetup.info && modprobe ${MODPRV} ide_cd
strinfile "HD" /tmp/hwsetup.info && modprobe ${MODPRV} ide_disk &
fi
+
# not rather precise ...
if strinfile "SCSI" /tmp/hwsetup.info ; then
strinfile "CDROM" /tmp/hwsetup.info && modprobe -a ${MODPRV} sr_mod sg
@@ -438,4 +440,3 @@ configuration file generated by hwsetup could not\n be found." nonfatal
displaysetup ${D_XF86CONFFILE}
echo "finished" > /tmp/hwcfg
-
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index 655e8aca..349ee9da 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -197,7 +197,7 @@ option hw-mouse code 252\t\t= string;\n\
option hw-graphic code 253\t\t= string;\n\
option hw-monitor code 254\t\t= string;\n\n\
send dhcp-lease-time 86400;\nsend dhcp-max-message-size 1400;\n\
-request;\nscript \"/sbin/dhclient-script\";" >> /etc/dhclient.conf
+request;\nscript \"/bin/dhclient-script\";" >> /etc/dhclient.conf
if [ -n "$vci" ] ; then
echo "send vendor-class-identifier \"$vci\";" >> /etc/dhclient.conf
fi
@@ -232,13 +232,13 @@ export client="$dhcp"
case $dhcp in
dhclient)
mkdhclconf $vci
- ln -s /bin/dhcpmkconfig /sbin/dhclient-script
- dhclient -q -lf /var/lib/dhcp/dhclient.leases eth0 2>&1 >/dev/null || \
+ ln -s /bin/dhcpmkconfig /bin/dhclient-script
+ dhclient -q -cf /etc/dhclient.conf -lf /var/lib/dhcp/dhclient.leases eth0 2>&1 >/dev/null || \
error " Fatal error occured while trying to run dhclient.\n$commonerr"
;;
dhcpcd)
- ln -s /bin/dhcpmkconfig /sbin/dhcpd.exe
- dhcpcd -L /var/lib/dhcp -c /sbin/dhcpd.exe -T -t 30 eth0 2>&1 >/dev/null || \
+ ln -s /bin/dhcpmkconfig /bin/dhcpd.exe
+ dhcpcd -L /var/lib/dhcp -c /bin/dhcpd.exe -T -t 30 eth0 2>&1 >/dev/null || \
error " Fatal error occured while trying to run dhcpcd.\n$commonerr"
;;
pump)
@@ -271,8 +271,8 @@ basename () {
#######################################################################
# simple string in string search
strinstr (){
-case "$2" in *$1*) return 0;; esac
-return 1
+ case "$2" in *$1*) return 0;; esac
+ return 1
}
#######################################################################
@@ -285,8 +285,8 @@ return 1
#return 1
#}
strinfile(){
-case "$(cat $2)" in *$1*) return 0;; esac
-return 1
+ case "$(cat $2)" in *$1*) return 0;; esac
+ return 1
}
diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init
index b1858d72..6dd27b75 100755
--- a/initrd/initrd-stuff/init
+++ b/initrd/initrd-stuff/init
@@ -291,7 +291,7 @@ if [ -n "${UNIONFS}" ] ; then
mkdir -p ${RWDIR}/union ${RWDIR}/uniontmp
mount -n -t tmpfs none ${RWDIR}/uniontmp
mount -n --move /mnt /root
- mount -n -t unionfs -o dirs=${RWDIR}/uniontmp=rw:/root=ro none /mnt
+ mount -n -t unionfs -o dirs=${RWDIR}/uniontmp=rw:/root=nfsro none /mnt
mkdir -p /mnt/uniontmp
mount -n --move ${RWDIR}/uniontmp /mnt/uniontmp
# run ldconfig if not switched off via kernel command line
@@ -398,6 +398,7 @@ d_mkbootld close
# should be killed if started within init
killall -9 dhcpcd dhclient pump 2>/dev/null
+
#bash
# post init for some distro specific