X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/639f464cb3c703697db2a8887ab32d7a8233508f..e1e936d27c919d6dde1a6f0c2405ca3ac7122b54:/IkiWiki/Setup/Automator.pm?ds=sidebyside diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index 42caf3039..7d9eca3af 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=); + for (;;) { + print "Choose a password: "; + chomp($password=); + print "Confirm password: "; + chomp($password2=); + + last if $password2 eq $password; + + print "Password mismatch.\n\n"; + } print "\n\n\n"; system('stty sane 2>/dev/null');