Age | Commit message (Collapse) | Author |
|
|
|
1) It takes two parameters, the mount point and a default
directory.
2) It has one step escape ('abort') instead of asking user if they are
really sure an empty pathname is what they want. Empty entry with no
default value now just re-presents the prompt. More consistant with the
behaviour of other prompts.
3) Provide separate error messages for non-existant directory and a
directory with no sets.
Rework install_mounted_fs() (renamed from install_from_mounted_fs to
be consistant with install_disk, etc.) so that
1) It takes two parameters, the mount point and the default directory.
2) It calls get_localdir(), passing the parameters along.
Rework install_disk(), install_cdrom() and install_nfs() to eliminate
local queries for local dir and rely on get_local() via
install_mounted_fs() instead.
Make mount_a_disk() return 0 on success to make testing its return
value more obvious. Use this in install_disk() to make logic clearer
and eliminate the need for a return.
|
|
Mount NFS servers with -o ro the same as all other install
sets sources.
Check for /sbin/mount_nfs in install_nfs() rather before
the call in install_sets(). Makes install_sets() more
consistant in both code and reactions to failed attempts
to find sets.
|
|
ever adds an option with a name too similar to the name of the one
being manipulated.
Only softdep at the moment but some more option fiddling coming.
|
|
Don't bother returning a value of 1 from installed_get_files_list()
now, since it was only used to set the eliminated variables.
|
|
install_nfs rather than before function calls.
Eliminates duplicate calls before install_url and now network will not
be configured if install_nfs is not a valid choice.
|
|
just assign $1 to _url_type rather than translating -ftp to ftp and
-http to http in a case statement.
Smaller. Simpler. Clearer.
|
|
|
|
Also remove a few extraneous braces.
Requested by and OK'd by two different Todds.
|
|
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?
|