diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-03-31 03:05:05 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-03-31 03:05:05 +0000 |
commit | 10c56acc405b9b87876b92b5d6d9e84e3d41ece4 (patch) | |
tree | 78a7e61f6a9479bdba61f4a2313a3dbc2468ac2f /distrib/miniroot/install.sh | |
parent | 62f248dead1866e98cf576e1ce2f8933cefa630f (diff) |
This omnibus diff does a number of cleanups:
1) Move the 'executed' code at the top of install.sub
to the end, so that it can successfully use .md
functions.
2) Get _DKDEVS once only, and get _CDDEVS at the same
time (see (1))
3) Clean up calls to getresp so that
a) no '"'s used on constants
b) '"'s always used for variables
c) never use {} for variables
d) ensure parameter passed matches default shown
in any preceeding []
4) Try to put '"'s around directory names
5) Replace a couple of instances of using []s around
a prompt comment instead of ()s
6) Reduce some code by putting $_DKDEVS inside
here documents, rather than echo'ing it
7) eliminate an unused variable _directory
8) eliminate a couple of while RESP="" loops which
never loop because a non-null default is provided
to getresp
9) move some code into mount_a_disk to make logic
clearer
10) eliminate a couple of extra blanks in prompts
11) eliminate ALLSETS and UPGRSETS by just removing
'etc' from THESETS in upgrade.sh
12) Indent a couple of smaller functions
ok deraadt@
Diffstat (limited to 'distrib/miniroot/install.sh')
-rw-r--r-- | distrib/miniroot/install.sh | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 1970394c809..80cff44dcbb 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.88 2002/03/30 01:29:18 deraadt Exp $ +# $OpenBSD: install.sh,v 1.89 2002/03/31 03:05:04 krw Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback @@ -102,9 +102,6 @@ MODE="install" trap 'cleanup_on_exit' EXIT trap 'exit 2' HUP INT QUIT TERM -# which sets? -THESETS="$ALLSETS $MDSETS" - if [ ! -f /etc/fstab ]; then # Good {morning,afternoon,evening,night}. echo ================================================== @@ -115,7 +112,7 @@ else echo "You can try to skip the disk preparation steps and continue," echo "otherwise you should reboot the miniroot and start over..." echo -n "Skip disk initialization? [n] " - getresp "n" + getresp n case "$resp" in y*|Y*) echo echo "Cool! Let's get to it..." @@ -262,7 +259,7 @@ __EOT echo echo -n "Are you really sure that you're ready to proceed? [n] " - getresp "n" + getresp n case "$resp" in y*|Y*) ;; *) echo "ok, try again later..." @@ -296,7 +293,7 @@ will be preserved and copied into the new root filesystem. __EOT echo -n "Configure the network? [y] " -getresp "y" +getresp y case "$resp" in y*|Y*) donetconfig ;; @@ -325,7 +322,7 @@ mount | while read line; do if [ "$3" = "/" -a "$5" = "nfs" ]; then echo "You appear to be running diskless." echo -n "Are the install sets on one of your currently mounted filesystems? [n] " - getresp "n" + getresp n case "$resp" in y*|Y*) get_localdir ;; @@ -341,14 +338,14 @@ resp= while [ "X${resp}" = X"" ]; do echo -n "Password (will not echo): " stty -echo - getresp -n "" + getresp -n stty echo echo _password="$resp" echo -n "Password (again): " stty -echo - getresp -n "" + getresp -n stty echo echo if [ "${_password}" != "${resp}" ]; then |