one typo fix
    make passwd service exitable
This commit is contained in:
Anthony Xu 2012-09-25 13:57:15 -07:00
parent b59c3c8885
commit ddffdc9db7
2 changed files with 11 additions and 9 deletions

View File

@ -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 "

View File

@ -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