When running ipa-client-install in unattended mode there were some cases where there was no or not very helpful output describing what is missing.

ticket 828

>From 84ee8b5ffd4a4c909769b94160e3b5a3c890c444 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Fri, 21 Jan 2011 10:40:09 -0500
Subject: [PATCH] Improve output when options are not found in non-interactive client install

We should still give some feedback when things go wrong when in
non-interactive mode.

ticket 828
 ipa-client/ipa-install/ipa-client-install |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index c95b828..b233097 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -542,6 +542,7 @@ def main():
         if options.domain:
             cli_domain = options.domain
         elif options.unattended:
+            print >>sys.stderr, "Unable to discover domain, not provided on command line"
             return ret
             print "DNS discovery failed to determine your DNS domain"
@@ -561,6 +562,7 @@ def main():
         if options.server:
             cli_server = options.server
         elif options.unattended:
+            print >>sys.stderr, "Unable to find IPA Server to join"
             return ret
             print "DNS discovery failed to find the IPA Server"
@@ -654,7 +656,7 @@ def main():
                         if sys.stdin.isatty():
-                            sys.exit("Password must be provided in non-interactive mode")
+                            sys.exit("Password must be provided in non-interactive mode.\nThis can be done via echo password | ipa-client-install ... or\nwith the -w option.")
                             stdin = sys.stdin.readline()

Freeipa-devel mailing list

Reply via email to