Loggear kernel "bien"
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Cat /dev/Nulo 2022-06-19 09:57:17 -03:00
parent 121207923e
commit 8e2f3a39a1
2 changed files with 6 additions and 9 deletions

View File

@ -270,8 +270,6 @@ msg "Setting hostname..."
hostname -F /etc/hostname
]])
modules.data.add_data_file("/data/dmesg.log", "/var/log/dmesg.log", "root", "root")
-- Initial boot
add_executable("/etc/runit/1", [[#!/bin/sh
@ -289,13 +287,6 @@ for f in /etc/runit/core-services/*.sh; do
[ -r $f ] && . $f
done
dmesg >/var/log/dmesg.log
if [ $(sysctl -n kernel.dmesg_restrict 2>/dev/null) -eq 1 ]; then
chmod 0600 /var/log/dmesg.log
else
chmod 0644 /var/log/dmesg.log
fi
# create files for controlling runit
mkdir -p /run/runit
install -m000 /dev/null /run/runit/stopit

View File

@ -66,3 +66,9 @@ else
fi
fi]])
chmod("/usr/local/bin/svlogtail", "700")
modules.runit.add_service("log-kernel",
[[#!/bin/sh
exec cat /proc/kmsg]],
[[#!/bin/sh
exec logger -p kern.info -t '']])