mount point was specified, make sure to add only a commented-out entry for
that partition when building fstab. This prevents sysinst from generating
an otherwise invalid fstab. This problem was originally reported by
Frederick Bruckman and fixed by Bob Nestor.
mount point was specified, make sure to add only a commented-out entry for
that partition when building fstab. This prevents sysinst from generating
an otherwise invalid fstab. Bob Nestor found this while working on sysinst
for mac68k, and as such there is no corresponding PR.
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.
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.
enabling and disabling swap. Enabling swap is currently only
done by the i386 port on systems with <= 8M of physical memory.
If a user re-enters the install procedure through the main menu,
and the target disk has an active swap partition, try to disable it,
warning the user that this might lead to 'out of swap' problems,
making a restart necessary. This should not happen very often.
Partly based on comments by Simon Burge.
XXX Only the callers that actually pass strings were fixed, the rest were
XXX left passing 'NULL'. Eventually they should be cleaned up to pass
XXX MSG_NONE, but I didn't want to do that yet because somebody else
XXX (jonathan) is hacking on the run_prog callers and I didn't want to
XXX cause him a Lot of conflicts. at least right now, MSG_NONE and NULL
XXX are as equivalent as they need to be.
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.
enter partitions offet and size. The user can chose unit independantly of
the unit used for display ('M'/'c'/'s'). These functions do the proper
bound checks and alignement/roudups. Used in the edfspart menu and
i386 md_make_bsd_partitions() (other ports should do the change as
well).
- now that getpartsize() does the rigth thing, kill the swapadj hack (which was
buggy anyway).
- in i386 md_make_bsd_partitions(), don't propose defaults that don't fit on
the disk. If the disk is too small, fallback to custom instead.
- fix a bug in mbr.c, where the partition flags would not have always been
reset. sysinst created me a MBR with 2 active partition. The boot code
doesn't like it :)
- added a message for eventual mount failures.
- killed donewfs and extracting messages, as we run the commands in a
subwindow these messages just flashed on the screen.
- Changes a few exit(1) to return(1), to give the user a second chance.
- added msg_clear() or wclear(stdscr) in a place or two, to make
display a bit nicer.
- in run_cmd(), if the command succeeded, don't wait for the user to
press enter.
- Make all the functions called from do_install() return an error code,
so that we can abort install if something went wrong.
- Add a 'errstr' argument to run_prog(), which if not NULL is displayed
with msg_printf() and followed by process_menu(MENU_ok) if the command fail.
Used to warn the user that the current action is aborted.
- in a few places use msg_display() or msg_printf() rather than printf.
It seems that stdout/stderr are not always pointing to the active curses
window.
- garbage-collecd unused messages, add a few new one (error handling).
XXX only tested on i386. Other md parts should be tested as well.
* Use structures, not 2-dimensional arrays..
* Use the DIOCGDEFLABEL ioctl to get the disk information,
to avoid confusion with (older) labels.
* Don't ever call fdisk for partitioning. This was the
source of much confusion.
* For the i386, use the BIOS geometry information passed by
the bootblocks.
Lots of things left to do, but it's a start.
Scripting and logging functionality for sysinst.
Child programs are run in a "display window" so you can actually see what
they did before the screen flashes back and you loose it all.
Lots of curses fixups. Removed nasty endwins that mangled the tty upon
rentry.
Change the yes/no box to accept Y or N, and not require cursor motion to
decide one or the other.
Perform curses redraws when doing things that could cause the kernel to
spew printfs onto your screen.
Replace with MAX_DISKS (size of the array of disk info).
Fixes a problem where sysinst cannot install onto disks rz5 or greater
on pmaxes (which use old SCSI with wired-down scsi devices, even for
GENERIC kernels).
(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.
* Create target /kern after creating target /etc/fstab entry for /kern.
* Check for more files in target when done: /etc/{rc,rc.subr,conf}
* Clean up warning exerciser.
* 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?)
* 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.
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.
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.