2014-07-06 14:32:34 +00:00
|
|
|
#!/usr/bin/env watchman
|
|
|
|
|
2014-08-02 17:35:27 +00:00
|
|
|
#service_respawn='true'
|
2014-07-06 14:32:34 +00:00
|
|
|
service_command='/usr/lib/systemd/systemd-udevd'
|
|
|
|
|
|
|
|
cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}"
|
|
|
|
|
|
|
|
udev.populate_dev() {
|
|
|
|
watchman.msg "Populating /dev with udev..."
|
|
|
|
udevadm trigger --type=subsystems --action=add
|
|
|
|
udevadm trigger --type=devices --action=add
|
|
|
|
|
|
|
|
watchman.msg "Waiting for uevents..."
|
|
|
|
udevadm settle --timeout=${cfg_udev_settle_timeout}
|
|
|
|
udevadm control --property=do_not_run_plug_service=
|
|
|
|
}
|
|
|
|
|
2015-09-04 13:47:37 +00:00
|
|
|
post_start() { sleep 1; udev.populate_dev; }
|
2014-07-06 14:32:34 +00:00
|
|
|
|
|
|
|
reload() {
|
|
|
|
udevadm control --reload
|
|
|
|
}
|