[arch-projects] [RFC] [PATCH] [initscripts] chmod dmesg.log based on value from dmesg_restrict
3 May
2011
3 May
'11
6:11 a.m.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- 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
4946
Age (days ago)
4946
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gerardo Exequiel Pozzi