summaryrefslogtreecommitdiff
path: root/recipes/slugos-init/files/modulefunctions
blob: 02bfccb5008c088a73a267bfaeac3e4a3928d68e (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
45
#!/bin/sh
# . this file to load the functions for automatically loading modules
# NB: /proc must be mounted for correct evaluation of "$(machine)".

. /etc/default/functions

loaddiskmods(){
	case "$(machine)" in
	    nslu2)		       
		[ -d /sys/module/ehci_hcd ]   || modprobe ehci-hcd
		[ -d /sys/module/ohci_hcd ]   || modprobe ohci-hcd
		;;
	    nas100d)
		[ -d /sys/module/ehci_hcd ]   || modprobe ehci-hcd
		[ -d /sys/module/uhci_hcd ]   || modprobe uhci-hcd
		[ -d /sys/module/pata_artop ] || modprobe pata-artop
		;;
	    dsmg600)
		[ -d /sys/module/ehci_hcd ]   || modprobe ehci-hcd
		[ -d /sys/module/uhci_hcd ]   || modprobe uhci-hcd
		[ -d /sys/module/pata_artop ] || modprobe pata-artop
		;;

	esac
}

loadnetmods(){
	case "$(machine)" in
	    dsmg600)
		[ -d /sys/module/via_velocity ] || modprobe via-velocity
		;;
	    *)
		true
		;;
	esac
}

loadnfsmods(){
	[ -d /sys/module/nfs ] || modprobe nfs
}

loadmiscmods(){
	true
}