summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sh
AgeCommit message (Collapse)Author
2009-06-03Only need to umount once on restarting. Force umounts in case ofKenneth R Westerback
restarting. No need to ask for verbose umount output since we send it all to /dev/null. Make sure we start in '/', lest we were restarted while exploring the installed/upgraded filesystems.
2009-06-02Nuke sissy verbiage about losing data. No more special casing forKenneth R Westerback
restarted installs/upgrades. They should just work the same as first attempts except for presenting some remembered info as default answers. ok deraadt@
2009-06-01Test the return value of md_prep_disklabel() to detect failedKenneth R Westerback
attempts to write a disklabel. When failure is detected don't configure the disk, return it to the list of disks available to be configured.
2009-05-31push the dmesg and $SERVERLIST into the random pool to enhance theTheo de Raadt
entropy, before we pull out the host.random for the next boot
2009-05-31Ask the cgi to remember the install method too, and as a result, thisTheo de Raadt
makes two more questions only need a return. ok krw
2009-05-31Change the order of the installer questions again, because it is better.Theo de Raadt
hostname, network, root password, misc, timezone, and then the disks and sets. ok krw
2009-05-30Defer talking to the ftpinstall cgi until a fair bit later, so that we canTheo de Raadt
also tell it the timezone. As a result, this will also work for non-url based installs.
2009-05-30silly comment is wrongTheo de Raadt
2009-05-30these scripts should use tabs because 4 spaces wastes 3 chars of media spaceTheo de Raadt
2009-05-30install.sh already knows that MODE == installTheo de Raadt
2009-05-28Get the list of disks or cds whenever required rather than once atKenneth R Westerback
startup. This means you can plugin USB disks or cds after the install has started and you will see the new device the next time the list is shown. The wonders of using sysctl. 'excellent' miod@
2009-05-17Use sed to directly create swap entries in fstab rather than dancingKenneth R Westerback
through an intermediate file. Protect only fstab.$DISK manipulating commands with the check for the existance of fstab.$DISK. This restores the ability to have disks with only swap partitions.
2009-05-17Move comment to correct spot.Kenneth R Westerback
Suppress 'No such file' error message when grep'ing for '/' mount point in fstab.$ROOTDISK. We are interested in success or failure, not excuses! Check for existance of fstab.$DISK. User may exit disklabel with 'x', especially for non-root disks, and not create the file.
2009-05-11Clean up and shrink code. Don't newfs paritions without a mountKenneth R Westerback
point specified. Check for duplicate mount points and don't accept a disk which has such a duplicate configured. Don't remount all partitions after installing sets. 'be brave' deraadt@
2009-05-07o use 'ls -C' to speed and simplify both sets viewing and timezone selectionTodd T. Fries
o use a tzlist instead of a tzdir o as a bonus, sets lists are now sorted top-down instead of left-right o use stty to calculate 4char padding surrounding sets lists collaboration with Alexander Hall halex@ ok deraadt@
2009-05-06whoa, we were assuming that $_password was still the user password. weTheo de Raadt
got lucky.
2009-05-06Split the collection of many questions from the appplication of theirTheo de Raadt
change. Then ask them at the start. The timezone stuff remains a bit weird since we have to depend on when we get the TZ names, or when we get network... so there are 3 possible places that question can be asked. But now basically once it starts ftp'ing the sets, you only have the final done prompt.
2009-05-06De-uglify disk configuration in the non-auto layout cases. TrustKenneth R Westerback
disklabel(8) to prevent duplicate mount points, and the user to enter all their mountpoint info in disklabel(8). Proceed directly to disk formatting after the last disk is configured. Do not pass go. ok deraadt@
2009-05-05spaces to tabsTheo de Raadt
2009-05-03Oops. Untested over-optimization slipped in, breaking installs.Kenneth R Westerback
2009-05-03A few long standing sh'isms -> ksh'isms.Kenneth R Westerback
2009-05-03Simplify and shrink fstab creation code by putting mount point andKenneth R Westerback
partition info into one string separated by the lexically low value '!' char and sorting those strings. This eliminates an inner loop over partition info. No user visible change.
2009-05-03Simplify things by putting extra swap partitions in the fstab asKenneth R Westerback
they are discovered rather than keeping a list and appending it to the end of the fstab. No impact unless you configure extra swap partitions. ok deraadt@
2009-04-30Do not allow the root password to be empty; ok krw after he told meTheo de Raadt
"But I dislike putting 'Sorry, ' in the messages. We're not sorry. :-)."
2009-04-30quotes around ? matches; Alexander HallTheo de Raadt
2009-04-29only encrypt passwords if they are setTheo de Raadt
2009-04-29Ask for the root password before sshd, because I have caught myselfTheo de Raadt
twice now falling through the question because I am getting too used to hitting the return key...
2009-04-28We have no choice but to ask for the timezone information later, soTheo de Raadt
all the other questions have been congregating down towards the end. Might as well ask for the root password down there, too.
2009-04-25We are able to handle the timezone question a few steps earlier, alongTheo de Raadt
with the other questions.
2009-04-24Move bsd.mp juggling into relevant MD files. Make bsd.mp a defaultKenneth R Westerback
selection on multi-processor machines. Make bsd.mp a sanity check item on multi-processor machines. ok deraadt@
2009-04-23configure the network unconditionally. You have an opportunity to bailTheo de Raadt
out of this by saying "done" when you get to the first interface. Then it will handle the domain / DNS question, but since no interface is setup it cleverly already skips the default route question. Another useless question bites the dust. ok krw
2009-04-23Near the end of the installation, prompt for the setup of an initialTheo de Raadt
user, who will also be placed in wheel. The setup of that user is expected to be mostly compatible with what useradd(8) would have done. krw will probably improve the ksh code in here after this :)
2009-04-19If hw.ncpufound > 1, have the install script automatically prefer to useTheo de Raadt
bsd.mp instead of bsd (using -- mv bsd bsd.sp; mv bsd.mp bsd). anyone who brings up boot.conf is an i386 bigot. tested on almost all platforms that can do this, ok various people
2009-04-13Don't try to read or remove a non-existant /tmp/hosts file. This canKenneth R Westerback
happen if no interfaces are configured during an install. Noticed by jsing@. Diff from jsing@, only slightly tweaked.
2009-04-10If the md_prep_disklabel routine sets AUTOROOT=y, then don't ask theKenneth R Westerback
user for input. Just plow ahead. ok deraadt@
2009-04-10'rm hosts' -> 'rm -f hosts', since we may have not configured anyKenneth R Westerback
interfaces and thus not have a hosts file to remove. Should eliminate annoying error messages noticed by jsing@.
2009-03-14Installed dhclient.conf is now all comments. Installed hosts isKenneth R Westerback
now correct as is, since we don't add info to localhost lines. So ditch comment-preserving dance through /tmp and just append our new info to installed files. Shrinks scripts without changing behaviour.
2009-03-14There should only be one ::1 and one 127.0.0.1 entry in the hostsKenneth R Westerback
file. And 'localhost' don't need no stinkin' domain names. Insert line(s) with the address(es) of last interface defined instead of duplicate ::1 and 127.0.0.1 entries, Thus dhcp configured interfaces may eventually drift away from the value in hosts file. Much discussed just before tree lock. Time to see what happens. ok deraadt@
2009-02-21Pretty up installed hosts file by using tabs between address andKenneth R Westerback
names. Update copyright year since we are making noticable changes.
2009-02-19Third time lucky. Proper use of quotes when comparing the first andKenneth R Westerback
second copies of the entered password will preserve leading and trailing spaces. Prodded by dale@. Proper clue pointed out by todd@.
2009-02-15Build install media with disktab.shadow already in /tmp, ratherKenneth R Westerback
than have the install script copy it there. Shrinks install script, removes an extra copy of disktab. ok deraadt@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-13ksh's arithmetic is 32 bit signed so we can no longer rely onKenneth R Westerback
block counts being small enough to do arithmetic on. Manually process partition block counts into 'human readable' byte sizes when asking for confirmation of disk configuration. Install script now properly displays the size of Yottabyte partitions. requested by & ok deraadt@
2008-06-01Don't copy empty files into installed system's /etc. Tweak comment andKenneth R Westerback
mention boot.conf and ttys. No functional change.
2008-03-02Keep resolv.conf.shadow around when restarting an install. ThisKenneth R Westerback
means manually entered DNS server addresses are not lost when an install is restarted. Restores behaviour unintentionally lost with r1.127. ok deraadt@
2008-02-11For architectures with an enabled 'console' ttys entry, adjust theKenneth R Westerback
speed of said entry to reflect the speed of the console being used to install. For archs with MDSERIAL defined, offer the current device and speed as the defaults for switching to serial consoles. Fixes new Sun gear that uses a 115200 console speed and makes for better defaults without breaking current install processes. ok dlg@ henning@
2006-08-29Handle site${VERSION}-$(hostname -s).tgz files better so that theyKenneth R Westerback
don't get in the way of noticing that all default sets are installed. Restores the desired behaviour where [done] becomes the default answer to the "Location of sets?" question once all default sets are successfully installed. spotted by & ok deraadt@
2006-06-23Add a set siteXY-<hostname>.tgz and make it selected by default. ThisKenneth R Westerback
allows host specific files to be trivially installed and makes creating/maintaining large numbers of host specific configurations much simpler. Suggested by work being done by Alex Holst, brought to my attention by mk@ during c2k6. Name format suggested by henning@, tweaked by deraadt@.
2005-04-21Create disk device before attempting to disklabel it. Don't keep aKenneth R Westerback
disk which couldn't be created in the selection list. noticed by deraadt@
2005-04-02Scrounge a few characters of whitespace.Kenneth R Westerback