diff options
Diffstat (limited to 'examples/ROOT/img/tmpfs/service')
-rw-r--r-- | examples/ROOT/img/tmpfs/service/.s6-svscan/README | 2 | ||||
l--------- | examples/ROOT/img/tmpfs/service/.s6-svscan/crash | 1 | ||||
l--------- | examples/ROOT/img/tmpfs/service/.s6-svscan/finish | 1 | ||||
-rw-r--r-- | examples/ROOT/img/tmpfs/service/README | 5 | ||||
-rw-r--r-- | examples/ROOT/img/tmpfs/service/getty/README | 2 | ||||
-rwxr-xr-x | examples/ROOT/img/tmpfs/service/getty/run | 2 | ||||
-rw-r--r-- | examples/ROOT/img/tmpfs/service/s6-svscan-log/README | 9 | ||||
-rwxr-xr-x | examples/ROOT/img/tmpfs/service/s6-svscan-log/run | 13 |
8 files changed, 35 insertions, 0 deletions
diff --git a/examples/ROOT/img/tmpfs/service/.s6-svscan/README b/examples/ROOT/img/tmpfs/service/.s6-svscan/README new file mode 100644 index 0000000..6500cc6 --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/.s6-svscan/README @@ -0,0 +1,2 @@ +This is the image of the control directory of the s6-svscan process. +Notice how the symlinks point to ever-existing scripts. diff --git a/examples/ROOT/img/tmpfs/service/.s6-svscan/crash b/examples/ROOT/img/tmpfs/service/.s6-svscan/crash new file mode 120000 index 0000000..262c196 --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/.s6-svscan/crash @@ -0,0 +1 @@ +/etc/s6-init/crash
\ No newline at end of file diff --git a/examples/ROOT/img/tmpfs/service/.s6-svscan/finish b/examples/ROOT/img/tmpfs/service/.s6-svscan/finish new file mode 120000 index 0000000..feb771e --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/.s6-svscan/finish @@ -0,0 +1 @@ +/etc/s6-init/init-stage3
\ No newline at end of file diff --git a/examples/ROOT/img/tmpfs/service/README b/examples/ROOT/img/tmpfs/service/README new file mode 100644 index 0000000..dab0447 --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/README @@ -0,0 +1,5 @@ +This is the initial image of the scan directory. +When init executes into s6-svscan, s6-svscan will immediately +start the "s6-svscan-log" service, which logs s6-svscan's own +output, and the "getty1" service, which spawns a getty on +tty1 as early as possible, in case debugging is needed. diff --git a/examples/ROOT/img/tmpfs/service/getty/README b/examples/ROOT/img/tmpfs/service/getty/README new file mode 100644 index 0000000..efb079b --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/getty/README @@ -0,0 +1,2 @@ +This service is started very early, to make sure a tty exists as soon +as s6-svscan is run, so early debugging is possible. diff --git a/examples/ROOT/img/tmpfs/service/getty/run b/examples/ROOT/img/tmpfs/service/getty/run new file mode 100755 index 0000000..3240ffd --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/getty/run @@ -0,0 +1,2 @@ +#!/command/execlineb -P +getty -L -H DEBUG 38400 tty1 diff --git a/examples/ROOT/img/tmpfs/service/s6-svscan-log/README b/examples/ROOT/img/tmpfs/service/s6-svscan-log/README new file mode 100644 index 0000000..282d4f0 --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/s6-svscan-log/README @@ -0,0 +1,9 @@ +This service reads from the "fifo" named pipe and logs +what it reads to the /tmp/uncaught-logs log directory. +The whole supervision tree has its stderr redirected to "fifo", +as well as services that do not have their own logger. +So, /tmp/uncaught-logs is the catch-all logger: logs that aren't +caught anywhere else end up there. + + You should create the "fifo" named pipe in this directory, +belonging to nobody:nogroup with rights 0622. diff --git a/examples/ROOT/img/tmpfs/service/s6-svscan-log/run b/examples/ROOT/img/tmpfs/service/s6-svscan-log/run new file mode 100755 index 0000000..a55a822 --- /dev/null +++ b/examples/ROOT/img/tmpfs/service/s6-svscan-log/run @@ -0,0 +1,13 @@ +#!/command/execlineb -P +redirfd -w 2 /dev/console +redirfd -rnb 0 fifo +s6-setuidgid nobody +exec -c +s6-log -bpt /tmp/uncaught-logs + +# The -p option is important: +# even if s6-svscan is told to kill everything, +# you do not want this logger to die. +# The -b option ensures s6-log processes lines one +# at a time, so it doesn't eat up too much memory +# in case of a problem spike. |