forked from public/airgap
25 lines
657 B
Plaintext
25 lines
657 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
printf "Populating %s using udev: " "${udev_root:-/dev}"
|
||
|
[ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug
|
||
|
/sbin/udevd -d || { echo "FAIL"; exit 1; }
|
||
|
udevadm trigger --type=subsystems --action=add
|
||
|
udevadm trigger --type=devices --action=add
|
||
|
udevadm settle --timeout=30 || echo "udevadm settle failed"
|
||
|
echo "done"
|
||
|
;;
|
||
|
stop)
|
||
|
# Stop execution of events
|
||
|
udevadm control --stop-exec-queue
|
||
|
killall udevd
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop}"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|