X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/848ff1bf5e218c57cc738a85ed02d7e1396c1d22..3fb4653d8a0824fb182da0346a7a80b282564cd5:/IkiWiki/Setup/Automator.pm diff --git a/IkiWiki/Setup/Automator.pm b/IkiWiki/Setup/Automator.pm index 42caf3039..c194d34be 100644 --- a/IkiWiki/Setup/Automator.pm +++ b/IkiWiki/Setup/Automator.pm @@ -110,11 +110,21 @@ 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 "\n"; + 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');