[PATCH 2/2] rc.sysinit: Reduce number of calls to /bin/rm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Take full advantage of /bin/rm accepting multiple arguments. We still
use two calls to separate the recursive from the non-recursive call.
---
 rc.sysinit |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index b25f7ac..0af84de 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -270,11 +270,8 @@ if [[ -f $RANDOM_SEED ]]; then
 fi
 
 stat_busy "Removing Leftover Files"
-/bin/rm -f /etc/nologin &>/dev/null
-/bin/rm -f /etc/shutdownpid &>/dev/null
-/bin/rm -f /var/lock/* &>/dev/null
+/bin/rm -f /etc/{nologin,shutdownpid} /var/lock/* /forcefsck &>/dev/null
 /bin/rm -rf /tmp/* /tmp/.* &>/dev/null
-/bin/rm -f /forcefsck &>/dev/null
 [[ -d /var/run ]] && /usr/bin/find /var/run/ \! -type d -delete  )
 : >| /var/run/utmp
 /bin/chmod 0664 /var/run/utmp
-- 
1.7.2.3



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux