FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 06-30-2010, 09:47 PM
Victor Lowther
 
Default Bashify conditional checking in rc.multi

---
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
 

Thread Tools




All times are GMT. The time now is 08:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org