diff options
author | Michael-Luke Jones <mlj28@cam.ac.uk> | 2006-09-28 15:41:26 +0000 |
---|---|---|
committer | Michael-Luke Jones <mlj28@cam.ac.uk> | 2006-09-28 15:41:26 +0000 |
commit | 1decdb826d58ca77eedf9516b4b250b03d398afc (patch) | |
tree | f47c9e97068dda1786e8b34453b1a5895f580a7d /packages/slugos-init/files | |
parent | c4de89456a82bc97d97b0905f33f825ee303a099 (diff) |
slugos-init: Further improvements to module loading
Diffstat (limited to 'packages/slugos-init/files')
-rw-r--r-- | packages/slugos-init/files/boot/disk | 2 | ||||
-rw-r--r-- | packages/slugos-init/files/initscripts/loadmodules.sh | 11 | ||||
-rw-r--r-- | packages/slugos-init/files/modulefunctions | 37 |
3 files changed, 42 insertions, 8 deletions
diff --git a/packages/slugos-init/files/boot/disk b/packages/slugos-init/files/boot/disk index d0b093c602..dca1e422aa 100644 --- a/packages/slugos-init/files/boot/disk +++ b/packages/slugos-init/files/boot/disk @@ -26,7 +26,7 @@ then # # load USB & SCSI storage modules (/proc required!) echo "boot: loading modules required for boot" - loadusbmods + loaddiskmods # # Mount read-write because before exec'ing init # If a UUID is given (in the environment) this diff --git a/packages/slugos-init/files/initscripts/loadmodules.sh b/packages/slugos-init/files/initscripts/loadmodules.sh index 1bc540a148..e80f995598 100644 --- a/packages/slugos-init/files/initscripts/loadmodules.sh +++ b/packages/slugos-init/files/initscripts/loadmodules.sh @@ -1,18 +1,15 @@ #!/bin/sh # This script is used for loading modules required by SlugOS -# Currently, this script only supports the NSLU2 +# This script may not be necessary if udev is present, but is included +# for 'backup' purposes in case udev is playing silly buggers -. /etc/default/functions # Load $(machine) function required -. /etc/default/modulefunctions +. /etc/default/modulefunctions # Load module loading logic -echo "Loading networking modules" loadnetmods -echo "Loading usb storage modules" -loadusbmods +loaddiskmods -echo "Loading other modules" loadmiscmods exit 0 diff --git a/packages/slugos-init/files/modulefunctions b/packages/slugos-init/files/modulefunctions new file mode 100644 index 0000000000..c6719d4f79 --- /dev/null +++ b/packages/slugos-init/files/modulefunctions @@ -0,0 +1,37 @@ +#!/bin/sh +# . this file to load the functions for automatically loading modules + +. /etc/default/functions + +loaddiskmods(){ + modprobe scsi_mod + modprobe sd_mod + modprobe usbcore + case "$(machine)" in + nslu2) + modprobe ehci-hcd + modprobe ohci-hcd + ;; + nas100d) + modprobe ehci-hcd + modprobe uhci-hcd + ;; + + esac + modprobe usb-storage +} + +loadnetmods(){ + modprobe af_packet + case "$(machine)" in + ixdp425|nslu2|nas100d) + modprobe ixp4xx_mac + ;; + esac +} + +loadmiscmods(){ + modprobe ixp4xx_rng + modprobe i2c_dev +} + |