This is shorter and easier to read.
---
 rc.multi |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/rc.multi b/rc.multi
index 46c18df..ec6fda6 100755
--- a/rc.multi
+++ b/rc.multi
@@ -13,13 +13,11 @@ run_hook multi_start
 
 # Start daemons
 for daemon in "${daemo...@]}"; do
-       if [[ $daemon = ${daemon#!} ]]; then
-               if [[ $daemon = ${daem...@} ]]; then
-                       start_daemon $daemon
-               else
-                       start_daemon_bkgd ${daemon:1}
-               fi
-       fi
+    case ${daemon:0:1} in
+        '!') continue;;     # Skip this daemon.
+        '@') start_daemon_bkgd ${daem...@};;
+        *)   start_daemon $daemon;;
+    esac
 done
 
 if [[ -x /etc/rc.local ]]; then
-- 
1.7.1

Reply via email to