Age | Commit message (Collapse) | Author |
|
|
|
|
|
1) Filter appropriate lines (ftp or http) from ftplist once when it is
downloaded rather than everytime the lines are needed.
2) Don't display the 'ftp://' or 'http://' part of the listed url's as
all displayed url's are of the same type. Partially compensates for
the last increase in the width of the 'cat -n' line number field.
3) Store filtered lines in /tmp/serverlist instead of /tmp/ftplist,
since it can be a list of http servers too. Makes it more obvious that
it is not a copy of ftplist.
4) Avoid 'ftplist: No such file' message, but add more informative
'Getting...done.' or 'Getting...FAILED.' message. Display the actual
ftp error that caused the FAILED status.
5) Add 'done' to the list of available options when asking for a
server location, allowing the user to return to set location selection
without having to enter a server.
6) Mention the '?' option in the prompt. It re-displays the list of
servers.
7) Eliminate unneeded variables 'host' and 'maxlines'. Make global
tline a local (_line). Change _ftp_get_list global to more generic
_get_server_list.
8) General logic cleanup.
|
|
contents of ftp_server_dir or http_server_dir, and not their names.
ftp and http installs now work again.
|
|
1) Rework _url_base to eliminate need for _url_pass and _url_login
variables.
2) Shorten and make more consistant with other messages the prompt for
the list of ftp/http servers.
3) Don't refer to _ftp_server_dir, use ${_url_type}_server_dir so that
a default prompt is available for both ftp and http installs.
4) Eliminate a couple of unneeded {}'s.
|
|
Eliminate unnecessary _proxy_host variable that merely kept a copy of
the value of ftp_proxy and http_proxy.
|
|
user was observant enough to see where the filesystems are mounted.
Suggested by espie@.
|
|
Recover two of the three extra characters by deleting unneeded '-'s in
the tar invocations used in tape installs.
Problem noted and solution suggested by millert@.
|
|
|
|
Collect all tests that cause a line to be skipped into one test by
using ksh string pattern features instead of case statements.
Simply sed expressions by not worrying about extra commas in the
options field (they're ignored during mount) and assuming 'rw',
'noauto', 'xx' do not appear as substrings in any valid option.
Leave out fs_freq and fs_passno fields as unnecessary during
install/upgrade.
Eliminate special test for '/' mount point and simply strip any
trailing slash from all mount points.
Kicked off my wifried@'s 'xx'/altroot change, and ok'ed in various
incarnations by wilfried@ deraadt@ millert@.
|
|
|
|
|
|
|
|
From deraadt@
|
|
ok henning@
|
|
a) We shouldn't display passwords.
b) If it is encoded, and thus different from what was entered,
installers will leap to the incorrect conclusion that the logon
failed.
c) At this point the logon to the server was successful so the
password worked, and the user shouldn't have forgotten it already.
ok deraadt@.
|
|
default route even if 'none' or 'dhcp' is selected as the default
route for the installed system. Previously, specifying 'none' or
'dhcp' would delete the existing default route, making ftp installs
from non-local servers impossible.
This is done by only deleting the existing default route when a change
is attempted, and putting back the previous default route if the
change fails.
Problem noticed by drahn@.
|
|
Fix up default route selection by
a) Forcing user to explicitly chose 'dhcp' as a mechanism for
specifying a default route, rather than guessing based on one or more
interfaces being configured by dhcp.
b) If the user specified default route does not work, re-present the
existing default route rather than losing it.
c) Move default route selection to after nameserver activation so the
user can specify a hostname as the default route.
Change /etc/netstart so that /etc/mygate wins if a default route was
already specified (i.e. by dhcp).
ok deraadt@.
|
|
Suggestion by Nick Holland out of comments by deraadt@ and miod@.
ok deraadt@ millert@
|
|
|
|
Simplify and clarify logic around selecting/installing sets.
Rename do_selection_list() to select_sets(), and install_get_files()
to install_files().
Eliminate glob_selection() and get_get_files() and the global
GET_FILES, folding logic into select_sets() and install_files().
Show the user entire 'url' when no sets are found, rather than trying
to hide mount points, etc.
Eliminate VERSION_MAJOR and VERSION_MINOR since they were always used
together. Instead, simply construct a few variables (SETDIR, FTPDIR,
OBSD) holding the strings these were used to construct.
Various 'standard' cleanups of quotes, braces, etc. in modified areas.
Also shrinks install.sub by 681 bytes.
|
|
Add (back?) function SETSDONE was probably supposed to be doing
(preventing the automatic selection of already installed sets) by
manipulating DEFAULTSETS instead. Remove successfully installed sets
from DEFAULTSETS, and add 'problem' sets detected in sane_install()
back into DEFAULTSETS.
|
|
From David Krause.
|
|
hosts entries, so comments are not processed.
Last few touchups & shrinkage for this round.
Current score:
install.sh+install.sub+upgrade.sh = 36,934 (vs 40,062 for 3.2).
|
|
Use value of 'hostname' to store all HOSTNAME and FQDN information. Elminate
those global variables. For install accept user input as is, but if the short
form hostname is unchanged, save any domain info by not re-setting hostname.
For upgrade just set hostname from /tmp/myname.
Unconditionally create default hosts file in install.sh, rather than doing it
in separate places depending on whether or not the user configures the network.
Always ask if the user wants to edit the hosts file when the network is
configured, but without listing it out.
Don't put 'search' command in resolv.conf as we now set hostnames to include
fully qualified domain names, which will be used to yield local domain name.
Loop asking for the default route until the user enters one that 'route'
accepts or the user explicitly asks for no default route by entering 'none'.
Add FQDN info to hosts file just before saving configuration files to the
installed system. Preserve user added lines - those with aliases or with domain
information in the hostname.
Clean up donetconfig() logic. Delete network config files in install.sh so that
if the user restarts an interrupted install previous network configuration does
not leak into installed system.
Elminiate get_resolv_fqdn(), searching resolv.conf for domain info only when
dhcp was used. get_fqdn() is reduced to looking for domain info in current
hostname, and supplying 'my.domain' if none found.
Add save_comments() and use to preserve useful comments in the installed
/etc/hosts and /etc/dhclient.conf files. Previous logic for dhclient.conf could
cause repeated appending of configuration info rather than just preserving the
comments.
Cleanup logic copying files from /tmp to /mnt/etc, eliminating unneeded
cfgfiles variable. Use wildcards and subshells to shrink code size.
|
|
Redo configure_ifs() to take full advantage of recent code
refactoring, and cleanup code while there.
Move address or dhcp question to after media option handling so that
each question gives immediate feedback. i.e. if the media options
given don't work then say so and exit, and if dhcp is requested
immediately issue the dhcp request. Also allows some code shrinkage.
Eliminate addifconfig() and remount(). The former is folded into
configure_ifs() and the latter's three lines simply replace the call
in install.sh.
Move remount code to before any configuration files are moved to the
installed system.
|
|
Create dhcp_request() and use in configure_ifs() rather than repeat code. When
dhcp is successful, move /etc/dhclient.conf, /etc/resolv.conf.tail to /tmp, and
use normal configuration file installation to put them on the installed system.
Also apply any user specified media options immediately. If they don't compute
then return immediately.
|
|
to abstract repeated code blocks.
Current score: 3.2 install+upgrade+install.sub = 40,062 bytes
-current " " " = 38,051
|
|
avoid problems with the single bpf interface available on install
media.
Move umount'ing of filesystems to the start of any install or upgrade
execution.
Eliminate now vestigal cleanup_on_exit() and all associated traps.
Shrinks scripts, makes more reliable, improves intuitiveness of
re-running install or upgrade, eliminates an install/upgrade time
message, leaves filesystems available if install/upgrade script
interrupted.
|
|
same time as we ask for the default route and name server addresses.
This allows users to override any DHCP supplied domain information the
same way they could override DHCP supplied default route and name server
addresses. As a result, remove the now superfluous warning about
not supplying information DHCP is going to overwrite.
|
|
been restarted.
Discard any domain information the user supplies.
|
|
|
|
a standard format of
<question>? (<extra verbiage>) [<default value>]
Makes things more consistant, and sometimes more terse.
|
|
1) The one '/sbin/ifconfig' -> 'ifconfig'.
2) Eliminate local variable and thereby unneeded '\n' in welcome().
|
|
|
|
|
|
descibing how the fstab will be used follows immediately after the
fstab listing, and the paragraph explaining about editing the fstab
comes immediately before the offer to edit the fstab. Eliminate a
blank line before the question as it is now tightly related to the
paragraph that precedes it.
|
|
returns false, and the device is *not* added to DEVSMADE.
|
|
Eliminate the function get_setsdir() by merging it into
install_mounted_fs(). Eliminate global SETSDIR as a result.
Move the loop logic used to select the directory to use on a mounted
filesystem to a 'done' style loop. i.e. loop until valid input (a
directory which exists) or 'done'. 'done' implies abandoning effort to
find a directory.
Eliminate the test for and associated error message about no
filesystems being mounted below the mount point passed to
install_mounted_fs(). This served little purpose not addressed by the
message generated when a non-existant directory is entered. i.e.
novices won't understand and experts can '!' out to investigate.
Remove the option to list mounted filesystems. Same reasons as for
eliminating the test for mounted filesystems.
Move repeated tests for an empty GET_FILES into the function
invariably called after the tests (install_get_files()).
|
|
1) When asked to choose a device, a user could enter two identical
words separated by a blank (e.g. 'a a') and thereby confuse the check
for selection validity. Quote user response before using it.
2) When asked to choose a sub-timezone, the user could escape to
a shell and when returning only see half the sub-timezone prompt
redisplayed. Put entire prompt into ask() parameter rather than
displaying first half in a separate echo -n.
Also change a "(or done)" to "(or 'done')" to be consistant with
other similar displays and move the initial comment for mount_a_disk()
to before the function to conform to normal usage.
|
|
logic. As result, MDSETS gone from everything but mac68k.
MDSETS now treated as a list of complete file names to add to THESETS,
allowing more MD flexibility, i.e. may or may not be .tgz files.
All traces of tar.gz removed. Not used for sets since 2.7 or so. As a
result of code simplification from not having to consider tar.gz, the
functions get_sets(), make_lastset(), and set_not_done() are
eliminated, along with the global SETS.
Build THESETS and DEFAULTSETS to contain full file names.
Always install sets in the order they appear in THESETS, keeping
siteXX last but without needing special logic. More predictable for
user if a lot of set additions and removals done before being
satisfied, as the sets are now installed in the same order they appear
in the selection list.
Remove ability to look for non-set .tgz/.tar.gz files. The job of the
install scripts is to install the standard sets in a simple and
rational way. Not to install general tar balls. The user can do that
post-install or simply '!' out to do it during install. On their head
be it.
If no sets are found in a specified source, list the filenames in
THESETS to show what is being looked for.
|
|
set. Just re-display the selection list unchanged. Smaller, cleaner.
|
|
|
|
this pass check the file list returned by ftp_list_file() for two
common errors ('Login failed.' and 'No such file or directory.') and
display the error messages rather than just complaining that no sets
were found.
Delete an unused local variable.
Do not allow the user to continue with the install/upgrade if the
sanity checks fail. Keep asking them to install more sets until the
checks succeed.
ok millert@.
|
|
1) Do all three sanity checks (for bsd, base32, etc32) every time so
the user is aware of all three problems asap. Make the error messages
stand out, and refer explicitly to the sets that should fix the
problem.
2) Use standard 'done' logic to exit the set selection loop rather than
ask a separate question. One side effect: a <cr> at the set location
prompt now just causes the redisplay of the prompt rather than an
error.
3) Remove 'suspect' sets from the SETSDONE list so that if bsd, base32
or etc32 are found to be wanting, they are automatically selected the
next time they appear on the list of available sets.
4) But the $MDSETS (and therefore the 'bsd' set) first on the
selection list. This puts all three 'required' sets at the top of the
list where they seem to belong.
|
|
installed.
This should guarantee that any site-specific files which are intended
to replace files installed from 'normal' sets will do so.
|
|
|
|
Every system has a name, and thus generated keys with that
name, even if there is no currently configured network.
So, ask for a system hostname before configuring the network.
Eliminate /tmp/myname and just keep hostname set to the lastest name
and FQDN.
Construct /etc/myname from hostname as configuration data is being
saved. Construct /etc/hosts (preserving the informative leading comment
from the /etc/hosts file in etcXX.tgx) at the same time.
Construct an appropriate /etc/hosts file even if the network is not
configured.
During upgrade, if the user enables the network using the existing
configuration, don't ask about the domain name - just use the
configured one.
Take care to handle existing /etc/myname files which do not necessarily
have a FQDN.
Originally problem with hostname handling pointed out by beck@.
ok deraadt@
|
|
|
|
them in the installed system.
ok deraadt@. (which I forgot to mention for the last commit).
|