Files
initscripts/usr/lib/init/services/mdev.service
T
2025-07-25 17:17:31 +07:00

36 lines
662 B
Desktop File

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting mdev"
mkdir -p /dev
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
for i in $(find /sys/devices -name 'usb[0-9]*'); do
[ -e $i/uevent ] && echo add > $i/uevent
done
/usr/bin/mdev -s -S
check $? "start mdev"
return $?
}
stop() {
notify "Stopping mdev"
echo > /proc/sys/kernel/hotplug
check $? "stop mdev"
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
return 1
esac
return $?