summaryrefslogtreecommitdiffstats
path: root/src/initramfs/scripts/bin/hwautocfg
diff options
context:
space:
mode:
Diffstat (limited to 'src/initramfs/scripts/bin/hwautocfg')
-rwxr-xr-xsrc/initramfs/scripts/bin/hwautocfg19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/initramfs/scripts/bin/hwautocfg b/src/initramfs/scripts/bin/hwautocfg
index 4ec42c4a..92d69943 100755
--- a/src/initramfs/scripts/bin/hwautocfg
+++ b/src/initramfs/scripts/bin/hwautocfg
@@ -24,9 +24,8 @@ for tool in /usr/sbin/acpidump \
echo -e "#!/bin/sh" >${tool}
chmod u+x ${tool}
done
-# no kernel messages, switch on hotplug via /sbin/mdev
+# no kernel messages
echo "0 0 0 0" >/proc/sys/kernel/printk
-echo "/sbin/mdev" >/proc/sys/kernel/hotplug
echo -e "(control[A-Z])([0-9]) 0:0 660 =snd/\n(pcm[A-Z][0-9][A-Z][0-9][cp]) 0:0 660 =snd/\n\
(hw[A-Z0-9]*) 0:0 660 =snd/\ncard[0-9] 0:0 660 =dri/\n(event|mouse)[0-9] 0:0 640 =input/\n\
(control[A-Z])([0-9]+) 0:0 660 =dri/\n" >>/etc/mdev.conf
@@ -62,7 +61,7 @@ elif [ -e /etc/init-hooks/00-started/xserver.sh -o \
modprobe -a ${MODPRV} r128 savage sis tdfx ttm via
;;
esac
- modprobe -a drm fbcon; mdev -s ) &
+ modprobe -a drm fbcon ) &
fi
# check and then load appropriate network card modules
@@ -76,7 +75,7 @@ grep modprobe /etc/hwinfo.netcard-usbctrl | grep -E "$nwcardlist|hcd" \
if [ $(grep -ic "virtio_pci" /etc/modprobe.base) -ge 1 ]; then
echo 'modprobe ${MODPRV} virtio_net' >>/etc/modprobe.base
fi
-sh /etc/modprobe.base; mdev -s
+sh /etc/modprobe.base
# optimization possible: exclude network and usb base drivers from the
# following list (bios detection for non-hwautocfg component)
@@ -88,7 +87,7 @@ echo -e "ext3\next2\nreiserfs\nxfs\njfs\next4\nvfat" >/etc/filesystems
# request a local block device for config and root filesystem (lbd://)
if grep -iq '"lbd://' /proc/cmdline /etc/initramfs-setup; then
modprobe -a ${MODPRV} ehci_hcd usb-storage sd_mod
- mdev -s
+
fi
return 0
}
@@ -105,7 +104,7 @@ sed '/Driver Info #1/,/Config Status:/d' /etc/hwinfo.data | grep modprobe \
| sed "s|.* Cmd: \"||;s|\"|$modloadbg|;s|modprobe|modprobe -b ${MODPRV}|" \
| sort -u >/etc/modprobe.pci
sh /etc/modprobe.pci
-mdev -s
+
# bluetooth setup (start it later if present, depends on firmware availa-
# bility, interpreted by servconfig)
@@ -123,7 +122,7 @@ mdev -s
modprobe ${MODPRV} ide-cd 2>/dev/null
modprobe ${MODPRV} sr_mod 2>/dev/null
modprobe ${MODPRV} ide-floppy 2>/dev/null
-mdev -s
+
# load kernel module for ps2 mice and map the mousehandler to /dev/input/mice
( [ -f /lib/modules/${KERNEL}/kernel/drivers/input/mouse/psmouse.ko ] && \
@@ -152,7 +151,7 @@ hwinfo --scanner >/etc/hwinfo.scanner
modprobe ${MODPRV} parport_pc && modprobe ${MODPRV} ppdev
# if any new device appeared up to now
-mdev -s
+
return 0
}
#############################################################################
@@ -226,7 +225,7 @@ fi
#############################################################################
# cleanup/finishing part
finish () {
-mdev -s
+
# mount filesystem parts (if any) requested in disk setup
[ -f /etc/do_mnt ] && \
{ sed -e "1i. /etc/functions" -i /etc/do_mnt; sh /etc/do_mnt; } &
@@ -285,12 +284,10 @@ case $1 in
disk)
# try to enable compressed RAM SWAP / ZRAM
if modprobe ${MODPRV} ramzswap 2>/dev/null && [ -f /usr/bin/rzscontrol ] ; then
- mdev -s
rzscontrol /dev/ramzswap0 --init
swapon /dev/ramzswap0 2>/dev/null
#hdswap="# disk swap disabled because of enabled compressed ramswap"
elif modprobe ${MODPRV} zram 2>/dev/null ; then
- mdev -s
# assign a quarter of total mem to zram
echo $(( $(free -k | awk '/^Mem:/ { print $2 }') * 256 )) > /sys/block/zram0/disksize
mkswap /dev/zram0 2>/dev/null