summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files/initscripts/loadmodules.sh
blob: f2b28d886848f0a0b8e325a9567da1aa4049aab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

# This script is used for loading modules required by SlugOS
# Currently, this script only supports the NSLU2

. /etc/default/functions # Load $(machine) function required

echo "Starting Network Processing Engines"
modprobe ixp4xx_npe
sleep 1 # Wait for firmware load

echo "Loading networking modules"

modprobe af_packet # Required for DHCP

# Add nas100d/loft below when mac definition is added to kernel
case "$(machine)" in
    ixdp425|nslu2)
        modprobe ixp4xx_mac
        ;;
esac

# Add conditional DSM-G600 ethernet module load

echo "Loading usb storage modules"
modprobe scsi_mod
modprobe sd_mod
modprobe usbcore

# Add more entries as appropriate
case "$(machine)" in
    nslu2)
        modprobe ohci_hcd
        modprobe ehci_hcd
        ;;
esac

modprobe usb_storage

echo "Loading other modules"
modprobe ixp4xx_rng
modprobe i2c_dev

exit 0