summaryrefslogtreecommitdiff
path: root/examples/ROOT/img/services-local/klogd-linux
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-19 01:28:09 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-19 01:28:09 +0000
commitdf8c8876bc245c6124dd4691e5a95d8f397ca152 (patch)
treefcfec66704123b58c286aab83af16ab1b5248a21 /examples/ROOT/img/services-local/klogd-linux
parent90acd08f35f9691753fdd523c6970365b6ea4b73 (diff)
downloads6-df8c8876bc245c6124dd4691e5a95d8f397ca152.tar.xz
Add examples/ subtree
Diffstat (limited to 'examples/ROOT/img/services-local/klogd-linux')
-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
4 files changed, 13 insertions, 0 deletions
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