#!/bin/sh /etc/rc.common start() { log 'Enabling device hotplugging' if ! mount | grep -Fq ' /dev '; then mount -t tmpfs -o noexec,nosuid,mode=0755 tmpfs /dev fi printf '/sbin/mdev\n' >/proc/sys/kernel/hotplug mdev -s } stop() { log 'Disabling device hotplugging' printf '\n' >/proc/sys/kernel/hotplug if mount | grep -Fq ' /dev '; then umount /dev fi } restart() { log 'Recanning devices' mdev -s }