aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-10-07 20:14:19 -0700
committerAaron Griffin <aaronmgriffin@gmail.com>2009-10-07 20:14:19 -0700
commit4927f7decd20315a7020e9e37ef9f54fbfaf6e46 (patch)
tree425b6b66efea31e18bcfc12d6b20fd21b7c329f0 /rc.sysinit
parent38f6917c9ec97f5d72fb0c72b001e7a97bfe6122 (diff)
downloadinitscripts-4927f7decd20315a7020e9e37ef9f54fbfaf6e46.tar.xz
Replace 'truncate file' logic in case of noclobber
We use ": > /foo" in a few cases to truncate a file. If noclobber happens to be set, this fails, so we'll use bash's >| operator instead to force it Suggested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit6
1 files changed, 3 insertions, 3 deletions
diff --git a/rc.sysinit b/rc.sysinit
index a0c4e6f..2b0231b 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -281,7 +281,7 @@ fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
-: > /etc/mtab
+: >| /etc/mtab
# make sure / gets written to /etc/mtab
/bin/mount -o remount,rw /
# Write /proc, /sys and /dev to /etc/mtab
@@ -324,7 +324,7 @@ stat_busy "Removing Leftover Files"
/bin/rm -rf /tmp/* /tmp/.* &>/dev/null
/bin/rm -f /forcefsck &>/dev/null
(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; )
-: > /var/run/utmp
+: >| /var/run/utmp
/bin/chmod 0664 /var/run/utmp
# Keep {x,k,g}dm happy with xorg
/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix
@@ -346,7 +346,7 @@ fi
status "Updating Module Dependencies" /sbin/depmod -A
# Flush old locale settings
-: >/etc/profile.d/locale.sh
+: >| /etc/profile.d/locale.sh
/bin/chmod 755 /etc/profile.d/locale.sh
# Set user defined locale
[ -z "$LOCALE" ] && LOCALE="en_US"