From 20f1cad363f2ea5bf5970020fcd068531bf17509 Mon Sep 17 00:00:00 2001 From: fbt Date: Wed, 11 Jun 2014 00:21:41 +0400 Subject: [PATCH] eudev and udev should be separate --- conf.d/udev.sh | 5 ----- init.d/eudev | 27 +++++++++++++++++++++++++++ init.d/udev | 2 ++ 3 files changed, 29 insertions(+), 5 deletions(-) delete mode 100644 conf.d/udev.sh create mode 100755 init.d/eudev diff --git a/conf.d/udev.sh b/conf.d/udev.sh deleted file mode 100644 index 1bd5c64..0000000 --- a/conf.d/udev.sh +++ /dev/null @@ -1,5 +0,0 @@ -# systemd-udevd: -#service_command='/usr/lib/systemd/systemd-udevd' - -# eudev: -service_command='/sbin/udevd' diff --git a/init.d/eudev b/init.d/eudev new file mode 100755 index 0000000..87471fc --- /dev/null +++ b/init.d/eudev @@ -0,0 +1,27 @@ +#!/usr/bin/env watchman + +service_command='/usr/bin/udevd' + +cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" + +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 +} diff --git a/init.d/udev b/init.d/udev index f751b69..e98d088 100755 --- a/init.d/udev +++ b/init.d/udev @@ -1,5 +1,7 @@ #!/usr/bin/env watchman +service_command='/usr/lib/systemd/systemd-udevd' + cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" depends devfs