summaryrefslogtreecommitdiff
path: root/distrib/miniroot
AgeCommit message (Collapse)Author
2002-06-15rename install_from_mounted_fs to install_mounted_fs here as well; krw@ ok.Federico G. Schwindt
2002-06-11Rework get_localdir() so thatKenneth R Westerback
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.
2002-06-11Delete an extraneous 'mkdir /mnt2' in install_nfs().Kenneth R Westerback
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.
2002-06-10Be more paranoid about option fiddling in munge_fs, in case someoneKenneth R Westerback
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.
2002-06-10Eliminate unused _installed_via_${_url_type} variables.Kenneth R Westerback
Don't bother returning a value of 1 from installed_get_files_list() now, since it was only used to set the eliminated variables.
2002-06-10Move '[ "$_didnet" ] || donetconfig' lines into install_url andKenneth R Westerback
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.
2002-06-10Pass 'ftp' or 'http' to install_url, rather than '-ftp' or '-http' andKenneth R Westerback
just assign $1 to _url_type rather than translating -ftp to ftp and -http to http in a case statement. Smaller. Simpler. Clearer.
2002-06-09knfTodd T. Fries
2002-06-08Add FQDN to contents of /etc/myname during install.Kenneth R Westerback
Also remove a few extraneous braces. Requested by and OK'd by two different Todds.
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?