Commit Graph

32 Commits

Author SHA1 Message Date
chris 62fa2583b2 pleasemountroot has 4 %s's in it. Note that the fr translation needs
updating to 4.
2002-11-13 00:43:09 +00:00
mrg d436dd6641 extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes.  details:

- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap.  a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing.  this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'.  create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.


[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB.  as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 02:38:13 +00:00
jdc 6b6028160d Use wrefresh(curscr) instead of clearok().
Suggested by Thomas Dickey.
2001-01-07 13:07:57 +00:00
jdc 885c8eaa06 Be paranoid and do a clearok() before we do a refresh(). 2000-12-31 13:08:05 +00:00
mrg 8da46e6897 de-__P()-ify 2000-12-22 10:12:12 +00:00
jdc dab8e56b56 Don't output the termcap `cl' sequence.
XXX: do we really need to home the cursor here?
XXX: should we do clearok() instead or in addition?
2000-12-21 21:42:00 +00:00
hubertf 55e87ae551 Do not tell the user we've newfs'd his disks when upgrading.
May safe him a heart attack or two.

Fixes PR 9655 and some others.
2000-12-18 09:18:46 +00:00
wiz 8ebc8eafe0 Fix typos in comments. 2000-12-04 22:47:02 +00:00
fvdl 30b8888d4a * Change the interface of run_prog: use a flags argument instead of
seperate booleans. Add flags to run as a plain 'system()' command,
  fullscreen (but on a pty), and chrooted, and implement their
  functionality. Add a bit of TIOCPKT handling code to handle
  programs messing with term settings better.
* Ask to set the root password at the end of an install.
* Remove a few unneeded comments.
* Sprinkle some touchwin() calls here and there to make the output cleaner.
  They shouldn't really be needed, but even normal usage (no syslog
  messages) even left the screen messy sometimes.
* Change some messages around that were apparently swapped by accident and
  thus caused confusion.
2000-10-11 23:47:55 +00:00
fvdl 6bf2c525a2 On the i386, enable swapspace as soon as the disklabel has been written,
to play nice with low-memory systems.

Add a md_pre_update() hook, to do MD things before an upgrade operation.
On the i386, use it to enable swap.
2000-09-26 23:12:44 +00:00
hubertf caaae66450 Move aside X link before /etc, and move the X link back if moving /etc fails.
Else if moving X fails, the system will end with no /etc.
2000-09-09 00:21:36 +00:00
hubertf 71be3a3b99 When upgrading and /usr/X11R6/bin/X is a symlink, move it aside (X.old)
before extracting sets, and move it back afterwards, to save the information
which X server to use.

Adresses PR 10935 by Dan McMahill <dmcmahill@netbsd.org>
2000-09-08 02:50:42 +00:00
cgd 3528b5e0cf * make selection of 'none' for installation media type return the user
to the toplevel menu, as promised by the media selection menu, without
  first going through an "installation is aborted" menu.
* when something causes the installation to fail (e.g. missing set or failure
  to extract a set's contents), don't go through N menus
  (missing/failed/aborted, sets didn't install/aborted,
  sanity check failed/aborted) before getting back to the top level.  The
  user only needs to be told once that their life sucks.
1999-06-22 06:57:00 +00:00
cgd 59d3c08e03 mark all calls to write 'CL' (the screen-clear escape sequence) to the
screen as XXX.  Where they were not followed by wclear(stdscr), add
wclear(stdscr).  Somebody was let out without adult supervision.  If i
were more adventurous, i'd remove the bits that output 'CL', but i'm not
gonna go there right now.
1999-06-22 00:57:06 +00:00
cgd a640bc7014 copyright notice typo fixups, as noticed in PR#7248. This software
was developed, not develooped.
1999-06-20 06:08:13 +00:00
bouyer 8d7cb08335 Main change: add a cleanup_dist() function in util.c which will do the needed
cleanups before extracting a set. Should'nt do anything for an install,
as the filesystem shouldn't contain files that need to be removed.
cleanup_dist() is called before extract_file() for each set (the set name
is passed as parameter). It will open a file /dist/<set name>_obsolete
if it exists. This file should contain a list of files (absolutes
pathnames) that needs to be removed. cleanup_dist() will lstat() each file
to determine if it's there and if it's a directory or not.
It will then unlink() entries that are not directories and then rmdir()
directories. If a directory is not empty (it should now if the list of files
is correct) it will be renamed to <directory.old> and the user will be warned.

Other changes:
- move prototype of target_prefix() in defs.h, don't maintain a copy
  of it in each file.
- in install.c, after MSG_disksetupdone, do a wclear(stdscr) (display was
  clobbered after it).
- kill MSG_openmsgbuf, it's not used anywhere
- after MSG_disksetupdone in upgrade, don't call MENU_ok, do it the
  same way as in install.
- add wclear(stdscr);/wrefresh(stdscr); before calling MENU_distset (another
  display problem ...)
- While I'm there, move ask_verbose_dist() before MENU_distmedium. This way,
  if all go well the user can go away one ftp starts and come back once
  sets are extracted.
1999-04-13 20:17:47 +00:00
simonb af44a7fb8d Add a missing "doingwhat" reason for a re-install of sets.
NOTE:  msg.mi.fr needs a French to Englist translation marked by the XXX
comment.
1998-11-16 02:28:13 +00:00
mrg d1b0d1b602 KNF. 1998-06-20 13:05:48 +00:00
jonathan 95eae8964b Remove comment references to /mnt: some ports support upgrading while
running from the target root.
1998-02-20 00:37:17 +00:00
fvdl e139ac966d Be sure to clear the screen after the fscks in the re-install option. 1997-12-19 00:57:56 +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
jonathan b3da2a1b88 Fix target prefixing to handle both root-in-swap (traditional miniroot)
and current-root-is-target-root (pmax diskimage.

 * Add code to check disk names (e.g., "sd0") against the current
   kern.root_device  sysctl (whic  does *not* include a partition).

 * Add new function must_mount_root():
   check to see if it's the same device as the root.  If not,
   the current and target root partitions cannot overlap.
   If they do, do statfs() on "/", and return 1 iff we get back
   "root_device" as the mounted-on filesystem, otherwise zero.

* Call must_mount_root() right after the user specifies a disk as
  install/upgrade target, and  if it returns 1, print a message asking
  them to mount root, and abort.

*  Use statfs("/")  mounted_from string to check if a disk partition
    (e.g., "sd0a") matches the current root.
1997-11-09 12:47:06 +00:00
jonathan 121b2869f7 * Add merge_etc() in upgrade.c. Copies /etc.old/fstab to /etc/fstab
as last step of upgrade, so /etc/fstab exists after reboot.

*  util.c: correct sense of test in sanity-check helper check_for().
   Change variable name to `found' for readability.
1997-11-06 09:02:36 +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
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 326ca1c813 Snip out common code that fetches and unpack setss in both upgrade()
and install().  Put it into a new function ``get_and_unpack_sets()''.
Fixes a typo (/sbin/umoount) in the upgrade() version.
1997-11-02 09:41:57 +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 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 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