[arch-general] [PATCH 15/48] Bashify conditional checking in rc.multi

Victor Lowther victor.lowther at gmail.com
Wed Jun 30 17:47:43 EDT 2010


---
 rc.multi |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rc.multi b/rc.multi
index a7ea703..46c18df 100755
--- a/rc.multi
+++ b/rc.multi
@@ -9,12 +9,12 @@
 run_hook multi_start
 
 # Load sysctl variables if sysctl.conf is present
-[ -r /etc/sysctl.conf ] && /sbin/sysctl -q -p &>/dev/null
+[[ -r /etc/sysctl.conf ]] && /sbin/sysctl -q -p &>/dev/null
 
 # Start daemons
 for daemon in "${DAEMONS[@]}"; do
-	if [ "$daemon" = "${daemon#!}" ]; then
-		if [ "$daemon" = "${daemon#@}" ]; then
+	if [[ $daemon = ${daemon#!} ]]; then
+		if [[ $daemon = ${daemon#@} ]]; then
 			start_daemon $daemon
 		else
 			start_daemon_bkgd ${daemon:1}
@@ -22,7 +22,7 @@ for daemon in "${DAEMONS[@]}"; do
 	fi
 done
 
-if [ -x /etc/rc.local ]; then
+if [[ -x /etc/rc.local ]]; then
 	/etc/rc.local
 fi
 
-- 
1.7.1



More information about the arch-general mailing list