Browse Source

pusb_check -q now shuts down debugging as well

pusb_hotplug will call pusb_check using -q
Andrea Luzzardi 18 years ago
parent
commit
22f57ed872
2 changed files with 10 additions and 5 deletions
  1. +5
    -1
      src/pusb_check.c
  2. +5
    -4
      tools/pusb_hotplug

+ 5
- 1
src/pusb_check.c View File

@ -120,7 +120,11 @@ int main(int argc, char **argv)
pusb_conf_init(&opts); pusb_conf_init(&opts);
if (!pusb_conf_parse(conf_file, &opts, user, service)) if (!pusb_conf_parse(conf_file, &opts, user, service))
return (1); return (1);
opts.quiet = quiet;
if (quiet)
{
opts.quiet = 1;
opts.debug = 0;
}
pusb_log_init(&opts); pusb_log_init(&opts);
if (mode == 1) if (mode == 1)
return (!pusb_check_perform_authentication(&opts, user, service)); return (!pusb_check_perform_authentication(&opts, user, service));


+ 5
- 4
tools/pusb_hotplug View File

@ -144,10 +144,11 @@ serial = device.find('serial').text
def authChangeCallback(event): def authChangeCallback(event):
print 'User %s is now %s' % (username, event) print 'User %s is now %s' % (username, event)
retValue = os.system("%s -c %s -u %s -s pusb_hotplug -a" % (
options['path'], options['configFile'], username))
print retValue
if retValue == 0:
cmdLine = "%s -q -c %s -u %s -s pusb_hotplug -a" % (options['path'],
options['configFile'],
username)
print 'Executing %s' % cmdLine
if not os.system(cmdLine):
run = events['unlock'] run = events['unlock']
else: else:
run = events['lock'] run = events['lock']


Loading…
Cancel
Save