From ddffdc9db7402bab6519bbd0e7b3fb64c231ec6d Mon Sep 17 00:00:00 2001 From: Anthony Xu Date: Tue, 25 Sep 2012 13:57:15 -0700 Subject: [PATCH] CS-16393 one typo fix make passwd service exitable --- .../debian/config/opt/cloud/bin/vpc_guestnw.sh | 2 +- .../config/opt/cloud/bin/vpc_passwd_server | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh index fcd7e84087b..8f1e0063979 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh @@ -89,7 +89,7 @@ setup_dnsmasq() { echo "dhcp-option=tag:interface-$dev,15,$DOMAIN" >> /etc/dnsmasq.d/cloud.conf service dnsmasq restart sleep 1 -} +} desetup_dnsmasq() { logger -t cloud "Desetting up dnsmasq for network $ip/$mask " diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_passwd_server b/patches/systemvm/debian/config/opt/cloud/bin/vpc_passwd_server index 2b9deb1d502..2d6b4e6580a 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_passwd_server +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_passwd_server @@ -1,13 +1,15 @@ #!/bin/bash ip=$1 -while [ -n "$ip" ] +result=$ip +while [ -n "$result" ] do - socat -lf /var/log/cloud.log TCP4-LISTEN:8080,reuseaddr,crnl,bind=$ip SYSTEM:"/opt/cloud/bin/serve_password.sh" - rc=$? - if [ $rc -ne 0 ] - then - logger -t cloud "Password server failed with error code $rc. Restarting socat..." - sleep 3 - fi + socat -lf /var/log/cloud.log TCP4-LISTEN:8080,reuseaddr,crnl,bind=$ip SYSTEM:"/opt/cloud/bin/serve_password.sh" + rc=$? + if [ $rc -ne 0 ] + then + logger -t cloud "Password server failed with error code $rc. Restarting socat..." + sleep 3 + fi + result=`ip addr show | grep $ip` done