rhel: Simplify ifup-ovs script use of "case".
authorBen Pfaff <blp@nicira.com>
Fri, 3 Feb 2012 17:33:47 +0000 (09:33 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 3 Feb 2012 17:34:44 +0000 (09:34 -0800)
Suggested-by: "Alexey I. Froloff" <raorn@altlinux.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
rhel/etc_sysconfig_network-scripts_ifup-ovs

index 18cebc4ddcab21ad5db6a561f157faea4507b8dd..4773ee4270fa16d53518cb5f2cffd925134d9472 100755 (executable)
@@ -37,11 +37,8 @@ case "$TYPE" in
        OVSBridge)
                ovs-vsctl -- --may-exist add-br "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
                if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
-                       case ${OVSDHCPINTERFACES} in
-                               ${OVSINTF#ifcfg-} | \
-                               "${OVSINTF#ifcfg-},"* | \
-                               *",${OVSINTF#ifcfg-}" | \
-                               *",${OVSINTF#ifcfg-},"*)
+                       case ,${OVSDHCPINTERFACES}, in
+                               *,${OVSINTF#ifcfg-},*)
                                        BOOTPROTO=dhcp ${OTHERSCRIPT} ${CONFIG}
                                ;;
                        esac