r1236 + warn about 1st port in a VLAN
authorDenis Ovsienko <infrastation@yandex.ru>
Tue, 23 Oct 2007 11:18:34 +0000 (11:18 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Tue, 23 Oct 2007 11:18:34 +0000 (11:18 +0000)
+ ignore warnings in error summary

gateways/switchvlans/main

index 74ddaa05bce4275a027a15ff8ea55bf0f6716859..8871e82bb5c0a17e68a07922a25942fef305fdcd 100755 (executable)
@@ -191,8 +191,13 @@ do_set()
                        continue
                fi
                echo "$portname $newvlan" >> "$REQUESTS"
+               cmembers=`grep -c ",$newvlan$" "$PORTINFO"`
+               if [ "$cmembers" = "0" ]; then
+                       echo "W!Port $portname seems to be the first in VLAN $newvlan at this switch." >> "$REPLIES"
+                       echo "W!Check uplink/downlink configuration for proper operation." >> "$REPLIES"
+               fi
        done
-       nr=`egrep -c '^.' "$REPLIES"`
+       nr=`egrep -c '^E!.' "$REPLIES"`
        if [ "$nr" -ge 1 ]; then
                echo "W!$nr change request(s) have been ignored" >> "$REPLIES"
        fi