summaryrefslogtreecommitdiffstats
path: root/core/busybox-initscripts/mdev.initd
blob: e9309c70069171ef213516344a9addc7a37c13f1 (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
#!/sbin/runscript

depend() {
	provide dev
	need sysfs mdev-mount
	before checkfs fsck
	keyword novserver
}

start() {
	# check if udev is specified on cmd line
	if get_bootparam "udev"; then
		ewarn "Skipping mdev as udev requested in kernel cmdline"
		return 0
	fi
	
	ebegin "Starting busybox mdev"
	mkdir -p /dev

	# use mdev for hotplug
	echo "/sbin/mdev" > /proc/sys/kernel/hotplug
	
	# create devices
	mdev -s
	eend $?
}

stop() {
	ebegin "Stopping busybox mdev"
	echo "" > /proc/sys/kernel/hotplug
	eend 
}