From 76b4d6b792d24a18ce5efb75de62b82d4aa43642 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 13 Aug 2013 13:30:13 -0400 Subject: /etc/init.d/mdev: Mount a tmpfs on /dev. --- 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' } -- cgit v0.9.1