summaryrefslogtreecommitdiff
path: root/examples/ROOT/img/services-local
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ROOT/img/services-local')
-rw-r--r--examples/ROOT/img/services-local/README5
-rw-r--r--examples/ROOT/img/services-local/klogd-linux/README3
-rw-r--r--examples/ROOT/img/services-local/klogd-linux/log/README1
-rwxr-xr-xexamples/ROOT/img/services-local/klogd-linux/log/run4
-rwxr-xr-xexamples/ROOT/img/services-local/klogd-linux/run5
-rw-r--r--examples/ROOT/img/services-local/syslogd-linux/README7
-rw-r--r--examples/ROOT/img/services-local/syslogd-linux/log/README4
-rwxr-xr-xexamples/ROOT/img/services-local/syslogd-linux/log/run5
-rwxr-xr-xexamples/ROOT/img/services-local/syslogd-linux/run8
9 files changed, 42 insertions, 0 deletions
diff --git a/examples/ROOT/img/services-local/README b/examples/ROOT/img/services-local/README
new file mode 100644
index 0000000..9e4c027
--- /dev/null
+++ b/examples/ROOT/img/services-local/README
@@ -0,0 +1,5 @@
+This is the service repository for services that should be started
+early, typically before the network goes up.
+"klogd" and "syslogd" services should be present as soon as possible,
+because other services might need them. However, since they need
+a writable disk filesystem, they can't be run as early as a getty.
diff --git a/examples/ROOT/img/services-local/klogd-linux/README b/examples/ROOT/img/services-local/klogd-linux/README
new file mode 100644
index 0000000..ec95a00
--- /dev/null
+++ b/examples/ROOT/img/services-local/klogd-linux/README
@@ -0,0 +1,3 @@
+This klogd emulation is only valid under Linux.
+The service only processes logs from /proc/kmsg and
+sends them to stdout, i.e. its own logger.
diff --git a/examples/ROOT/img/services-local/klogd-linux/log/README b/examples/ROOT/img/services-local/klogd-linux/log/README
new file mode 100644
index 0000000..6b51a4a
--- /dev/null
+++ b/examples/ROOT/img/services-local/klogd-linux/log/README
@@ -0,0 +1 @@
+Processed kernel logs will be logged to the /var/log/klogd/ logdir.
diff --git a/examples/ROOT/img/services-local/klogd-linux/log/run b/examples/ROOT/img/services-local/klogd-linux/log/run
new file mode 100755
index 0000000..66f2cd5
--- /dev/null
+++ b/examples/ROOT/img/services-local/klogd-linux/log/run
@@ -0,0 +1,4 @@
+#!/command/execlineb -P
+s6-setuidgid klog
+exec -c
+s6-log -t s1000000 n20 /var/log/klogd
diff --git a/examples/ROOT/img/services-local/klogd-linux/run b/examples/ROOT/img/services-local/klogd-linux/run
new file mode 100755
index 0000000..453b55b
--- /dev/null
+++ b/examples/ROOT/img/services-local/klogd-linux/run
@@ -0,0 +1,5 @@
+#!/command/execlineb -P
+fdmove -c 2 1
+redirfd -r 0 /proc/kmsg
+exec -c
+ucspilogd
diff --git a/examples/ROOT/img/services-local/syslogd-linux/README b/examples/ROOT/img/services-local/syslogd-linux/README
new file mode 100644
index 0000000..a3c3ba4
--- /dev/null
+++ b/examples/ROOT/img/services-local/syslogd-linux/README
@@ -0,0 +1,7 @@
+This syslogd emulation works on any Unix where syslog() is
+implemented via a connection on the /dev/log Unix-domain socket.
+It needs a Unix superserver (see s6-networking, ucspi-unix or
+ucspi-ipc) and ucspilogd.
+A ucspilogd process is spawned for every syslog() client. It
+processes logs and sends them to stderr, i.e. the service's
+logger.
diff --git a/examples/ROOT/img/services-local/syslogd-linux/log/README b/examples/ROOT/img/services-local/syslogd-linux/log/README
new file mode 100644
index 0000000..de384ce
--- /dev/null
+++ b/examples/ROOT/img/services-local/syslogd-linux/log/README
@@ -0,0 +1,4 @@
+This logger service logs everything the syslogd service receives
+into the /var/log/syslogd/ logdir.
+You may want to edit the logging script to provide filters to
+change s6-log's behaviour.
diff --git a/examples/ROOT/img/services-local/syslogd-linux/log/run b/examples/ROOT/img/services-local/syslogd-linux/log/run
new file mode 100755
index 0000000..0d99ba9
--- /dev/null
+++ b/examples/ROOT/img/services-local/syslogd-linux/log/run
@@ -0,0 +1,5 @@
+#!/command/execlineb -P
+s6-setuidgid syslog
+exec -c
+s6-log -t s1000000 n20 /var/log/syslogd
+# Change the logging script to alter s6-log's behaviour
diff --git a/examples/ROOT/img/services-local/syslogd-linux/run b/examples/ROOT/img/services-local/syslogd-linux/run
new file mode 100755
index 0000000..f58a862
--- /dev/null
+++ b/examples/ROOT/img/services-local/syslogd-linux/run
@@ -0,0 +1,8 @@
+#!/command/execlineb -P
+fdmove -c 2 1
+exec -c
+s6-envuidgid nobody
+s6-notifywhenup -f
+s6-ipcserver -U -1 -- /dev/log
+fdmove -c 1 2
+ucspilogd IPCREMOTEEUID IPCREMOTEEGID