diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-19 10:08:03 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-04-19 10:08:03 +0000 |
commit | 793cf14db75f7802408130ef87598850f3186956 (patch) | |
tree | f1ae96ee789c11d279cace067f62f868ba57d306 /examples | |
parent | b9781c6faa797fd68ea2807345c02fa12c3e0efb (diff) | |
download | utmps-793cf14db75f7802408130ef87598850f3186956.tar.gz utmps-793cf14db75f7802408130ef87598850f3186956.tar.xz utmps-793cf14db75f7802408130ef87598850f3186956.zip |
Prepare for 0.1.0.2, update examples
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/openrc/utmpd | 20 | ||||
-rwxr-xr-x | examples/openrc/wtmpd | 21 | ||||
-rw-r--r-- | examples/s6-rc/utmpd-log/consumer-for | 1 | ||||
-rw-r--r-- | examples/s6-rc/utmpd-log/dependencies | 1 | ||||
-rw-r--r-- | examples/s6-rc/utmpd-log/notification-fd | 1 | ||||
-rw-r--r-- | examples/s6-rc/utmpd-log/run | 5 | ||||
-rw-r--r-- | examples/s6-rc/utmpd-log/type | 1 | ||||
-rw-r--r-- | examples/s6-rc/utmpd/pipeline-name | 1 | ||||
-rw-r--r-- | examples/s6-rc/utmpd/producer-for | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd-log/consumer-for | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd-log/dependencies | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd-log/notification-fd | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd-log/run | 5 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd-log/type | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd/dependencies | 5 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd/pipeline-name | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd/producer-for | 1 | ||||
-rw-r--r-- | examples/s6-rc/wtmpd/run | 2 | ||||
-rw-r--r-- | examples/s6/utmpd/log/notification-fd | 1 | ||||
-rwxr-xr-x | examples/s6/utmpd/log/run | 5 | ||||
-rw-r--r-- | examples/s6/wtmpd/log/notification-fd | 1 | ||||
-rwxr-xr-x | examples/s6/wtmpd/log/run | 5 | ||||
-rwxr-xr-x | examples/s6/wtmpd/run | 2 |
23 files changed, 34 insertions, 50 deletions
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 |