summaryrefslogtreecommitdiff
path: root/distrib/miniroot
AgeCommit message (Collapse)Author
2013-12-11make the word-matching of the autoinstaller config file allow skippingAlexander Hall
the trailing question mark, such as in "hostname = foo" noted by, discussed with, and ok rpe@
2013-12-11for automated installs, use the hostname from the dhcp lease by defaultAlexander Hall
ok rpe@
2013-12-09Make the response lookup of a question match on entire words, whereAlexander Hall
anything not being a whitespace is considered part of a word. deraadt@ likes it, rpe@ has approved of the idea
2013-12-08After a completed upgrade, present reboot and post-reboot instructions in aStefan Sperling
more intuitive order: Show the 'After rebooting, run sysmerge' hint below the line that explains how to reboot, instead of several lines above. Suggested by a new user doing the first upgrade. input/ok halex@ rpe@
2013-12-07Change the response file handling such that it "consumes" an answerAlexander Hall
once it's been used, and allow the same question to be answered multiple times. This way, responses to ask_which() questions no longer need the special magic we had for them being on a single line. idea from deraadt@ ok rpe@
2013-12-06Workaround closed stdin in non-interactive mode.Robert Peichaer
ok deraadt@
2013-12-05improve the question part (second line) of ask_which to actually includeAlexander Hall
the name of what we're asking for, rather than 'Which _one_ ...' Improves things a lot for the autoinstaller. ok rpe@
2013-12-04Defer spooling of the install log output mail until we are up andAlexander Hall
running again, with our mail system of choice running. ok deraadt@
2013-12-04Eliminate spurious space that breaks parsing of nwids containingKenneth R Westerback
blanks. Same fix was applied by todd@ to /etc/netstart (r1.114) in 2006. Pointed out by Remy via bugs@. Thanks!
2013-12-04the hostname.if for a vlan's parent interface should be mode 640 to avoidStuart Henderson
a warning at first boot ok deraadt
2013-12-02As the number of interactively triggered (A)utoinstall's should be quiteAlexander Hall
outnumbered by (I)nstall's and (U)pgrade's, reorder the alternatives. "sure" deraadt@
2013-12-01More robuse parsing of the DHCP lease file for autoinstall. This will,Alexander Hall
for example, bail out instead of producing annoying output if the filename statement does not match auto_(install|upgrade). Brought up again by Patrik Lundin, thanks! ok rpe@
2013-12-01Allows the autoinstaller to pass a public ssh key for inclusion in theAlexander Hall
user's .ssh/authorized_keys. Deliberately not in interactive mode since I am not sure it's worth adding another question that only quite few people would enjoy. ok rpe@
2013-11-29Move the comments out of get_responsefile() into a description blockRobert Peichaer
at the top. ok halex@
2013-11-29- Rename _bootdev to _ifdev now that we not only supportRobert Peichaer
the interface we netbooted from for initial dhcp reqest. - Change the error message in case no response file was found to match the info message at the beginning. ok krw@
2013-11-28simplify the check if a responsefile line is validRobert Peichaer
idea from and ok halex@
2013-11-28make ask_which bail out on a missing response in the autoinstall caseAlexander Hall
rather than looping endlessly. ok rpe@
2013-11-28- use IFS=<space><tab> to trim the leading/trailing blanks with readRobert Peichaer
- simplify the key/value splitting with a true halexism - recognize a line without a '=' by counting the chars in _key/_val instead of doing a string comparison which needs a temporary _k var - localize _l ok krw@ halex@
2013-11-28Now, that the auto installer supports both, install and upgrade,Robert Peichaer
use "non-interactive mode" instead of installation. ok deraadt@
2013-11-27wasteful spaces and tabs snuck in. Actually, it's true -- this is oneTheo de Raadt
place where they do matter...
2013-11-27Remove an outdated comment.Robert Peichaer
ok krw@ halex@
2013-11-25Allow auto install/upgrade in non-netbooted case.Robert Peichaer
Add some logic to get_responsefile() to select an interface for the initial dhcp request which tells what to do (install/upgrade) and where to fetch the responsefile from. - if netbooted, use the interface in netboot group, or - if only one interface exists, use it, or - if more intefaces exist, ask user which one to use Tweak ask_which() to be usable if $auto is true, but $RESPSONSEFILE not yet set. ok halex@ deraadt@
2013-11-25Rework _autorespond()Robert Peichaer
- strip leading/trailing blanks from question - strip leading blanks from answer - compare questions case insensitive - ignore empty and comment lines and lines without = - treat empty/missing/multiple answers as error and exit - ensure, that $RESPONSEFILE is actually an existing file. - unset IFS to preserve leading/trailing blanks on read. - use read -r, because we don't support line continuation in answers. - simplify the "_i=0 but we have a default answer" case a bit. lots of feedback from halex@ ok deraadt@ krw@
2013-11-23- use a flag file to recognize a successfull autoinstaller runRobert Peichaer
- use a shorter constant logfile name - quote From lines and remove ^M in ftp output from logfile - provide the autoinstaller logfile as mail to root with help and positive feedback halex@ krw@ deraadt@ ok halex@
2013-11-19Add autoinstall configuration to the list of files and output stirringAlexander Hall
the random pool at install. Apart from the configuration in itself, this permits adding various random data in comments or whatever. ok krw@ rpe@
2013-11-19Fetch host specific responsefile, if that does not exist, fall backRobert Peichaer
to generic one. noted by and ok phessler@ ok krw@ and positive feedback deraadt@
2013-11-18Extract the information whether to install or upgrade in unattendedRobert Peichaer
mode from DHCP attribute "filename", which has to be "auto_install" or "auto_upgrade". For archs that use this attribute for the boot program create a symbolic link to auto_install and/or auto_install. Change the naming scheme for response files on the http server to <mac-addres>-<install|upgrade>.conf where <mac-address> is the lladdr of the netboot interface of to be installed/upgraded hosts, e.g. 52:54:00:12:34:56-install.conf. This allows different response files for multiple hosts. ok krw@ deraadt@
2013-11-16Remove AUTOROOT variable which is a leftover of r1.183 of install.subRobert Peichaer
diff from Philipp e1c1bac6253dc54a1e89ddc046585792 at osteo dot net ok krw@ halex@
2013-11-14fix ^C handling which was accidentally trapped a bit to muchAlexander Hall
ok rpe@ krw@
2013-11-13Ignore empty lines and emtpy answers in install.conf.Robert Peichaer
bug report from philip e1c1bac6253dc54a1e89ddc046585792 at posteo dot net ok halex@
2013-11-13Ensure, that install.conf is non-empty and isRobert Peichaer
refetched on every restart of the autoinstaller. ok halex@ krw@
2013-11-12Make variables inside get_responsefile() local.Robert Peichaer
ok krw@ halex@
2013-11-12Rework get_responsefile()Robert Peichaer
- Take netboot interface down and so kill a dhclient from a previous attempt and to free up the only bpf which exists in this installstage. Without this, we're not able to "restart" autoinstall because dhclient fails due to lack of bpf's. dhclient takes the interface up again. - Remove -s leasefile check, it's implicitly done with -n SERVER check. - Avoid possible sed error msgs by redirecting STDERR to /dev/null. - Fetch install.conf in a ftp on-liner whithout unneccessary URL var. - Shorten -s install.conf check, - [] -> [[]] for consistency ok krw@
2013-11-09Abort autoinstaller in case of an invalid answer to a yes/no question.Robert Peichaer
Avoids an endless question/wrong answer loop. with help from and ok halex@ ok krw@
2013-11-09Abort automatic installation if no sets are found in install_files().Robert Peichaer
ok krw@ halex@
2013-11-09Replace handrolled tolower() function with ksh equivalent.Robert Peichaer
ok krw@ halex@
2013-11-08Use get_ifdevs() to get the interface nameRobert Peichaer
which the system netbooted from. "cool" uwe@ on a similar diff ok krw@ halex@
2013-11-05avoid touching the signal traps during autoinstallUwe Stuehler
With this, the installer finishes even when there are kernel messages output during the installation. :) original diff and ok halex@
2013-10-31If if looks like a duck, swims like a duck, and quacks like a duck, thenAlexander Hall
it's probably is a pre-encrypted password hash. This means that the autoinstall configuration (and interactive password too) does not have to specify a cleartext password. reworked diff originating from krw@ no objections, specifically so from krw@
2013-10-27Unattended installation using DHCP and a response fileUwe Stuehler
For a completely unattended installation bsd.rd has to be netbooted, a DHCP server must be running and provide "next-server", which will be used to fetch "http://<next-server>/install.conf". The format of the response file is a list of "<key> = <value>" pairs where <key> is a substring of the interactive question (case-insensitive) and <value> is what would be entered interactively. Minimal response file example: system hostname = openbsd password for root account = <...> network interfaces = re0 IPv4 address for re0 = dhcp server? = <...> This is a starting point, it still a bit rough. ok krw@, many improvements by halex@
2013-10-13libotermcap is just an alias/link to libocurses. Use the latter so thatPhilip Guenther
the library name matches the name of its src directory. Also, include -lc here so that the crunchgen knows to build a distrib libc.a for these
2013-08-19(temporarily) introduce upgrade_to64time_t() to handle the transitionAlexander Hall
to 64 bit time_t prodded by deraadt@
2013-07-31Remove the sysmerge(8) glue from the installer -- it's never been usedAntoine Jacoutot
and something else is in the work. ok halex@ sthen@ deraadt@ kettenis@ phessler@
2013-07-21stop adding static entries to /etc/hosts for dynamic ip addressesAlexander Hall
"do it NOW" deraadt@
2013-06-10rework v6_defroute()Robert Peichaer
- simplify search for an existing ipv6 def. route - ensure, that $_routers holds a sorted and unique list - show 'list #' in prompt only if there's a list to select from - zap IFS/_oifs dance and simplify select loop - set ipv6 def. route in v6_defroute() instead of in v6_config() thanks naddy@ and todd@ for their feedback ok sthen@, krw@ on a similar diff with help from and ok halex@
2013-06-04supress errors that would occur if bioctl is missing or is run with anAlexander Hall
unsupported disk as argument (e.g. wd*)
2013-06-02If case we're running installboot on a softraid device, make sure allAlexander Hall
underlying device nodes exists. Also clean up makedev and allow it to pass multiple arguments to MAKEDEV. ok krw@ rpe@
2013-05-31clean up some IFS and input handlingAlexander Hall
ok rpe@
2013-05-31remove unneeded '\' for line continuationsRobert Peichaer
ok halex@ krw@
2013-05-25remove first and last space within (( ))Robert Peichaer
ok halex@ krw@