If installing from a pmax diskimage as both current root and target root,
the diskimage /usr/bin/tar is hidden underneath the target /usr mountpoint
when it's time to untar distribution files. From a comment in the change:
Make sure any binaries in a diskimage /usrbin get copied
into the current root's /usr/bin. (may be same as target /usr/bin.)
The rest of sysinst uses /usr/bin/{tar,ftp,chgrp}.
We cannot ship those in /usr/bin, because if we did
an install with target root == current root, they'd
be be hidden under the target's /usr filesystem.
Requires updated diskimage build script which populates /usrbin with
tar, gzip, gunzip, ftp, and chgrp (all statically linked.)
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.
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.
still needs an option to specify the distribution sets from a filesystem
present in fstab.
Add "ados" to the list file recognized filesystems.
Increase label information table size to 16 to allow for 16 partitions.
* 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?)
- Added -r rel flag to change the release tag on the tar files.
- Added Usage
- Fixed a menu bug (missing exit)
- Made target_expand available to all functions to produce correct
file names.
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?)
* Correct arg typo in mv_within_target_or_die().
* Add new path-prefixing entrypoints to fopen(), collect(), and do mounts.
* Use the above. MI code is now clean of explicit references to /mnt.
* Lint: add `const' to collect()'s pathname arg.
include <stdio.h> in factor.c, now that defs.h uses FILE*.
* Put newfs-and-mount code into a separate function, in case
we want to support non-ffs filesystems.
* Check for the currently-mounted root, and don't newfs or mount it.
Assumes md code will also avoid changing that partition.
* 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.