summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-01-17 09:20:35 -0500
committerSimo Sorce <ssorce@redhat.com>2011-01-18 10:04:29 -0500
commit244239e27eef47fddefc64ab752a743b356a6302 (patch)
tree6f63e31cfd91a92069378c28bdb86c4cc5658cbe
parent373455026e37d93c699e4ced579c75e2af8042aa (diff)
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.
-rwxr-xr-xinstall/tools/ipactl8
1 files changed, 1 insertions, 7 deletions
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())