Signed-off-by: Gerardo Exequiel Pozzi <[email protected]>
---
 rc.sysinit |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index e07afe6..55b3d53 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -371,6 +371,13 @@ fi
 # Set console font if required
 set_consolefont
 
+if [[ -e /proc/sys/kernel/dmesg_restrict && $(< 
/proc/sys/kernel/dmesg_restrict) -eq 1 ]]; then
+    : >| /var/log/dmesg.log
+    chmod 600 /var/log/dmesg.log
+else
+    : >| /var/log/dmesg.log
+    chmod 644 /var/log/dmesg.log
+fi
 /bin/dmesg >| /var/log/dmesg.log
 
 run_hook sysinit_end
-- 
1.7.5

Reply via email to