From 7995c1006118ce8b2acda553f80c8bf49384bee3 Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 6 Jul 2014 18:32:34 +0400 Subject: [PATCH] READMEs in the config dirs --- README.md | 2 +- conf.d/README | 6 ++++++ init.d/README | 3 +++ init.d/systemd-udevd | 27 +++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 conf.d/README create mode 100644 init.d/README create mode 100755 init.d/systemd-udevd diff --git a/README.md b/README.md index 833d4f8..6825777 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ watchman-services ================= -Example watchman services +Examples of services for https://github.com/fbt/watchman. diff --git a/conf.d/README b/conf.d/README new file mode 100644 index 0000000..1675421 --- /dev/null +++ b/conf.d/README @@ -0,0 +1,6 @@ +This is the directory additional service configuration is sourced from. +Basically you can override what's written in a service file from here +without directly modifying the service itself, making it easier to +update those as any local configuration should go here instead. + +I've provided a sample conf.d entry for dropbear to demostrate. diff --git a/init.d/README b/init.d/README new file mode 100644 index 0000000..0f14a5c --- /dev/null +++ b/init.d/README @@ -0,0 +1,3 @@ +Here lie the service scripts in all their glory. +Please be advised that the scripts may need tweaking to work on different systems. +These were written for my Arch desktops so should all work for most arch boxes out there. diff --git a/init.d/systemd-udevd b/init.d/systemd-udevd new file mode 100755 index 0000000..e98d088 --- /dev/null +++ b/init.d/systemd-udevd @@ -0,0 +1,27 @@ +#!/usr/bin/env watchman + +service_command='/usr/lib/systemd/systemd-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 +}