[arch-projects] [initscripts] [PATCH 12/13] Some more cosmetics

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Fri Jun 24 05:15:02 EDT 2011


---
 functions   |    4 ++--
 rc.shutdown |    2 +-
 rc.sysinit  |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/functions b/functions
index 93d0147..06828c3 100644
--- a/functions
+++ b/functions
@@ -24,7 +24,7 @@ calc_columns () {
 	fi
 
 	# we use 13 characters for our own stuff
-	STAT_COL=$(( $STAT_COL - 13 ))
+	STAT_COL=$(( STAT_COL - 13 ))
 
 	if [[ -t 1 ]]; then
 		SAVE_POSITION="\e[s"
@@ -146,7 +146,7 @@ stat_die() {
 status() {
 	stat_busy "$1"
 	shift
-	if "$@" >/dev/null 2>&1; then
+	if "$@" &>/dev/null; then
 		stat_done
 		return 0
 	fi
diff --git a/rc.shutdown b/rc.shutdown
index b0b97d6..473953f 100755
--- a/rc.shutdown
+++ b/rc.shutdown
@@ -26,7 +26,7 @@ RANDOM_SEED=/var/lib/misc/random-seed
 install -TDm 0600 <(:) $RANDOM_SEED
 POOL_FILE=/proc/sys/kernel/random/poolsize
 if [[ -r $POOL_FILE ]]; then
-	read POOL_SIZE <$POOL_FILE
+	read POOL_SIZE < $POOL_FILE
 else
 	POOL_SIZE=512
 fi
diff --git a/rc.sysinit b/rc.sysinit
index 5167a14..52d9d4b 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -244,8 +244,7 @@ if [[ -f $RANDOM_SEED ]]; then
 fi
 
 stat_busy "Removing Leftover Files"
-	rm -rf /etc/{nologin,shutdownpid} /forcefsck &>/dev/null
-	rm -rf /tmp/* /tmp/.* &>/dev/null
+	rm -rf /etc/{nologin,shutdownpid} /forcefsck /tmp/* /tmp/.*
 	[[ ! -L /var/lock ]] && rm -rf /var/lock/*
 	[[ ! -L /var/run && -d /var/run ]] && find /var/run/ \! -type d -delete
 	[[ ! -L /var/run && ! -L /var/run/daemons ]] &&
@@ -258,7 +257,7 @@ stat_done
 
 if [[ $HOSTNAME ]]; then
 	stat_busy "Setting Hostname: $HOSTNAME"
-		echo $HOSTNAME > /proc/sys/kernel/hostname
+		echo "$HOSTNAME" > /proc/sys/kernel/hostname
 	stat_done
 fi
 
@@ -296,7 +295,8 @@ fi
 # Set console font if required
 set_consolefont
 
-if [[ -e /proc/sys/kernel/dmesg_restrict && $(< /proc/sys/kernel/dmesg_restrict) -eq 1 ]]; then
+if [[ -e /proc/sys/kernel/dmesg_restrict ]] &&
+	(( $(< /proc/sys/kernel/dmesg_restrict) == 1 )); then
     install -Tm 0600 <( dmesg ) /var/log/dmesg.log
 else
     install -Tm 0644 <( dmesg ) /var/log/dmesg.log
-- 
1.7.1



More information about the arch-projects mailing list