Loggear kernel "bien"
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

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 hostname -F /etc/hostname
]]) ]])
modules.data.add_data_file("/data/dmesg.log", "/var/log/dmesg.log", "root", "root")
-- Initial boot -- Initial boot
add_executable("/etc/runit/1", [[#!/bin/sh add_executable("/etc/runit/1", [[#!/bin/sh
@ -289,13 +287,6 @@ for f in /etc/runit/core-services/*.sh; do
[ -r $f ] && . $f [ -r $f ] && . $f
done 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 # create files for controlling runit
mkdir -p /run/runit mkdir -p /run/runit
install -m000 /dev/null /run/runit/stopit install -m000 /dev/null /run/runit/stopit

View file

@ -66,3 +66,9 @@ else
fi fi
fi]]) fi]])
chmod("/usr/local/bin/svlogtail", "700") 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 '']])