aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Setup
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r--IkiWiki/Setup/Automator.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm
index 42caf3039..b63c8e245 100644
--- a/IkiWiki/Setup/Automator.pm
+++ b/IkiWiki/Setup/Automator.pm
@@ -110,11 +110,20 @@ sub import (@) {
next if $admin=~/^http\?:\/\//; # openid
# Prompt for password w/o echo.
+ my ($password, $password2);
system('stty -echo 2>/dev/null');
local $|=1;
print "\n\nCreating wiki admin $admin ...\n";
- print "Choose a password: ";
- chomp(my $password=<STDIN>);
+ for (;;) {
+ print "Choose a password: ";
+ chomp($password=<STDIN>);
+ print "Confirm password: ";
+ chomp($password2=<STDIN>);
+
+ last if $password2 ne $password;
+
+ print "Password mismatch.\n\n";
+ }
print "\n\n\n";
system('stty sane 2>/dev/null');