summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-09-10 17:51:08 -0400
committerRob Crittenden <rcritten@redhat.com>2010-09-16 11:54:43 -0400
commitd57dd9534d97055803b7be67b56fc61bbd9a4ab5 (patch)
tree9f4b2efb41440fe77f0a232f833ba41bf4b2ab58 /install/tools/ipa-replica-install
parentd43eb785f55104a05af624078a47c397477d49b3 (diff)
downloadfreeipa-d57dd9534d97055803b7be67b56fc61bbd9a4ab5.tar.gz
freeipa-d57dd9534d97055803b7be67b56fc61bbd9a4ab5.tar.xz
freeipa-d57dd9534d97055803b7be67b56fc61bbd9a4ab5.zip
Add --no-host-dns argument to ipa-replica-install
The server installer has this option, the replica installer should have it too. ticket 146
Diffstat (limited to 'install/tools/ipa-replica-install')
-rwxr-xr-xinstall/tools/ipa-replica-install9
1 files changed, 6 insertions, 3 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 4bf15067e..9249c9f7c 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -64,6 +64,9 @@ def parse_options():
help="Add a DNS forwarder")
parser.add_option("--no-forwarders", dest="no_forwarders", action="store_true",
default=False, help="Do not add any DNS forwarders, use root servers instead")
+ parser.add_option("--no-host-dns", dest="no_host_dns", action="store_true",
+ default=False,
+ help="Do not use DNS for hostname lookup during installation")
options, args = parser.parse_args()
@@ -108,10 +111,10 @@ def read_info(dir, rconfig):
rconfig.host_name = config.get("realm", "destination_host")
rconfig.subject_base = config.get("realm", "subject_base")
-def get_host_name():
+def get_host_name(no_host_dns):
hostname = installutils.get_fqdn()
try:
- installutils.verify_fqdn(hostname)
+ installutils.verify_fqdn(hostname, no_host_dns)
except RuntimeError, e:
logging.error(str(e))
sys.exit(1)
@@ -285,7 +288,7 @@ def main():
config = ReplicaConfig()
read_info(dir, config)
config.dirman_password = dirman_password
- host = get_host_name()
+ host = get_host_name(options.no_host_dns)
if config.host_name != host:
try:
print "This replica was created for '%s' but this machine is named '%s'" % (config.host_name, host)