diff options
-rwxr-xr-x | src.etc/init.d/mdev | 12 |
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' } |