(/mnt)/usr/share/zoneinfo in a listbox, and setting (/mnt)/etc/localtime
accordingly.
* Adjust for the needed menuc change un run.c's log_flip() and script_flip()
functions.
Related PRs:
5777 sysinst does not offer to tweak /etc/localtime
8099 changing the default time zone is non-obvious
9910 sysinst doesn't ask about setting timezone
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.
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.
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.
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.
Only implemented for the i386; behaviour for other ports is
unchanged. For the i386, make this function remove some extraneous
files in /, and frob rc.conf to have rc_configured=YES. The defaults
are reasonable, and it saves the user having to set TERM and mount
filesystems by hand in order to be able to edit /etc/rc.conf
(XXX not very clean, but it's a workaround to be more user-friendly
for 1.3.2)
Also adapt a few messages slightly so they apply to both situations.
* Add `partinfo' type, for description of a single partition,
so we can pass labels by reference..
* Add label.c with label initialization, naive overlap-check code,
and a UI entrypoint edit_and_check_label() which iterates through
checking a label for overlaps, and if any, giving the user the choice of
fixing them or punting back to the main menu.
* Change return type of md_make_bsd_partitions from void to int.
Return 0 if the partition has problems (or the user gave up on it)
and 1 if the partition is completed and looks OK.
* Change install() to check return value of md_make_bsd_partitions().
If it returns zero, print an `abort' message and return to main menu.
* Add label.c to all ports' Makefile.
MD code tested on pmax and cut-and-pasted to other ports.
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.
* 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?)
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.