/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-ctl

  • Committer: teddy at bsnet
  • Date: 2010-09-09 18:16:14 UTC
  • mfrom: (237.2.35 mandos-empty-device)
  • Revision ID: teddy@fukt.bsnet.se-20100909181614-oanlmvkzsiodbo3c
Merge in branch to interpret an empty device name to mean
"autodetect".

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    'last_enabled': u'Last Enabled',
25
25
    'checker': u'Checker',
26
26
    }
27
 
defaultkeywords = ('name', 'enabled', 'timeout', 'last_checked_ok',
28
 
                   'checker')
 
27
defaultkeywords = ('name', 'enabled', 'timeout', 'last_checked_ok')
29
28
domain = 'se.bsnet.fukt'
30
29
busname = domain + '.Mandos'
31
30
server_path = '/'
128
127
                  help="Start checker for client")
129
128
parser.add_option("--stop-checker", action="store_true",
130
129
                  help="Stop checker for client")
131
 
parser.add_option("-V", "--is-valid", action="store_true",
132
 
                  help="Check if client is still valid")
 
130
parser.add_option("-V", "--is-enabled", action="store_true",
 
131
                  help="Check if client is enabled")
133
132
parser.add_option("-r", "--remove", action="store_true",
134
133
                  help="Remove client")
135
134
parser.add_option("-c", "--checker", type="string",
178
177
        client.StartChecker(dbus_interface=client_interface)
179
178
    if options.stop_checker:
180
179
        client.StopChecker(dbus_interface=client_interface)
181
 
    if options.is_valid:
 
180
    if options.is_enabled:
182
181
        sys.exit(0 if client.Get(client_interface,
183
182
                                 u"enabled",
184
183
                                 dbus_interface=dbus.PROPERTIES_IFACE)