From 9c603dd111d019e87d0135459d3b15c996565e14 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 16 Jun 2005 20:26:16 +0000 Subject: Use modprobe instead of insmod --- init | 2 +- mkinitramfs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/init b/init index a338889..73981a5 100644 --- a/init +++ b/init @@ -48,7 +48,7 @@ run_scripts /scripts/init-top # Load the modules # FIXME - do module options here for x in $(cat /conf/modules); do - insmod /modules/$x + modprobe $x done # Populate /dev tree diff --git a/mkinitramfs b/mkinitramfs index 94cf4c5..bfb0007 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -12,11 +12,13 @@ manual_add_modules() for x in $(sed -e '/^#/d' ${1}); do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates - if [ -e ${TMPDIR}/modules/$(basename ${y}) ]; then + if [ -e ${TMPDIR}/${y} ]; then continue fi - ln -s ${y} ${TMPDIR}/modules + mkdir -p ${TMPDIR}/$(dirname ${y}) + ln -s ${y} ${TMPDIR}/$(dirname ${y}) + depmod -b ${TMPDIR} ${version} echo $(basename ${y}) >>${TMPDIR}/conf/modules done done @@ -113,9 +115,10 @@ rm ${TMPDIR}/lib/*lsb* # Busybox rm ${TMPDIR}/bin/sh ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/sh +# This is ugly, but needed atm to make the builtins work =( +ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/busybox # Modutils -ln -s /sbin/insmod ${TMPDIR}/bin ln -s /sbin/modprobe ${TMPDIR}/bin # Raid -- cgit v1.2.3