diff options
author | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-05-03 03:04:44 -0300 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-06-04 21:37:33 -0300 |
commit | 6e3ce6f9776d954091deba38ef3b45c4cf4a03db (patch) | |
tree | 3193f740425ac9cb6098f46c19e105dd7aa8c80b /rc.sysinit | |
parent | 17f7e7483e46a68e2b4cea6cc76216b92370c5e3 (diff) |
[initscripts] chmod dmesg.log based on value from dmesg_restrict
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -368,6 +368,13 @@ for f in cd net; do /bin/cat "/run/udev/tmp-rules--70-persistent-$f.rules" >> "/etc/udev/rules.d/70-persistent-$f.rules" done +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 |