diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-02-24 16:30:39 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-02-24 16:35:33 -0500 |
commit | 8682daad58023fd6297945d602d2044f3e8f063f (patch) | |
tree | 08c48ba14d54398a552eae137d4632b648293196 /IkiWiki | |
parent | f4848d3c875827410f129a8efc61ecdb97ea95fa (diff) | |
download | ikiwiki-8682daad58023fd6297945d602d2044f3e8f063f.tar ikiwiki-8682daad58023fd6297945d602d2044f3e8f063f.tar.gz |
Setup automator: Prompt for password twice. Closes: #516973
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Setup/Automator.pm | 13 |
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'); |