From 793cf14db75f7802408130ef87598850f3186956 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 19 Apr 2021 10:08:03 +0000 Subject: Prepare for 0.1.0.2, update examples --- examples/openrc/utmpd | 20 +++++++++++++------- examples/openrc/wtmpd | 21 ++++++++++++++------- examples/s6-rc/utmpd-log/consumer-for | 1 - examples/s6-rc/utmpd-log/dependencies | 1 - examples/s6-rc/utmpd-log/notification-fd | 1 - examples/s6-rc/utmpd-log/run | 5 ----- examples/s6-rc/utmpd-log/type | 1 - examples/s6-rc/utmpd/pipeline-name | 1 - examples/s6-rc/utmpd/producer-for | 1 - examples/s6-rc/wtmpd-log/consumer-for | 1 - examples/s6-rc/wtmpd-log/dependencies | 1 - examples/s6-rc/wtmpd-log/notification-fd | 1 - examples/s6-rc/wtmpd-log/run | 5 ----- examples/s6-rc/wtmpd-log/type | 1 - examples/s6-rc/wtmpd/dependencies | 5 +++++ examples/s6-rc/wtmpd/pipeline-name | 1 - examples/s6-rc/wtmpd/producer-for | 1 - examples/s6-rc/wtmpd/run | 2 +- examples/s6/utmpd/log/notification-fd | 1 - examples/s6/utmpd/log/run | 5 ----- examples/s6/wtmpd/log/notification-fd | 1 - examples/s6/wtmpd/log/run | 5 ----- examples/s6/wtmpd/run | 2 +- 23 files changed, 34 insertions(+), 50 deletions(-) delete mode 100644 examples/s6-rc/utmpd-log/consumer-for delete mode 100644 examples/s6-rc/utmpd-log/dependencies delete mode 100644 examples/s6-rc/utmpd-log/notification-fd delete mode 100644 examples/s6-rc/utmpd-log/run delete mode 100644 examples/s6-rc/utmpd-log/type delete mode 100644 examples/s6-rc/utmpd/pipeline-name delete mode 100644 examples/s6-rc/utmpd/producer-for delete mode 100644 examples/s6-rc/wtmpd-log/consumer-for delete mode 100644 examples/s6-rc/wtmpd-log/dependencies delete mode 100644 examples/s6-rc/wtmpd-log/notification-fd delete mode 100644 examples/s6-rc/wtmpd-log/run delete mode 100644 examples/s6-rc/wtmpd-log/type delete mode 100644 examples/s6-rc/wtmpd/pipeline-name delete mode 100644 examples/s6-rc/wtmpd/producer-for delete mode 100644 examples/s6/utmpd/log/notification-fd delete mode 100755 examples/s6/utmpd/log/run delete mode 100644 examples/s6/wtmpd/log/notification-fd delete mode 100755 examples/s6/wtmpd/log/run (limited to 'examples') diff --git a/examples/openrc/utmpd b/examples/openrc/utmpd index 2cf467b..291180a 100755 --- a/examples/openrc/utmpd +++ b/examples/openrc/utmpd @@ -1,13 +1,19 @@ #!/sbin/openrc-run -name="utmpd" -command="s6-ipcserver" -command_args="/run/utmps/utmpd-socket utmps-utmpd" -command_background=yes +depend() { + after bootmisc + before networking +} + +name=utmpd +description="utmps daemon for the utmp service" +command=s6-ipcserver +command_args=".utmpd-socket utmps-utmpd" command_user=utmp -pidfile="/run/utmps/utmpd.pid" -start_stop_daemon_args="-d /run/utmps" +command_background=true +directory=/run/utmps +pidfile=/run/utmps/utmpd.pid start_pre() { - checkpath -D -d -o utmp:utmp -m 0755 /run/utmps + checkpath -D -d -o utmp:utmp -m 0755 /run/utmps } diff --git a/examples/openrc/wtmpd b/examples/openrc/wtmpd index a7bda75..7d40941 100755 --- a/examples/openrc/wtmpd +++ b/examples/openrc/wtmpd @@ -1,13 +1,20 @@ #!/sbin/openrc-run -name="wtmpd" -command="s6-ipcserver" -command_args="/run/utmps/wtmpd-socket utmps-wtmpd" -command_background=yes +depend() { + after bootmisc + before networking + after utmpd +} + +name=wtmpd +description="utmps daemon for the wtmp service" +command=s6-ipcserver +command_args="/run/utmps/.wtmpd-socket utmps-wtmpd" command_user=utmp -pidfile="/run/utmps/wtmpd.pid" -start_stop_daemon_args="-d /run/utmps" +command_background=true +directory=/var/log +pidfile=/run/utmps/wtmpd.pid start_pre() { - checkpath -D -d -o utmp:utmp -m 0755 /run/utmps + checkpath -f -o utmp:utmp /var/log/wtmp } diff --git a/examples/s6-rc/utmpd-log/consumer-for b/examples/s6-rc/utmpd-log/consumer-for deleted file mode 100644 index fe07d03..0000000 --- a/examples/s6-rc/utmpd-log/consumer-for +++ /dev/null @@ -1 +0,0 @@ -utmpd diff --git a/examples/s6-rc/utmpd-log/dependencies b/examples/s6-rc/utmpd-log/dependencies deleted file mode 100644 index 8b13789..0000000 --- a/examples/s6-rc/utmpd-log/dependencies +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/s6-rc/utmpd-log/notification-fd b/examples/s6-rc/utmpd-log/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/examples/s6-rc/utmpd-log/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/examples/s6-rc/utmpd-log/run b/examples/s6-rc/utmpd-log/run deleted file mode 100644 index ec3b2f4..0000000 --- a/examples/s6-rc/utmpd-log/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/execlineb -P - -s6-setuidgid utmplog -exec -c -s6-log -d3 -- t /var/log/utmpd diff --git a/examples/s6-rc/utmpd-log/type b/examples/s6-rc/utmpd-log/type deleted file mode 100644 index 5883cff..0000000 --- a/examples/s6-rc/utmpd-log/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/examples/s6-rc/utmpd/pipeline-name b/examples/s6-rc/utmpd/pipeline-name deleted file mode 100644 index d75e141..0000000 --- a/examples/s6-rc/utmpd/pipeline-name +++ /dev/null @@ -1 +0,0 @@ -utmpd-pipeline diff --git a/examples/s6-rc/utmpd/producer-for b/examples/s6-rc/utmpd/producer-for deleted file mode 100644 index 8ff8e12..0000000 --- a/examples/s6-rc/utmpd/producer-for +++ /dev/null @@ -1 +0,0 @@ -utmpd-log diff --git a/examples/s6-rc/wtmpd-log/consumer-for b/examples/s6-rc/wtmpd-log/consumer-for deleted file mode 100644 index 18e5a30..0000000 --- a/examples/s6-rc/wtmpd-log/consumer-for +++ /dev/null @@ -1 +0,0 @@ -wtmpd diff --git a/examples/s6-rc/wtmpd-log/dependencies b/examples/s6-rc/wtmpd-log/dependencies deleted file mode 100644 index 8b13789..0000000 --- a/examples/s6-rc/wtmpd-log/dependencies +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/s6-rc/wtmpd-log/notification-fd b/examples/s6-rc/wtmpd-log/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/examples/s6-rc/wtmpd-log/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/examples/s6-rc/wtmpd-log/run b/examples/s6-rc/wtmpd-log/run deleted file mode 100644 index eeda433..0000000 --- a/examples/s6-rc/wtmpd-log/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/execlineb -P - -s6-setuidgid utmplog -exec -c -s6-log -d3 -- t /var/log/wtmpd diff --git a/examples/s6-rc/wtmpd-log/type b/examples/s6-rc/wtmpd-log/type deleted file mode 100644 index 5883cff..0000000 --- a/examples/s6-rc/wtmpd-log/type +++ /dev/null @@ -1 +0,0 @@ -longrun diff --git a/examples/s6-rc/wtmpd/dependencies b/examples/s6-rc/wtmpd/dependencies index 6cfcf60..194a7b1 100644 --- a/examples/s6-rc/wtmpd/dependencies +++ b/examples/s6-rc/wtmpd/dependencies @@ -1 +1,6 @@ +# mount-var-log is not defined in this example; +# it's there to show that wtmpd should only run +# once /var/log has been mounted. + utmps-prepare +mount-var-log diff --git a/examples/s6-rc/wtmpd/pipeline-name b/examples/s6-rc/wtmpd/pipeline-name deleted file mode 100644 index 37edf1f..0000000 --- a/examples/s6-rc/wtmpd/pipeline-name +++ /dev/null @@ -1 +0,0 @@ -wtmpd-pipeline diff --git a/examples/s6-rc/wtmpd/producer-for b/examples/s6-rc/wtmpd/producer-for deleted file mode 100644 index 4206ab1..0000000 --- a/examples/s6-rc/wtmpd/producer-for +++ /dev/null @@ -1 +0,0 @@ -wtmpd-log diff --git a/examples/s6-rc/wtmpd/run b/examples/s6-rc/wtmpd/run index b9d9da3..cb26286 100644 --- a/examples/s6-rc/wtmpd/run +++ b/examples/s6-rc/wtmpd/run @@ -2,7 +2,7 @@ fdmove -c 2 1 s6-setuidgid utmp -cd /run/utmps +cd /var/log fdmove 1 3 s6-ipcserver -1 -- /run/utmps/wtmpd-socket utmps-wtmpd diff --git a/examples/s6/utmpd/log/notification-fd b/examples/s6/utmpd/log/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/examples/s6/utmpd/log/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/examples/s6/utmpd/log/run b/examples/s6/utmpd/log/run deleted file mode 100755 index ec3b2f4..0000000 --- a/examples/s6/utmpd/log/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/execlineb -P - -s6-setuidgid utmplog -exec -c -s6-log -d3 -- t /var/log/utmpd diff --git a/examples/s6/wtmpd/log/notification-fd b/examples/s6/wtmpd/log/notification-fd deleted file mode 100644 index 00750ed..0000000 --- a/examples/s6/wtmpd/log/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 diff --git a/examples/s6/wtmpd/log/run b/examples/s6/wtmpd/log/run deleted file mode 100755 index b23b32e..0000000 --- a/examples/s6/wtmpd/log/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/execlineb -P - -s6-setuidgid utmplog -exec -c -s6-log -d3 -- t /var/log/utmps-wtmpd diff --git a/examples/s6/wtmpd/run b/examples/s6/wtmpd/run index 83844ae..d8aba76 100755 --- a/examples/s6/wtmpd/run +++ b/examples/s6/wtmpd/run @@ -3,7 +3,7 @@ fdmove -c 2 1 unexport ? s6-setuidgid utmp -cd /run/utmps +cd /var/log # will only work after /var/log is mounted! fdmove 1 3 s6-ipcserver -1 -- /run/utmps/.wtmpd-socket utmps-wtmpd -- cgit v1.2.3