How to redirect to /run/uncaught-logs/current?

From: Jean Louis <>
Date: Wed, 2 Nov 2016 20:54:44 +0200


I am following instructions from: "Switching from another
service manager", so I have first implemented start/stops in up/down,
from rc.d and init.d scripts. And now I am converting what has to be
done into the execlineb small scripts up/down or "run"s.

I have figured out how to update the database, and replace it, and
that is how I am debugging what I am doing.

There are things that I wish to share, and something to ask.

Laurent has helped me to understand how to implement user run emacs as
daemon. I am using (server-start) in ~/.emacs and service
/etc/s6-rc/services/admin:emacs with the run as following, and it is
working pretty well. It is being activated when encrypted partition is
there, it has directory "Work". I can then start emacsclient without
problems, and whenever it crushes, it is again there. Using emacs
--daemon was not good idea.

#!/bin/execlineb -P
if { s6-test -d /home/data1/protected/Work }
s6-setuidgid admin
backtick -n HOME { homeof admin }
/usr/bin/screen -S emacs -D -m --
/usr/bin/emacs --user admin --chdir /home/data1/protected

I am also starting a postgresql database, only when the encrypted
database directory is there, and it is working pretty well.

#!/bin/execlineb -P
if { s6-test -d /home/data1/database/postgresql/9.6 }
if { s6-test -d /run/postgresql }
background { s6-echo "Starting PostgreSQL Database" }
s6-setuidgid postgres
backtick -n HOME { homeof postgres }
/usr/bin/postgres -D /home/data1/database/postgresql/9.6

And here is what I wish and don't know how to handle yet:

I have acpid, and I wish that output from acpid is going to
/run/uncaught-logs/current, and I have it like this, and I get on boot
screen, the messages:

acpid: starting up with netlink and the input layer, and such other
messages. What should I do to bring it to the logs? I have tried
various options.

#!/bin/execlineb -P
#redirfd -wnb 1 /run/service/s6-svscan-log/fifo
fdmove -c 2 1
/usr/sbin/acpid -fl

And I have question on udevd, I am running it like this, as I found a
working script on Github:

#!/bin/execlineb -P

fdmove -c 2 1
background -d {
    fdmove 1 3
    loopwhilex -o 1
    ifelse { udevadm control --reload-rules } { echo }
    foreground { sleep 1 }
    exit 1
fdclose 3
unexport !

However, the above script is not writing anything into
/run/uncaught-logs/current -- am I doing something wrong?

I appreciate example of other people running udevd.

Then the handling of eth0, I have it like this:

redirfd -wnb 1 /run/service/s6-svscan-log/fifo
foreground { /sbin/ifconfig eth0 up }
exec -c
/sbin/ifconfig eth0 up

and I get this on screen, it is possibly stderr,

[ 8.238909] 0000:05:00.0: Missing Free firmware ....

I am not concerned about firmware, I just wish to redirect that output
to /run/uncaught-logs/current.

I am appreciating your advises on how to make this happen, as I am
learning. And I do read every command in documentation, and certainly
I don't catch all definitions well.

Further, I would like to implement on the source based GNU/Linux
system here, the /etc/execline-shell and /etc/execline-startup, where
are those scripts? I have searched all skarnet packages, and could not
find it yet. I would like some examples from other people.

It would be good that people using skarnet tools, s6-rc services,
publish their services onto git or Internet, so that it becomes
reusable for others to set up the system.

Thank you,
Jean Louis
Received on Wed Nov 02 2016 - 18:54:44 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC