about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-x15
1 files changed, 5 insertions, 0 deletions
diff --git a/1 b/1
index bba2dd3..9e9f413 100755
--- a/1
+++ b/1
@@ -16,6 +16,11 @@ for f in /etc/runit/core-services/*.sh; do
 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
 
 mkdir -p /run/runit
 install -m100 /dev/null /run/runit/stopit