Commit Graph

29 Commits

Author SHA1 Message Date
thorpej fee167dd96 Needs <time.h> 1998-02-09 07:34:16 +00:00
jonathan b59abe7c80 Set hostname (via sethostname()) after configuring network.
Save hostname in /etc/myname when saving networkg config.
From Nathan J. Williams <nathanw@mit.edu> in PR bin/4781.
1998-02-07 10:28:02 +00:00
fvdl 9630119c6d * mount NFS directory to get the sets from read-only,
same for floppies (from Christoph Badura)
* allow user to run 'Configure network' multiple times, to correct errors
  for example.
* deal with network interfaces that need explicit media type selection
  (i.e. ask for it when it is needed, also store it in the generated
  /etc/ifconfig.blah file on the destination disk)
1997-12-26 01:58:44 +00:00
phil 00b12cbbd6 Ping the right host. (From Matthias Pfaller.) 1997-12-05 17:19:48 +00:00
jonathan 3722de06d9 Put shell quotes around FTP URLs in case of shell metachars in passwords.
From PR #4580.
1997-12-05 14:26:27 +00:00
jonathan d7afdff3d0 * Add main menu option to reinstall sets or install additional sets.
(like upgrade but without trying to save etc.

* Add option to setls0urce menu to look in an already-mounted (local)
  directory.  Change `local fs' option to say umounted local fs.

* Change extract_file() to check that a tarball actually exists
  and give an explicit non-curses warning if it doesn't. (see above.)

* GNU tar returns a successful status if its gunzip child dies.
  Add short sleep() after tar commands in case of undetected errors.

* Change set-source selection code (except FTP, floppy) to check
  that the mandatory set files (base.tgz, etc.tgz) exist
  in the selected directory.  If they don't, warn the user and
  prompt the user to  change the selected directory.
  Give the user the option to explicitly continue even if
  base.tgz or etc.tgz not found, just in case.

* Change extract_file() to keep count of set unpacks that succeeded
  or failed. (Unreliable, given the broken return status of gnu tar.)
  Warn the user if there are errors and abort the installation/upgrade
  if we find any.  Does at least catch Ctrl-C interrupts of unpacking.

* Make unwind_mounts() signal-safe.

* Sense of target_verify_* is broken. Replace with predicates that
  return 1 iff the file or directory exists.

* Fix upgrade tests for existing etc.old (see above) before saving
  target /etc as /etc.old.

* Other detail fixes.
1997-12-05 14:00:59 +00:00
thorpej 75dd009b1d Update for the lay-of-the-land as described in release(7). As such, move
all pathname-on-server related definitions to MI code, since they are now
defined to be consistent across all platforms.  Also, nuke the "rels" global,
since release numbers are now always specified in "long form", i.e. 1.3A
vs. 13A.
1997-11-25 06:53:07 +00:00
thorpej 01278747a2 Prompt for keypress after FTP failure, so we know what went wrong.
From Havard.Eidnes@runit.sintef.no, PR #4521.
1997-11-25 00:24:52 +00:00
simonb 33960f8371 Load defaults for hostname, IP address and netmask if these are already
configured.
1997-11-22 14:16:55 +00:00
simonb 6cf76648f3 Don't try to ping a nameserver or default router if not is specified. Also
don't build an /etc/resolv.conf if a nameserver is not specified.
Fixes PRs #4548 and #4539.
1997-11-22 13:52:45 +00:00
simonb e2b222f32d If not network interfaces are found, just return without cycling forever
with no valid choices.
Fixes PR#4542 from Stephane Engel.
1997-11-22 00:29:33 +00:00
phil 4ec8d82726 Clear up confusion of extract_dist() extract directory source. New var
ext_dir that is absolute directory name of where files are located to
extract.  All setup routines must set that directory name correctly.
Make target.c compile if DEBUG is set.
1997-11-11 00:43:31 +00:00
phil 5337c61bc4 -TODO: Remove names as they were source name rather than names of who should
do it.
-change install confirmation message to outline install process
-move english print text into msg.mi.eng.
1997-11-09 15:54:15 +00:00
jonathan 77221dcc6a * Add code to run `test(1)' on target-root pathnames.
* Change find_disks: after mouting target root, check for
  /etc/fstab in target, and abort upgrade if not found.

* Change upgrade to check if the target root has /etc.old
  before renaming the target /etc -> /etc.old.  If found, abort.
  (may indicates a failed upgrade.)

*  Add save_etc(). saves target /etc as /etc.old, then copies back
   config files we might want during upgrade, in case target is current root.

* Fix logic that fscks and mounts disks. Use subroutines to
  fsck with a warning message and ok() on continue.  Same for doing mounts.

* Fix bug in extract_dist(). Do NOT do target prefixing on the dist_dir,
  since we didn't do target prefixing when mounting it.
  (At least, NFS does't.)

* Add function to  sanity-check target root.
   Call after upgrade/install  is done.

* Change MSG_realdir to print the strerror() of any errors.
  Change target_chdir() to check if chdir() returns -1 and return errno.

* Make sure /dev exists before cd'ing there and running MAKEDEV.

* Use target_fopen() and fprintf() to write network state to disk,
  to avoid inadvertent shell escapes.

* Fix silly typo in append_to_target_file. (maybe add shell quotes?)
1997-11-05 07:28:20 +00:00
phil 443efc08d3 Complete -r flag addition, info was static, now path names are runtime
constructed so -r flag makes a diffference in the distribution directory.
1997-11-05 01:23:06 +00:00
jonathan 409430d612 * Get current root device via sysctl(). Use it in target prefixing code.
Add more #ifdef DEBUG to target-prefixing.
* Fix niggle in creating a new resolv.conf: ctime()'s result ends in '\n',
  so don't include one after the %s for the timestamp.
* Change upgrade: add the same ``disk stuff done'' message used in install,
  so the user knows what's going to happen.
  (is a more tailored message useful?)
1997-11-03 09:47:00 +00:00
jonathan 17aa1054d7 Add more target_wrapper functions, to do
* renames of files from one pathname within the  target to another
    (e.g., mv_within_target_or_die("/etc", "/etc.old");
  *  check to see  if a partition name like "sd0a" is the current root
  *  Duplicate a file from the current root into the target root
     (for copying /netbsd from RAMdisk into the  target).
     A no-op if the root is the install target).
Start using these where appropriate.

Change net.c to avoid losing any information when updating network
config files: where possible, do appends to files that might have more
info than we got from the user (e.g., /etc/hosts.)

Where possible, add comment saying file was created/modified by sysinst.
1997-11-02 23:43:11 +00:00
jonathan 2d01e4dc90 * Change sysinst MI code to use new install-target-filesystem access functions.
Add  target.c to Makefiles.

* Minor fixes:
  * Fix buglet in disks.c: make sure the target /etc exists before
    touching the target's /etc/fstab. (Could be even cleaner.)

   * If the target root is on /, don't copy our temporary /etc/resolv.conf
     to the target /etc/resolv.conf. (Could be even cleaner.)
   * Don't write the DNS hostname into /etc/defaultdomain.
     DNS  search paths are often not the same as YP group names.
1997-11-02 08:20:40 +00:00
phil bc4e8c4cf1 Bug fixes for distribution sets from floppy, nfs and cdrom. 1997-10-30 00:03:32 +00:00
phil d626993ee4 Sync with current state. Includes selection of distribution sets, tweeks
to disk detection, and floppy load.
1997-10-29 01:06:42 +00:00
phil 345ae6924d Recover more bits lost in my earlier blunder. Get update working.
Other minor tweeks.
1997-10-22 15:28:33 +00:00
phil 39725806db Floppy and cdrom distribution load. Other tweeks to improve installation
and upgrade.
1997-10-20 06:13:25 +00:00
phil 578886c5b8 Tweeks to make install better (take two)
- route messages to /dev/null
- remove // in some file names
- clear screen at proper times
1997-10-17 22:24:20 +00:00
phil fd205c739f Try to recover from a mistake of mine where I lost bits. 1997-10-17 22:17:05 +00:00
phil 15274f8880 Update to current state. Install and upgrade nearly finished. Disk
discovery and geometry no longer use /kern/msgbuf.
1997-10-15 04:35:17 +00:00
phil 9f2b3143db Update to current state. 1997-10-07 04:01:29 +00:00
phil 7f55972efc Sync with current state. Fixes PR 4193. factor.c -- replce prime table with
code to generate needed primes.  Change copyright because prime table was only
code under previous copyright.
1997-10-01 05:04:24 +00:00
phil 35e522db38 Sync to current state. (detect ftp error, clean up directories ...) 1997-09-27 00:09:22 +00:00
phil af1d23bed3 Import of sysinst. Not quite ready, but other ports want access for
parallel development.  i386 version about 90% complete.  pc532 version
just started, other architectures later in coordination with portmasters.

This is a curses based, menu driven installation program.

Better error checking is needed.
1997-09-26 23:02:53 +00:00