[Oval-commits] r233 - trunk/oval-agent
Javier Fernandez-Sanguino Pen~a
jfs at alioth.debian.org
Tue Sep 4 19:45:41 UTC 2007
Author: jfs
Date: 2007-09-04 19:45:40 +0000 (Tue, 04 Sep 2007)
New Revision: 233
Modified:
trunk/oval-agent/oval-agent.py
Log:
Set bang line to python2.4
Modified: trunk/oval-agent/oval-agent.py
===================================================================
--- trunk/oval-agent/oval-agent.py 2007-09-04 19:43:45 UTC (rev 232)
+++ trunk/oval-agent/oval-agent.py 2007-09-04 19:45:40 UTC (rev 233)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Written by Pavel Vinogradov
@@ -25,7 +25,7 @@
print """usage: python %s [-h] [-c <config>]
\t-h\tthis help
-\t-c\tpath to config file (by default oval-agent.cfg""" % prog
+\t-c\tpath to config file (by default /etc/oval/agent.conf""" % prog
class agentThread:
config = SafeConfigParser()
@@ -99,10 +99,10 @@
if __name__ == "__main__":
#Parse command line options.
#By default we search for config file in current directory
- opts = {'-c' : 'oval-agent.cfg'}
+ opts = {'-c' : '/etc/oval/agent.conf'}
try:
- opt, args = getopt.getopt (sys.argv[1:], 'hc:')
+ opt, args = getopt.getopt (sys.argv[1:], 'vhc:')
except getopt.GetoptError:
usage (sys.argv[0])
sys.exit(1)
@@ -114,6 +114,10 @@
usage(sys.argv[0])
sys.exit(0)
+ if opts.has_key ('-v'):
+ print 'oval-agent version: 0.2'
+ sys.exit(0)
+
#Crate agent instance and run it
try:
client = agentThread(opts['-c'])
More information about the Oval-commits
mailing list