]> git.pld-linux.org Git - packages/xinetd.git/commitdiff
- use case statement for multiple choices
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 20 Jul 2010 09:25:50 +0000 (09:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xinetd.inet.sh -> 1.15

xinetd.inet.sh

index 3c554ae2f61611384081e942c31d4bb2c23a5013..0947bd36747f34fd0027d059788f631733e97a81 100644 (file)
@@ -91,16 +91,19 @@ parse_one_service()
 
        [ "${DAEMONARGS:-n}" = "n" ] || echo "  server_args     = $DAEMONARGS"
 
-       for i in $FLAGS ; do
-               if [ "$i" = "wait" ]; then
+       for i in $FLAGS; do
+               case "$i" in
+               wait)
                        echo "  wait            = yes"
-               elif [ "$i" = "nowait" ]; then
+                       ;;
+               nowait)
                        echo "  wait            = no"
                        [ "${MAX_CONNECTIONS:-n}" = "n" ] || echo "     instances       = $MAX_CONNECTIONS"
                        [ "${MAX_CONNECTIONS_PER_SOURCE:-n}" = "n" ] || echo "  per_source      = $MAX_CONNECTIONS_PER_SOURCE"
-               else
+               *)
                        XFLAGS="$XFLAGS $i"
-               fi
+                       ;;
+               esac
        done
        [ "${XFLAGS:-n}" = "n" ]        || echo "       flags           =$XFLAGS"
 
This page took 0.117365 seconds and 4 git commands to generate.