remove dbgprint

full path to hbc
This commit is contained in:
andreas
2012-03-28 20:17:08 +00:00
parent 0fe3fbdcc2
commit dd03128ed3
+3 -2
View File
@@ -6,13 +6,14 @@ import time, os, sys
SLEEP=60 SLEEP=60
SRV="colo2.wapanafa.org" SRV="colo2.wapanafa.org"
DBG=0 DBG=0
HBC="/home/andreas/bin/hbc"
IFS=[] IFS=[]
f=os.popen('/sbin/ifconfig -a 2>/dev/null', 'r') f=os.popen('/sbin/ifconfig -a 2>/dev/null', 'r')
for l in f.readlines(): for l in f.readlines():
if len(l) > 1 and not l[0] in [' ','\t']: if len(l) > 1 and not l[0] in [' ','\t']:
r=l.split() r=l.split()
print r if DBG: print r
if r[0][-1] == ':': if r[0][-1] == ':':
r[0]=r[0][:-1] r[0]=r[0][:-1]
if r[0][:2] == 'lo': if r[0][:2] == 'lo':
@@ -37,7 +38,7 @@ while 1:
else: else:
iaddr=r[1] iaddr=r[1]
if iaddr != addrs[I]: if iaddr != addrs[I]:
msg='hbc -m "ifadd %s %s" %s' % (I, iaddr, SRV) msg='%s -m "ifadd %s %s" %s' % (HBC, I, iaddr, SRV)
if DBG: print msg if DBG: print msg
else: os.system(msg) else: os.system(msg)
addrs[I]=iaddr addrs[I]=iaddr