From f9bb48be0295195c97bad86fe2dbe4ce8a9ea009 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 7 Jul 2018 18:47:18 +0000 Subject: Fix openrc scripts (thanks Guillermo) --- AUTHORS | 3 +++ examples/openrc/utmpd | 13 +++++++++---- examples/openrc/wtmpd | 13 +++++++++---- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1a38c57..ad80171 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,8 @@ Main author: Laurent Bercot +Contributors: + Guillermo + Thanks to: A. Wilcox diff --git a/examples/openrc/utmpd b/examples/openrc/utmpd index a091528..2cf467b 100755 --- a/examples/openrc/utmpd +++ b/examples/openrc/utmpd @@ -1,8 +1,13 @@ #!/sbin/openrc-run -# Assumes the /run/utmps directory already exists and belongs to utmp - name="utmpd" -command="s6-ipcserver -- /run/utmps/utmpd-socket utmps-utmpd" +command="s6-ipcserver" +command_args="/run/utmps/utmpd-socket utmps-utmpd" +command_background=yes +command_user=utmp pidfile="/run/utmps/utmpd.pid" -start_stop_daemon_args="-b -m -c utmp -d /run/utmps" +start_stop_daemon_args="-d /run/utmps" + +start_pre() { + checkpath -D -d -o utmp:utmp -m 0755 /run/utmps +} diff --git a/examples/openrc/wtmpd b/examples/openrc/wtmpd index 5485a8d..a7bda75 100755 --- a/examples/openrc/wtmpd +++ b/examples/openrc/wtmpd @@ -1,8 +1,13 @@ #!/sbin/openrc-run -# Assumes the /run/utmps directory already exists and belongs to utmp - name="wtmpd" -command="s6-ipcserver -- /run/utmps/wtmpd-socket utmps-wtmpd" +command="s6-ipcserver" +command_args="/run/utmps/wtmpd-socket utmps-wtmpd" +command_background=yes +command_user=utmp pidfile="/run/utmps/wtmpd.pid" -start_stop_daemon_args="-b -m -c utmp -d /run/utmps" +start_stop_daemon_args="-d /run/utmps" + +start_pre() { + checkpath -D -d -o utmp:utmp -m 0755 /run/utmps +} -- cgit v1.2.3