summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-08-13 13:30:13 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-08-13 13:30:13 (EDT)
commit76b4d6b792d24a18ce5efb75de62b82d4aa43642 (patch)
tree060b29b1cd2f68acd24e4e64db4ddbb6ef597584
parenteb940d9544353c7852767474ae8d4e91ccb51cf2 (diff)
/etc/init.d/mdev: Mount a tmpfs on /dev.
-rwxr-xr-xsrc.etc/init.d/mdev12
1 files changed, 12 insertions, 0 deletions
diff --git a/src.etc/init.d/mdev b/src.etc/init.d/mdev
index aa5f618..ddb4586 100755
--- a/src.etc/init.d/mdev
+++ b/src.etc/init.d/mdev
@@ -3,15 +3,27 @@
start()
{
printf 'Enabling device hotplugging... '
+
+ if ! mount | grep -F ' /dev ' >dev/null 2>&1; then
+ mount -t tmpfs -o noexec,nosuid,mode=0755 tmpfs /dev
+ fi
+
printf '/sbin/mdev\n' >/proc/sys/kernel/hotplug
mdev -s
+
printf 'done.\n'
}
stop()
{
printf 'Disabling device hotplugging... '
+
printf '\n' >/proc/sys/kernel/hotplug
+
+ if mount | grep -F ' /dev ' >dev/null 2>&1; then
+ umount /dev
+ fi
+
printf 'done.\n'
}