aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-23 19:54:23 +0200
committerKurt J. Bosch <kjb-temp-2009@alpenjodel.de>2011-06-24 13:52:58 +0200
commitd19b31f04339ed50061e4c7d21288491f2f9ebd6 (patch)
tree64a419449b1ec5b8083c31626c2ff4efeebb07fb /rc.sysinit
parent727acff0c55abdacde0cc8832f18fed729bccc5a (diff)
downloadinitscripts-d19b31f04339ed50061e4c7d21288491f2f9ebd6.tar.xz
Simplify creating files by using /bin/install
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit14
1 files changed, 4 insertions, 10 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 6c1fef9..13d789f 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -257,9 +257,7 @@ stat_busy "Removing Leftover Files"
[[ ! -L /var/run && ! -L /var/run/daemons ]] &&
rm -rf /var/run/daemons &&
ln -s /run/daemons /var/run/daemons
- : >| /var/run/utmp
- chmod 0664 /var/run/utmp
- chown root:utmp /var/run/utmp
+ install -Tm 0664 -o root -g utmp <(:) /var/run/utmp
# Keep {x,k,g}dm happy with xorg
mkdir -m1777 /tmp/.{X11,ICE}-unix
stat_done
@@ -272,8 +270,7 @@ fi
stat_busy "Setting Locale: ${LOCALE:=en_US}"
# Flush old locale settings
- : >| /etc/profile.d/locale.sh
- chmod 755 /etc/profile.d/locale.sh
+ install -Tm 0755 <(:) /etc/profile.d/locale.sh
# Set user defined locale
echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh
stat_done
@@ -306,13 +303,10 @@ fi
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
+ install -Tm 0600 <( dmesg ) /var/log/dmesg.log
else
- : >| /var/log/dmesg.log
- chmod 644 /var/log/dmesg.log
+ install -Tm 0644 <( dmesg ) /var/log/dmesg.log
fi
-dmesg >| /var/log/dmesg.log
run_hook sysinit_end