From e32323fb865afbfe6ebe707f9f422ca318ea4423 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Mon, 24 Jul 2017 22:02:51 -0700 Subject: [PATCH] Enable syslog on boot This enables the busybox syslog implementation, which logs to /var/log/messages, on boot. This is very helpful for debugging applications which write to syslog (e.g. NetworkManager) syslog is being set up to log to shared memory (not to disk), so log is lost 1) on reboot and 2) if the service is restarted. It can be read with `logread` --- postmarketos-base/APKBUILD | 2 +- postmarketos-base/postmarketos-base.post-install | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/postmarketos-base/APKBUILD b/postmarketos-base/APKBUILD index 3d320f6ab..b0e8fa2ab 100644 --- a/postmarketos-base/APKBUILD +++ b/postmarketos-base/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-base pkgver=2 -pkgrel=1 +pkgrel=2 pkgdesc="Meta package for minimal postmarketos base" url="https://github.com/postmarketOS" arch="noarch" diff --git a/postmarketos-base/postmarketos-base.post-install b/postmarketos-base/postmarketos-base.post-install index ddd3dca4e..5e094b0ce 100644 --- a/postmarketos-base/postmarketos-base.post-install +++ b/postmarketos-base/postmarketos-base.post-install @@ -6,7 +6,7 @@ for service in devfs dmesg; do rc-update -q add $service sysinit done -for service in hwclock modules sysctl hostname bootmisc wpa_supplicant wifi-handler; do +for service in hwclock modules sysctl hostname bootmisc wpa_supplicant wifi-handler syslog; do rc-update -q add $service boot done for service in haveged sshd udev; do @@ -48,3 +48,6 @@ if ! apk audit /etc | grep -q etc/motd; then echo '' } >/etc/motd fi + +# Enable syslog to SHM. Note: size is 4048KiB, which *should* be More Than Enough(TM) for all but the most chattiest of devices. +sed s/=\"/=\""-C4048 "/ -i /etc/conf.d/syslog