From 244239e27eef47fddefc64ab752a743b356a6302 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 17 Jan 2011 09:20:35 -0500 Subject: Let ipactl output errors to stderr Init scripts normally do not log to syslog, instead they write errors to the stderr pipe. Do the same. --- install/tools/ipactl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'install') diff --git a/install/tools/ipactl b/install/tools/ipactl index ee6783ed3..0254a2762 100755 --- a/install/tools/ipactl +++ b/install/tools/ipactl @@ -27,7 +27,6 @@ try: import logging import ldap import socket - import syslog except ImportError: print >> sys.stderr, """\ There was a problem importing one of the required Python modules. The @@ -51,8 +50,7 @@ def parse_options(): return safe_options, options, args def emit_err(err): - syslog.syslog(syslog.LOG_ERR, err) - print err + sys.stderr.write(err) def get_config(): base = "cn=%s,cn=masters,cn=ipa,cn=etc,%s" % (socket.gethostname(), @@ -240,8 +238,6 @@ def main(): api.bootstrap(context='cli', debug=options.debug) api.finalize() - syslog.openlog('ipa', syslog.LOG_NDELAY, syslog.LOG_DAEMON) - serverid = dsinstance.realm_to_serverid(api.env.realm) if args[0].lower() == "start": @@ -253,8 +249,6 @@ def main(): elif args[0].lower() == "status": ipa_status(serverid) - syslog.closelog() - try: if __name__ == "__main__": sys.exit(main()) -- cgit