2017-07-13 16:09:42 +03:00
|
|
|
#!/usr/bin/env ssm
|
2014-06-11 00:21:41 +04:00
|
|
|
|
2014-08-02 21:35:27 +04:00
|
|
|
#service_respawn='true'
|
2014-06-11 00:21:41 +04:00
|
|
|
service_command='/usr/bin/udevd'
|
|
|
|
|
|
|
|
cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}"
|
|
|
|
|
|
|
|
udev.populate_dev() {
|
2017-07-13 16:09:42 +03:00
|
|
|
printf 'Populating /dev with udev...\n'
|
2014-06-11 00:21:41 +04:00
|
|
|
udevadm trigger --type=subsystems --action=add
|
|
|
|
udevadm trigger --type=devices --action=add
|
|
|
|
|
2017-07-13 16:09:42 +03:00
|
|
|
printf 'Waiting for uevents...\n'
|
|
|
|
udevadm settle "--timeout=${cfg_udev_settle_timeout}"
|
2014-06-11 00:21:41 +04:00
|
|
|
udevadm control --property=do_not_run_plug_service=
|
|
|
|
}
|
|
|
|
|
2015-09-04 16:47:37 +03:00
|
|
|
post_start() { sleep 1; udev.populate_dev; }
|
2014-06-11 00:21:41 +04:00
|
|
|
|
|
|
|
reload() {
|
|
|
|
udevadm control --reload
|
|
|
|
}
|