X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=scripts%2Frc.sysinit;h=ebfe17c286da40ee5474ca5e3da30c93c0cc15a4;hb=8f4b6393d2a3fea2008722d6f2b29b3e3d3bb5c7;hp=46794a6c3cf4405a14e5475b44029ee5ebaa2125;hpb=aa442d5cc6c7325cbe3422a5c6cd6ec71f832ecc;p=startuptools diff --git a/scripts/rc.sysinit b/scripts/rc.sysinit index 46794a6..ebfe17c 100644 --- a/scripts/rc.sysinit +++ b/scripts/rc.sysinit @@ -68,10 +68,27 @@ status_begin remounting root filesystem rw mount -o remount,rw / status_check +# need to run depmod here, just in case +# it should be done at kernel install time, but this can avoid +# errors if that goes wrong or there are new or removed modules status_begin running depmod depmod status_check +# load any kernel modules +# there's probably a better way to do this +# this could also be done in the initial ram-disk, but +# this covers the case where there isn't one, but we still want +# to load more hardware +if ! is_true "$NOPROBEHW" ; then + status_begin "loading kernel modules" + modlist=$(lspci -k|grep 'Kernel modules:' | awk '{print $3}'| sort -u) + if [ -n "$modlist" ]; then + modprobe $modlist + fi + status_check +fi + # set up /dev if [ -x /sbin/mdev ] && ! is_true "$USE_UDEV" ; then @@ -130,9 +147,9 @@ status_begin mounting remaining filesystems mount -a -t noproc,sysfs,devtmpfs,devpts,tmpfs status_check +# force mtab symlink rm -f /etc/mtab -mount -af -mount -f / +ln -s /proc/mounts /etc/mtab # * do any boot time /tmp cleanup or similar