summaryrefslogtreecommitdiffstats
path: root/modules/people/src/arping_users.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/people/src/arping_users.py')
-rwxr-xr-xmodules/people/src/arping_users.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/people/src/arping_users.py b/modules/people/src/arping_users.py
index d6f6826e..9dd95749 100755
--- a/modules/people/src/arping_users.py
+++ b/modules/people/src/arping_users.py
@@ -1,14 +1,16 @@
#!/usr/bin/python
-import subprocess,re,logging
+import subprocess,re,logging,sys
from arping import arpingy
from multiprocessing import Pool
-
DEV='eth0'
MAC_NAMES='mac_names.lst'
data = []
ret = {}
-exit (0)
+verb = False
+
+if len(sys.argv) > 1 and sys.argv[1] == 'v':
+ verb = True
def get_own_addr():
data = subprocess.Popen(['/sbin/ifconfig',DEV],
stdout=subprocess.PIPE).communicate()[0].replace('\n','')
@@ -27,7 +29,7 @@ def load_names(MAC_NAMES):
def arping_helper(dic):
return arpingy(**dic)
-for first in range(3):
+for first in range(4):
for second in range(255):
data.append({'iprange':'10.42.'+str(first)+'.'+str(second),'iface':DEV})
@@ -44,5 +46,7 @@ except:
for p in ret:
+ if verb:
+ print p[0] + " => " + p[1]
if p[1] in names:
print names[p[1]]+ " is online"