From 6e3ce6f9776d954091deba38ef3b45c4cf4a03db Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Tue, 3 May 2011 03:04:44 -0300 Subject: [initscripts] chmod dmesg.log based on value from dmesg_restrict Signed-off-by: Gerardo Exequiel Pozzi --- rc.sysinit | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index 5b58270..84ff4cb 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -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 -- cgit v1.2.3 From 7a6fc752cf8dc09b9358810d947e6e01f9a8fc25 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Mon, 9 May 2011 12:39:32 -0300 Subject: Be consistent (with mkinitcpio) source naming of /run Signed-off-by: Gerardo Exequiel Pozzi --- rc.sysinit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index 84ff4cb..7d93427 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -18,8 +18,8 @@ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # mount /proc, /sys, /run, /dev, /run/lock, /dev/pts, /dev/shm (the api filesystems) /bin/mountpoint -q /proc || /bin/mount -n -t proc proc /proc -o nosuid,noexec,nodev -/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sysfs /sys -o nosuid,noexec,nodev -/bin/mountpoint -q /run || /bin/mount -n -t tmpfs tmpfs /run -o mode=755,size=10M,nosuid,nodev +/bin/mountpoint -q /sys || /bin/mount -n -t sysfs sys /sys -o nosuid,noexec,nodev +/bin/mountpoint -q /run || /bin/mount -n -t tmpfs run /run -o mode=755,size=10M,nosuid,nodev if ! /bin/mountpoint -q /dev; then if /bin/grep -q devtmpfs /proc/filesystems &>/dev/null; then /bin/mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid -- cgit v1.2.3