autoinst

scripts to make installation of custom debian easier and more automated
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

commit 7633944057a9fd7b77429290bd054eee52a2cfe9
parent 61fe9512014f9b81460aba0ab2d0b59cee112428
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Thu, 12 Nov 2020 20:08:11 +0100

fix bad service name for etc/runit/log.run

Diffstat:
MTODO | 1+
Mtemplates/generic/root/etc/runit/log.run | 8+++++++-
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/TODO b/TODO @@ -17,3 +17,4 @@ improve udhcpc script: requires conf for now, should find a better trick make debootstrap debuggable, for a start, and then, make it so that it does not pollute logs. improve system resilience by disabling overcommit improve system resilience by fixing the random boot freeze +normalize etc/log.run, etc/sv/udhcpc/run, etc/sv/getty-ttyX diff --git a/templates/generic/root/etc/runit/log.run b/templates/generic/root/etc/runit/log.run @@ -1,6 +1,12 @@ #!/bin/sh -SVLOG="$(basename $(dirname $(pwd)))" +# not using cut because ps prints a header, and option to +# avoid that "feature" is not standard. Other alternative +# would be to not print 1st line, but it would require 2 +# pipes (ps | tail | cut) and would be similarly random. +SERVICE="$(ps -oargs $PPID | sed -n '/runsv/ s/runsv // p')" + +SVLOG="$(basename $(dirname $SERVICE))" LOG_PATH="/var/log/$SVLOG" install -d -m 0750 -o root -g adm "$LOG_PATH" exec svlogd -tt "$LOG_PATH"