diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-30 01:03:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-04-30 01:03:20 +0000 |
commit | 0aba4bfd3dba6db07e706b71d5e8715fd7e160e9 (patch) | |
tree | 6f2cc9cf177e037499c552d39c96a5043551d4d4 /distrib | |
parent | b5ae2e515b61f593032f4464e5c4b0cce83d3a74 (diff) |
Do not allow the root password to be empty; ok krw after he told me
"But I dislike putting 'Sorry, ' in the messages. We're not sorry. :-)."
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/install.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 04bdf022578..c13c5f91678 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sh,v 1.176 2009/04/30 01:01:56 deraadt Exp $ +# $OpenBSD: install.sh,v 1.177 2009/04/30 01:03:19 deraadt Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback @@ -345,8 +345,12 @@ sed -e "/^console.*on.*secure.*$/s/std\.[0-9]*/std.$(stty speed)/" \ # Move ttys back in case questions() needs to massage it more. mv /tmp/ttys /mnt/etc/ttys -askpassword root -_rootpass="$_password" +while :; do + askpassword root + _rootpass="$_password" + [[ -n "$_password" ]] && break + echo "The root password must be set." +done questions |