mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 17:01:14 -06:00
Warn if a user tries to install a replica on the wrong target machine
432691
This commit is contained in:
parent
e31d33619d
commit
da24953f9a
@ -138,6 +138,18 @@ def main():
|
||||
config = ReplicaConfig()
|
||||
read_info(dir, config)
|
||||
config.host_name = get_host_name()
|
||||
p = filename.split('-')
|
||||
if p[len(p)-1] != config.host_name:
|
||||
try:
|
||||
print "This replica was created for '%s' but this machine is named '%s'" % (p[len(p)-1], config.host_name)
|
||||
yesno = raw_input("This may cause problems. Continue? [Y/n]: ")
|
||||
print ""
|
||||
if not yesno or yesno.lower()[0] == "y":
|
||||
pass
|
||||
else:
|
||||
sys.exit(0)
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
config.repl_password = ipautil.ipa_generate_password()
|
||||
config.dir = dir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user