2013-09-28 23:32:39 +00:00
|
|
|
#!/usr/bin/env watchman
|
|
|
|
|
2013-11-25 03:39:24 +00:00
|
|
|
service_command='/bin/udevd'
|
2013-09-28 23:32:39 +00:00
|
|
|
|
|
|
|
cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}"
|
|
|
|
|
|
|
|
watchman.depends devfs
|
|
|
|
|
|
|
|
udev.populate_dev() {
|
|
|
|
watchman.msg "Populating /dev with udev..."
|
|
|
|
udevadm trigger --type=subsystems --action=add
|
|
|
|
udevadm trigger --type=devices --action=add
|
2014-02-24 11:32:18 +00:00
|
|
|
|
2013-09-28 23:32:39 +00:00
|
|
|
watchman.msg "Waiting for uevents..."
|
|
|
|
udevadm settle --timeout=${cfg_udev_settle_timeout}
|
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
|
|
|
watchman.start
|
|
|
|
sleep 1
|
|
|
|
udev.populate_dev
|
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
|
|
|
udevadm control --reload
|
|
|
|
}
|