From 17f7e7483e46a68e2b4cea6cc76216b92370c5e3 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 4 Jun 2011 21:18:29 -0300 Subject: [initscripts] Avoid error message when switch runlevels. Going from multi to single and going back to multi, bootlogd is not running. Signed-off-by: Gerardo Exequiel Pozzi --- rc.multi | 8 +++++--- rc.single | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/rc.multi b/rc.multi index 60bb835..7af9279 100755 --- a/rc.multi +++ b/rc.multi @@ -26,8 +26,10 @@ fi run_hook multi_end -/bin/touch /var/log/boot -kill $(/bin/cat /run/bootlogd.pid) -/bin/rm /run/bootlogd.pid +if [[ -f /run/bootlogd.pid ]]; then + /bin/touch /var/log/boot + kill $(< /run/bootlogd.pid) + /bin/rm -f /run/bootlogd.pid +fi # vim: set ts=2 sw=2 noet: diff --git a/rc.single b/rc.single index 92b8f53..6a8cc29 100755 --- a/rc.single +++ b/rc.single @@ -48,9 +48,11 @@ if [[ $RUNLEVEL = 1 ]]; then exec /sbin/init -t1 S fi -/bin/touch /var/log/boot -kill $(/bin/cat /run/bootlogd.pid) -/bin/rm /run/bootlogd.pid +if [[ -f /run/bootlogd.pid ]]; then + /bin/touch /var/log/boot + kill $(< /run/bootlogd.pid) + /bin/rm -f /run/bootlogd.pid +fi # End of file # vim: set ts=2 sw=2 noet: -- cgit v1.2.3 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(+) 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(-) 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