summaryrefslogtreecommitdiff
path: root/distrib/miniroot
AgeCommit message (Collapse)Author
2002-05-24add LIBS option the crunchgen config, allows adding custom librariesMarkus Friedl
in list.local (e.g. for adding ssh to the ramdisk); ok deraadt@
2002-05-22Fix quoting botch in earlier commit. Make sure MDDISKDEVS andKenneth R Westerback
MDCDDEVS actually work with non-empty values as well as the supplied default this time. Problem first detected by jsyn@.
2002-05-20Eliminate md_questions(). It was used only to control the setting ofKenneth R Westerback
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.
2002-05-20Move verbiage about '!' and '!foo' at prompts to welcome_banner() fromKenneth R Westerback
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.
2002-05-18Eliminate md_get_diskdevs() and md_get_cddevs() byKenneth R Westerback
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.
2002-05-15Insert entry for /var/tmp to /etc/fstab like /tmp one,i.e. nosuid and nodevMike Pechkin
Idea from form@. millert@, krw@ ok
2002-05-14Eliminate md_native_fstype() and md_native_fsopts(). Both functionsKenneth R Westerback
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@
2002-05-10STRIP is a binary install targetTheo de Raadt
2002-05-09Elminate md_welcome_banner() and md_not_going_to_install() as theKenneth R Westerback
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@
2002-05-08Abstract out common md_set_term() code into set_term() in install.sub,Kenneth R Westerback
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@
2002-05-04Clean up the logic in install_url():Kenneth R Westerback
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@
2002-04-30Clean up configure_all_interfaces() a bit.Kenneth R Westerback
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.
2002-04-30first pass of instbin removal movementTheo de Raadt
2002-04-30oops, typoTheo de Raadt
2002-04-30Tighten up installed options on /tmp by adding nosuid,nodev.Kenneth R Westerback
Suggested by Ian McWilliam. ok deraadt@.
2002-04-30this is not run by hand, no need for #!/bin/sh; krw okTheo de Raadt
2002-04-30use leaner libraries; like most already didTheo de Raadt
2002-04-30use SCRIPT commandTheo de Raadt
2002-04-30add a SCRIPT command which does sed-based comment stripping, and also the ↵Theo de Raadt
ARCH=ARCH replacement
2002-04-29generate termcap file using a list2sh.awk directrive; distrib becomes a lot ↵Theo de Raadt
smaller again
2002-04-29Expose a few more comments to stripping: must be on separate line, andKenneth R Westerback
must *not* start with consecutive '#'s.
2002-04-29Eliminate basename(). Just use parameter expansion syntax to removeKenneth R Westerback
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?'.
2002-04-29Rely on [] evaluating empty string as false, non-empty string as trueKenneth R Westerback
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.
2002-04-28Remove superfluous '{}' in variable references that are all alone in aKenneth R Westerback
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" ]'.
2002-04-28remove confusion about disktabTheo de Raadt
2002-04-28use single shared mtree.confTheo de Raadt
2002-04-28Change getresp() into ask().Kenneth R Westerback
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@.
2002-04-27Fix typo ('remel' -> 'rmel') in glob_selection.Kenneth R Westerback
2002-04-26Rework glob_selection() to eliminate 'Major hack' and a 'Eww' byKenneth R Westerback
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@
2002-04-26Change 'while $1; shift' loops to 'for _b;' loops.Kenneth R Westerback
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@
2002-04-26Improve use of sed in various places, eliminating unnecessaryKenneth R Westerback
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@
2002-04-25merge in changes from other list2sh.awk filesTheo de Raadt
2002-04-22use one common dot.profile for allTheo de Raadt
2002-04-21strip scripts; remove some crudTheo de Raadt
2002-04-20Split out a new function askpass() and as a resultKenneth R Westerback
greatly simplify both getresp() and the code around obtaining passwords. Shrinks, simplifies and makes the code clearer. From espie@. ok deraadt@ and espie@.
2002-04-18no chroot, and avoid SYMLINK to instbinTheo de Raadt
2002-04-13allow todd to do very weird things at the timezone prompt; fix from krwTheo de Raadt
2002-04-13only fsck root once in upgrade; from krwTheo de Raadt
2002-04-13do not check filesystems; krw okTheo de Raadt
2002-04-12Sort mount points when generating fstab file. This prevents problemsTodd C. Miller
when people specify, e.g. /usr/local before /usr. deraadt@ OK
2002-04-12kbd setting code for the installer. smat@acm.org, miod, and krw. MinimalTheo de Raadt
last minute tweaks to it by me, but you can trust me, right?
2002-04-10If disk device nodes are missing, and MAKEDEV can be found on the media,Theo de Raadt
use it to make 'em. Now you can install with as many disks as you want. cleanup by espie, tests by jason
2002-04-09Move introductory blocks of comments to above their functions.Kenneth R Westerback
Eliminate some blank lines. Only comments and blank lines affected, no code. Suggested by deraadt@
2002-04-09More reorganizations, fixes and shrinkage.Kenneth R Westerback
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@
2002-04-05Tune get_selection() so thatKenneth R Westerback
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().
2002-04-05Abstract out common startup and finishing code from install.shKenneth R Westerback
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.
2002-04-02Do not copy /etc/mygate to install'ed systems if dhcp is specifiedKenneth R Westerback
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@
2002-04-01safe more space; krw okTheo de Raadt
2002-03-31naddy@ pointed out that in the two situationsKenneth R Westerback
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.
2002-03-31This omnibus diff does a number of cleanups:Kenneth R Westerback
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@