Age | Commit message (Collapse) | Author |
|
in list.local (e.g. for adding ssh to the ramdisk); ok deraadt@
|
|
MDCDDEVS actually work with non-empty values as well as the
supplied default this time.
Problem first detected by jsyn@.
|
|
machdep.allowaperture. Remove the setting of machdep.allowaperture
from md_installboot().
Add MDXAPERTURE variable to relevant architectures.
Add a new function set_machdep_allowaperture(). It is called *after*
install_sets() (which changes when the X Window question is asked), and
if MDXAPERTURE is present modifies sysctl.conf.
Shrinks overall size for i386, macppc, sparc64 (which used md_questions
for machdep.allowaperture) but increases size a bit for other
architectures since set_machep_allowaperture is in install.sub.
|
|
separate here document. This moves it before first questions are
asked, which makes more sense.
Replace 'especially on a PC' with 'especially on a machine', since it
is displayed on all installs/upgrades regardless of architecture.
|
|
1) Saving one boot's worth of dmesg in /tmp/dmesg.boot
2) Using sed to scan for devices and pull out names in
new get_diskdevs() and get_cddevs() in install.sub
3) Saving any md disk/cd sed patterns in MDDISKDEVS and
MDCDDEVS variables.
|
|
Idea from form@.
millert@, krw@ ok
|
|
simply echo'd a single word if present at all.
Replace with variables MDFSTYPE and MDFSOPTS if required. Rework logic
in install.sub's mount_a_disk() to always include 'ro' as an option to
the mount command. This allows even those arch's with MDFSTYPE to
usually get by without MDFSOPTS.
ok deraadt@
|
|
|
|
output of both was essentially identical on all architectures. Replace
with welcome_banner() and not_going_to_install() in install.sub.
Abstract common verbiage from md_congrats() into congrats() which
calls md_congrats() for any architecture specific additional verbiage.
Reword things so ${MODE} can be plausibly used in more places.
Remove extraneous #!/bin/sh in hp300 install.md.
ok deraadt@ espie@
|
|
calling md_set_term() from set_term() to do machine dependent stuff.
Currently only i386 does anything - keyboard mappings.
Add MDTERM variable to allow install.md to set proper default terminal
type. Default to vt220.
Eliminate md_get_partition_range() as useless since every architecture
returned '[a-p]'.
Make default term for all mvme* architectures vt100 as requested by miod@.
ok deraadt@ millert@ miod@
|
|
a) Eliminate extraneous cat invocations that are piped to
grep by simply calling grep with the file name.
b) Eliminate the only use of isnumeric() by using a ksh'ism
left exposed in sh: '+([0-9])'. Eliminate isnumeric().
c) Test for a http/ftp list index of '0' and treat as an out
of range error rather than an IP address.
d) Reorganize to make smaller and more clear.
Add documentation to sh(1) for ksh patterns that are available.
ok millert@, miod@
|
|
Always make the default answer the first unconfigured interface, and
when there are no unconfigured interfaces make the default answer
'done'.
As a result _reprompt would always be set to 1, so eliminate it and
the if statement testing it.
|
|
|
|
|
|
Suggested by Ian McWilliam. ok deraadt@.
|
|
|
|
|
|
|
|
ARCH=ARCH replacement
|
|
smaller again
|
|
must *not* start with consecutive '#'s.
|
|
everything up to and including the last '/'. Also removes a now
unnecessary variable from install_tape().
Which brings up the question 'Does anyone use tape installs?'.
|
|
to eliminate a lot of -z and -n tests.
Thus,
'[ -z "$x" ] && cmd' -> '[ "$x" ] || cmd'
'if [ -z "$x" ]; then; y; fi' -> '[ "$x" ] || y'.
'[ -n "$x" ]' -> '[ "$x" ]'
Use variable default value syntax in a couple of places rather than if
statements. e.g. ': ${_ouranswer:=$_ifs}'.
Suggestions from millert@, aaron@, espie@, miod@ at various times.
|
|
string. i.e. "${a}" -> "$a". Save the {} form for strings where
variables are mixed with text.
Remove superfluous X's. e.g. "X$resp" = "Xdone" -> "$resp" = "done".
Change last few '[ "$v" = "" ]' or equivalents to '[ -z "$v" ]'.
|
|
|
|
|
|
ask() takes 2 parameters. The first one is the question to
ask the user, and the 2nd is the default answer.
Shrinks and makes the code clearer.
From espie@ with some tweaking, ok deraadt@.
|
|
|
|
getting eval to work correctly. Some other logic cleanups in
glob_selection.
Eliminate 'dead' code trying to use dns to resolve
ftp.openbsd.org. Not only was the code dead, $_resolver_enabled
having been eliminated a while ago, but unnecessary as Theo has
promised the IP address will not change.
Spell 'occurrences' correctly.
From espie@ with slight modifications. ok espie@ millert@
|
|
Move more 'if [] then; x; fi' to '[] && x' or
'[] || x' idioms.
Remove code supporting an optional IFS parameter in cutlast(),
as it was never used. Also redo logic a bit in cutlast() to
use eval to better effect.
Improve logic a bit in bsort.
From espie@ with slight modifications. ok espie@ millert@
|
|
calls to grep and file redirections.
Eliminate function firstchar(). Rework of partition gathering
code removes the only use.
Remove the usual extraneous 'X's and {}'s in the code being
worked on.
From espie@ with slight modifications. ok espie@ millert@
|
|
|
|
|
|
|
|
greatly simplify both getresp() and the code around
obtaining passwords. Shrinks, simplifies and
makes the code clearer.
From espie@.
ok deraadt@ and espie@.
|
|
|
|
|
|
|
|
|
|
when people specify, e.g. /usr/local before /usr. deraadt@ OK
|
|
last minute tweaks to it by me, but you can trust me, right?
|
|
use it to make 'em. Now you can install with as many disks as you want.
cleanup by espie, tests by jason
|
|
Eliminate some blank lines.
Only comments and blank lines affected, no code.
Suggested by deraadt@
|
|
a) Make [ -z "$var" ] standard idiom, replacing
many variants on [ X"$var" = X"" ].
b) Factor out three large chunks of repeated code
for finding sets, getting user to select sets
and then installing the sets. This creates
get_sets_list(), get_get_files_list() and
install_get_files_list().
c) Eliminate unneeded dir_has_sets() function.
d) Indent last large functions that were not
properly indented.
e) Replace most if not all 'test' invocations
with [], replacing a few if statements along
the way.
f) Use ${MODE} a lot more to make messages appear
more relevant to process.
g) Fix erroneous display of $local_sets_dir so
the error for a non-existant dir actually displays
the user input, not an empty string.
h) Eliminate the 'list' option in selecting sets. It
was not possible to actually select anything except
what was already displayed, so bring verbiage and
options into line with code.
i) Replace a number of '\"' and "\'" with just plain
's or "s as appropriate.
j) Replace ". " with ". ".
k) Use some more "OpenBSD {$VERSION_MAJOR}.${VERSION_MINOR}"
to make more messages correct and current.
l) Various typos fixed.
Net shrinkage approximately 2K.
ok millert@ deraadt@
|
|
1) If there are no unselected sets then the default
becomes 'done'.
2) A bare '-' or '+' is ignored, since it causes
problems for the functions that call get_selection().
|
|
and upgrade.sh, putting it into install.sub.
Replace groups of echo's with here documents.
Eliminate bare echo's with embedded \n's.
Abstract repeated verbiage into display_* functions, also eliminating
a backslash orgy when showing the ftp/http server location. This
also makes the verbiage consistant across ftp, cd, etc. installs.
Try hard to make file selection screen fit on one screen.
Fix default in 'File name?' prompt so it contains the first
non-selected set.
Some minor wording adjustment, typos, etc.
Net shrinkage of about 1.5K.
|
|
for one or more network interfaces.
Rework timezone logic to shrink it and make it more clear. Don't
bother checking for /usr/share/zoneinfo as it is never there, just
look for /mnt/usr/share/zoneinfo.
Eliminate spurious early call to get_timezone() that
(accidentally?) made GMT the default timezone during
installs. Instead rely on the /etc/localtime that is installed
from etcXX.gz. Currently this means the default timezone is the
historically resonant US/Pacific.
Ideas if not code details ok deraadt@ and millert@
|
|
|
|
case WORD
and
var=WORD
Bourne and related/descendant shells such as our sh do *not* do
field splitting or globbing on WORD. Thus we can eliminate a large
number of unnecessary '"'s in case statements and variable
assignments.
This is a lightly adapted version of naddy's diff, to take account
of changes in the scripts since he generated it.
|
|
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@
|