summaryrefslogtreecommitdiff
path: root/distrib/miniroot
AgeCommit message (Collapse)Author
2003-08-23If any interface has been configured using DHCP, assume the default routeKenneth R Westerback
will be set by DHCP. ok drahn@ beck@ henning@
2003-08-17With 3.4, /usr/include/ssl is a link and /usr/include/openssl is theKenneth R Westerback
directory it points to. Previously ssl was the directory and openssl the link. That change causes the upgrade of the comp34 set to fail, so manually adjust a pre-3.4 setup to the 3.4 setup before attempting to upgrade any sets. ok millert@.
2003-08-17'Security' fix/cleanup/shrinkage.Kenneth R Westerback
Don't leave ftp password in a global variable. It is re-initialized each time it is used anyway. Use a shorter (_passwd vs _ftp_server_password) local variable name to save a few bytes.
2003-08-17Message clarification & cleanup.Kenneth R Westerback
Replace the generic 'Done - no available Xs found.' message with two more relevant ones. Suggested several times, most memorably by Todd@. a) For selection of disks or cds to install from, and for selection of the root disk, make it 'No Xs found.'. b) For processing the list of disks or interfaces to initialize, make it 'No more Xs to initialize.'. Delete get_root() as it is only called in one place, and insert code at that location. Reclaim a few characters by putting ask_which() punctuation where message is output rather than repeating it where message passed.
2003-08-16Minor cosmetic cleanup.Kenneth R Westerback
Use '<msg>...done.' consistantly by replacing last five varient uses. Out with '<msg> ... done.', '<msg>...Done.', etc.
2003-08-11move to 3.4-betaTheo de Raadt
2003-08-07spacesTheo de Raadt
2003-07-22- use :L variable modifier with ELF_TOOLCHAIN variableBrad Smith
- change 2 instances of the check from != "yes" to == "no" ok deraadt@
2003-07-10Try to ensure that ftp gets install sets from the same directory itKenneth R Westerback
looked in to get the list of available sets. The list of available sets is obtained by connecting to the ftp server interactively and issuing the commands user <user> <pass> cd <dir> ls where <dir> is treated as a relative path unless the user enters an initial '/'. But the files are obtained by issuing the command ftp ftp://<user>:<pass>@<host>/<dir> and here <dir> is treated as an absolute path. When using non-anonymous ftp this difference in the treatment of <dir> could result in a) Unhelpful error messages and unsuccessfull transfers. b) Different sets than intended being installed. c) Incorrect lists of available sets being displayed. Now, the non-anonymous ftp transfer command with relative paths (i.e. no leading '/' or '~') will look like ftp ftp://<user>:<pass>@<host>/~/<dir> Problem reported by (amoung others) Sebastian Stark, Nick Holland, Steven Boothe, Sam Smith, Sergey Smitienko, Stephen Marley, Brad Ely. ok millert@.
2003-07-10Ensure that the install/upgrade process is not troubled by any ulimitKenneth R Westerback
settings. Set them all to 'unlimited'. Problem with datasize limit vs fsck of large filesystem noted by millert@. ok millert@.
2003-07-03Use numeric comparison operators when testing numeric values.Kenneth R Westerback
2003-07-03Clarify and shrink.Kenneth R Westerback
In addel(), use $* and isin to avoid a duplicated traversal of the argument list. In bsort() remove code designed to prevent a trailing space in sorted list. With the elimination of cutlast() and cutword() this is not longer necessary. The usual [] -> [[]], etc. in areas being revised.
2003-07-02Eliminate cutword(), replacing it with specific code: 'set --' in twoKenneth R Westerback
cases and a simple sed expression in the third. Add pfsync to the list of interfaces that should not be offered to the user for configuration. Display the server line selected from the ftp/http server list in a more compact form with only a single space between fields. The usual [] -> [[]], etc. in areas being revised.
2003-06-30Cleanup ask_which() logic.Kenneth R Westerback
Use first device in supplied list as default unless overridden. Eliminates repeated 'echo XXX | cutword 1' constructs. Use 'set -- $_devs' to parse _devs and find out if there are any devices in the list. Then use '_devs="$*" to eliminate all extraneous whitespace from _devs, rather than just a single trailing blank. Usual [...] -> [[...]], `` -> $(), extra '{}' and '"' eliminations in areas being fixed up.
2003-06-30Use built in pattern matching rather than cutlast() when extractingKenneth R Westerback
timezone name from '/etc/localtime' link. Use cutword() rather than cutlast() to see if there is more than one possible root disk. As these were the last two uses of cutlast(), eradicate it. Usual [...] -> [[...]], `` -> $(), extra '{}' and '"' eliminations in areas being fixed up.
2003-06-27Improve swap partition handling during install/upgrade.Kenneth R Westerback
a) Add all defined swap partitions except the default partition on the root disk to the installed /etc/fstab. b) Mount all possible swap partitions just before creating all devices, giving small memory machines a better chance to successfully install/upgrade. Should obviate the need for FAQ 4.3.6. ok deraadt@ millert@ (slightly earlier version)
2003-06-23Fix comment typo in last commit.Kenneth R Westerback
2003-06-23Minor cleanups.Kenneth R Westerback
1) Don't check for the existance of /mnt/etc/hosts twice. Since we bail out at the first check the 2nd one is superfluous. 2) Shorten and clarify the upgrade network configuration logic. 3) Always ask if manual network configuration is desired when upgrading. Allows the upgrader to decline to use the existing network configuration and still have an explicit opportunity to configure the network. 4) Don't bail out if the existing network configuration fails. Instead (see 3)) offer manual network configuration and let the user decide if it is worthwhile to continue. 5) Refer to actual file that is missing when bailing out, rather than forcing user to be alert enough to prepend '/mnt'.
2003-06-22put gnu at the end of the SRCDIRS listTheo de Raadt
2003-06-22need -lz nowTheo de Raadt
2003-06-21Make file selection more resistant to unexpected user input.Kenneth R Westerback
Rather than evaluating the expression case _f in $resp) ... esac use the equivalent form case _f in @($resp)) ... esac so that user input with multiple file names, user input with some special characters like ';', etc. do not cause syntax errors and premature ejection from the selection loop. A determined user can still cause problems, e.g. by using quotes. Clean up and simplify the code while in the area. Problems noted by todd@.
2003-06-02licence cleanup; agreement from krw and millertTheo de Raadt
2003-05-18Don't link with -lkrb.; Found by mickey@, ok todd@Magnus Holmberg
2003-05-12More cleanup and fixes in url installs.Kenneth R Westerback
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.
2003-05-12Fix 'eval' statement in _url_base construction so that we use theKenneth R Westerback
contents of ftp_server_dir or http_server_dir, and not their names. ftp and http installs now work again.
2003-05-11More cleanup and fixes in url installs.Kenneth R Westerback
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.
2003-05-11Shrink & clarify code around ftp/http proxy identification.Kenneth R Westerback
Eliminate unnecessary _proxy_host variable that merely kept a copy of the value of ftp_proxy and http_proxy.
2003-05-11Don't reject a perfectly valid absolute path to sets just because theKenneth R Westerback
user was observant enough to see where the filesystems are mounted. Suggested by espie@.
2003-05-07Use -h option in tar invocations so that upgrades respect links.Kenneth R Westerback
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@.
2003-05-06more(1) now uses POSIX regex, no more ned for -lcompat; deraadt@ OKTodd C. Miller
2003-04-30Rework munge_fstab to shrink and clarify code.Kenneth R Westerback
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@.
2003-04-23ignore altroot filesystem when upgrading, ok krw@Peter Stromberg
2003-04-17-lcompat tooTheo de Raadt
2003-04-17remove extra spaces, make smaller, krw you keep adding them back! ;)Theo de Raadt
2003-04-16Always do 'route -n show' not 'route show'. Even saves some space.Kenneth R Westerback
From deraadt@
2003-03-06spelling fixesDavid Krause
ok henning@
2003-03-06Delete the password from the ftp url shown when no sets are found.Kenneth R Westerback
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@.
2003-03-02Fix default route handling during installation to preserve activeKenneth R Westerback
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@.
2003-02-16Fix up some DNS verbiage to make it consistant.Kenneth R Westerback
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@.
2003-02-15Make bsd.rd an install/upgrade set.Kenneth R Westerback
Suggestion by Nick Holland out of comments by deraadt@ and miod@. ok deraadt@ millert@
2003-02-12move to 3.3-betaTheo de Raadt
2003-01-26Last (?) big cleanup in distrib/miniroot this release cycle.Kenneth R Westerback
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.
2003-01-25Eliminate unused global SETSDONE.Kenneth R Westerback
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.
2002-12-14Expunge some trailing whitespace.Kenneth R Westerback
From David Krause.
2002-12-08Fix botch in last commit: prepend comments to hosts after adding FQDN toKenneth R Westerback
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).
2002-12-08Fix & cleanup logic, especially around interrupted installs.Kenneth R Westerback
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.
2002-12-04Code cleanup & shrinkage.Kenneth R Westerback
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.
2002-12-03More code consolidation.Kenneth R Westerback
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.
2002-12-01Code consolidation. Create edit_tmp_file(), manual_net_cfg(), inet_info()Kenneth R Westerback
to abstract repeated code blocks. Current score: 3.2 install+upgrade+install.sub = 40,062 bytes -current " " " = 38,051
2002-12-01Create kill_dhclient(). Use before any attempt to run dhclient, toKenneth R Westerback
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.