summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-27 13:02:31 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-11-27 13:02:31 +0100
commit6b835b0691faab904246e587ffa6ff74b9fb53e2 (patch)
treee13cda15bceda8f357acf91a92c6879f3ba21257 /source4
parent7504b03b541026c84a4f454b7572a3280296a8d9 (diff)
downloadsamba-6b835b0691faab904246e587ffa6ff74b9fb53e2.tar.gz
samba-6b835b0691faab904246e587ffa6ff74b9fb53e2.tar.bz2
samba-6b835b0691faab904246e587ffa6ff74b9fb53e2.zip
s4:setup/provision - make the interactive mode work again
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/setup/provision16
1 files changed, 3 insertions, 13 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index ed350dd46a..f1aa07c7a7 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -122,14 +122,6 @@ def message(text):
if len(sys.argv) == 1:
opts.interactive = True
-if not opts.interactive and (opts.realm is None or opts.domain is None):
- if opts.realm is None:
- print >>sys.stderr, "No realm set"
- if opts.domain is None:
- print >>sys.stderr, "No domain set"
- parser.print_usage()
- sys.exit(1)
-
if opts.interactive:
from getpass import getpass
import socket
@@ -137,19 +129,17 @@ if opts.interactive:
if default is not None:
print "%s [%s]: " % (prompt,default),
else:
- print "%s: " % (prompt,),
+ print "%s: " % (prompt),
return sys.stdin.readline().rstrip("\n") or default
try:
opts.realm = ask("Realm", socket.getfqdn().split(".", 1)[1].upper())
except IndexError:
- print >>sys.stderr, "Cannot guess realm from %s" % ( socket.getfqdn())
- sys.exit(1)
+ opts.realm = ask("Realm", None)
try:
opts.domain = ask("Domain", opts.realm.split(".")[0])
except IndexError:
- print >>sys.stderr, "Cannot guess domain from %s" % ( opts.realm())
- sys.exit(1)
+ opts.domain = ask("Domain", None)
opts.server_role = ask("Server Role (dc, member, standalone)", "dc")
for i in range(3):