summaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts/mdev.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-23 18:24:11 +0000
commit2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd (patch)
treea63d3b3b1c89018b5419358eed5c2bb0acf1cd92 /main/busybox-initscripts/mdev.initd
parente374901731eb35599bd6735de4dd38560e3a79b8 (diff)
downloadaports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.bz2
aports-2d2ddf507bf1ae2f4cc595b23b8e018398cbe8dd.tar.xz
move core/* to main/
added maintainer to several packages as well
Diffstat (limited to 'main/busybox-initscripts/mdev.initd')
-rw-r--r--main/busybox-initscripts/mdev.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/main/busybox-initscripts/mdev.initd b/main/busybox-initscripts/mdev.initd
new file mode 100644
index 00000000..e9309c70
--- /dev/null
+++ b/main/busybox-initscripts/mdev.initd
@@ -0,0 +1,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
+}
+