From 22f57ed8727cf55078b7d96bad9a63292182adf2 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Sun, 22 Oct 2006 01:49:12 +0000 Subject: [PATCH] pusb_check -q now shuts down debugging as well pusb_hotplug will call pusb_check using -q --- src/pusb_check.c | 6 +++++- tools/pusb_hotplug | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pusb_check.c b/src/pusb_check.c index 85c59b7..1a3258b 100644 --- a/src/pusb_check.c +++ b/src/pusb_check.c @@ -120,7 +120,11 @@ int main(int argc, char **argv) pusb_conf_init(&opts); if (!pusb_conf_parse(conf_file, &opts, user, service)) return (1); - opts.quiet = quiet; + if (quiet) + { + opts.quiet = 1; + opts.debug = 0; + } pusb_log_init(&opts); if (mode == 1) return (!pusb_check_perform_authentication(&opts, user, service)); diff --git a/tools/pusb_hotplug b/tools/pusb_hotplug index 3cc9a55..1be97ad 100755 --- a/tools/pusb_hotplug +++ b/tools/pusb_hotplug @@ -144,10 +144,11 @@ serial = device.find('serial').text def authChangeCallback(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'] else: run = events['lock']