forked from Spark/ssm-services
28 lines
598 B
Plaintext
28 lines
598 B
Plaintext
|
#!/usr/bin/env watchman
|
||
|
|
||
|
service_command='/usr/lib/systemd/systemd-udevd'
|
||
|
service_args='--resolve-names=never'
|
||
|
|
||
|
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
|
||
|
watchman.msg "Waiting for uevents..."
|
||
|
udevadm settle --timeout=${cfg_udev_settle_timeout}
|
||
|
udevadm control --property=do_not_run_plug_service=
|
||
|
}
|
||
|
|
||
|
start() {
|
||
|
watchman.start
|
||
|
sleep 1
|
||
|
udev.populate_dev
|
||
|
}
|
||
|
|
||
|
reload() {
|
||
|
udevadm control --reload
|
||
|
}
|