cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sspans <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-9181 Prevent syntax error in c...
Date Wed, 16 Dec 2015 11:14:22 GMT
Github user sspans commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1249#discussion_r47763613
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh ---
    @@ -17,21 +17,20 @@
     # under the License.
     
     STATUS=UNKNOWN
    -INTERFACE=eth1
     ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed
-e 's/[,\"]//g')
    -if [ $ROUTER_TYPE = "router" ]
    +if [ "$ROUTER_TYPE" = "router" ]
     then
     	ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c  'if [ $0 ==
2 ]; then echo "MASTER"; else echo "BACKUP"; fi')
     	STATUS=$ROUTER_STATE
     else
    -	ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}')
    -	if [ $ROUTER_STATE = "UP" ]
    +	ROUTER_STATE=$(ip addr | grep eth1 | grep state | awk '{print $9;}')
    --- End diff --
    
    You didn't mention the INTERFACE -> eth1 change in your commit description, can you
leave that part out?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message