summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2012-11-05 08:59:45 -0600
committerSol Jerome <sol.jerome@gmail.com>2012-11-05 09:00:18 -0600
commit3dd5bebdbbeadf496f65bfac3c485c8e4fac0427 (patch)
tree30983bbb4ccec265a650def732cdea8bca9261b4 /src/sbin
parentea5110cf629a4547070ff747bafe3cfae5233cd1 (diff)
downloadbcfg2-3dd5bebdbbeadf496f65bfac3c485c8e4fac0427.tar.gz
bcfg2-3dd5bebdbbeadf496f65bfac3c485c8e4fac0427.tar.bz2
bcfg2-3dd5bebdbbeadf496f65bfac3c485c8e4fac0427.zip
bcfg2-build-reports: Remove deprecated ping options
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-build-reports17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/sbin/bcfg2-build-reports b/src/sbin/bcfg2-build-reports
index df6997d38..27e7c2475 100755
--- a/src/sbin/bcfg2-build-reports
+++ b/src/sbin/bcfg2-build-reports
@@ -150,7 +150,6 @@ def pretty_print(element, level=0):
if __name__ == '__main__':
- ping=True
all=False
if '-C' in sys.argv:
cfpath = sys.argv[sys.argv.index('-C') + 1]
@@ -170,11 +169,11 @@ if __name__ == '__main__':
#websrcspath = "/usr/share/bcfg2/web-rprt-srcs/"
try:
- opts, args = getopt.getopt(sys.argv[1:], "C:hAc:Ns:", ["help", "all", "config=","no-ping", "stats="])
+ opts, args = getopt.getopt(sys.argv[1:], "C:hAc:Ns:", ["help", "all", "config=", "stats="])
except getopt.GetoptError:
mesg = sys.exc_info()[1]
# Print help information and exit:
- print("%s\nUsage:\nbcfg2-build-reports [-h][-A (include ALL clients)] [-c <configuration-file>] [-s <statistics-file>][-N (do not ping clients)]" % (mesg))
+ print("%s\nUsage:\nbcfg2-build-reports [-h][-A (include ALL clients)] [-c <configuration-file>] [-s <statistics-file>]" % (mesg))
raise SystemExit(2)
for o, a in opts:
if o in ("-h", "--help"):
@@ -184,22 +183,10 @@ if __name__ == '__main__':
all=True
if o in ("-c", "--config"):
configpath = a
- if o in ("-N", "--no-ping"):
- ping = False
if o in ("-s", "--stats"):
statpath = a
- # See if hostinfo.xml exists, and is less than 23.5 hours old
- #try:
- #hostinstat = os.stat(hostinfopath)
- #if (time() - hostinstat[9])/(60*60) > 23.5:
- if ping:
- os.system('bcfg2-ping-sweep -C %s' % cfpath) # bcfg2-ping-sweep needs to be in path
- #except OSError:
- # os.system('GenerateHostInfo')#Generate HostInfo needs to be in path
-
-
"""Reads data & config files."""
try:
statsdata = XML(open(statpath).read())