to prevent menuc(?) from putting all things in one line
(I don't know since when we got this "auto-wrapping" stuff,
and it may be nice for text paragraphs, but it's a PITA for
tables etc.)
do not save address/netmask/default router, if we got them from dhcp.
(we shouldn't do that). if we keep any of dhcp config into /etc, we shoul
update rc.conf to run dhcp again.
- on a IPv6/v4 dual stack network, it makes more sense to configure both.
- also, many of IPv4/v6 dual stack network requires us to contacd DNS
over IPv4 transport.
discussed with cyber@netbsd.org.
that can be specified with CHS, truncate it to the maximum values that
the BIOS provided, not 1023*255*63. Some BIOSs get awfully cranky when
you do that.
overwrite anything important. (The moving down hides some elements
of the selection box, but we can scroll).
Took some digging to find out that aparently all selection boxes default
to a upper row of 12 and some more digging on how to change it.
* Use endwin() strategically so that the child does not corrupt the display
when suspending or exiting.
* Handle backspace.
* Only do one refresh per buffer-full.
* Eliminate redundant code.
orts. Since port specific information is in appropriate arch/.../md.h
bsddisklabel.c is currently #included by arch/.../md.c.
I'm not totally happy about this, but my concience is somewhat salved by the
overall reduction in breakage.
Initially only pmax, sparc, vax and x68k are using bsddisklabel.c.
While I'm here adjust defs.h for more than eight partitions in a generic
fashion.
partitions under any circumstances, allow no swap, do not *overwrite* /usr
when listing additional partitions, and try to abstract at least most of the
magic numbers to #defines at the top.
Also sync up as much as possible to make this easier in future.
Still need to attack the other arch's md.c files.
Fixed PR#7741
If the default swap is smaller than the remaining disk, truncate to the
available space.
Set rc_configured to YES in md_cleanup_install()
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.
>Removing leading slashes in the url_encode() function is bad, because
>they might be part of a password, but somebody else had apparently made
>url_encode() do that. Here's a patch that stops url_encode() from
>removing leading slashes, changes the encode_leading_slash code to
>fit in with that policy, adds some comments that should dissuade folk
>from removing leading slashes in the future, and fixes a bug where the
>encode_leading_slash code was not decrementing len.
Shouldn't bother doing DNS lookups or wait a really long time,
should display verbose output and quit after the host has been
successfully pinged even once. count bumped up to 5 to give boards
which take a while to do media autoselection time to do their thing.
makes some things harder, for instance... Deal correctly with the case
where the user-supplied hostname is already fully qualified with the
domain name they supplied. Addresses PR#6955.
installation would try to continue even if no networking interfaces found,
and, and, when that was fixed, instead of dropping back to the
pick-distribution-medium menu they'd drop all the way back to the opening
menu.
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.
forward them on to subprocesses. nice when running a subprocess in
a display window to allow the user to kill the subprocess w/o nuking
sysinst itself. add handling for QUIT, which gets handled the same
as intr. add handling for HUP which just cleans up. More signals
should be handled.
pseudo-devices. This is done by explicitly listing the driver names
(e.g. "lo") to ignore in an array in this file. Right now, "eon", "gre",
"ipip", "lo", "nsip", "ppp", "sl", "strip", and "tun" are ignored.
use stdscr's maxx and maxy to set up the message window rather than hard
coding 78 and 22, respectively. The latter, combined with large messages
and a relatively small screen (and perhaps badly-placed menus), would seem
to cause the SEGVs reported in PR#7806. (For certain window sizes, the
menu system would reject the menus as too small, but for others sysinst
would just crash.)
password, offer defaults. When displaying the current values, note
that a password has been set and is hidden, rather than displaying
the number of characters entered for the password. (Thanks to wrstuden
for the translation of "hidden"...)
start of the URL so that the request will start from / (rather than
relative to the login directory; makes things work better for
non-anonymous FTP). To make it clearer what's going on, make the
default path (used to get distribution bits) relative. (according
to the 1.4 LAST_MINUTE file, this is OK.)
* Also, %-encode passwords in FTP URLs (doesn't help actual security, but
makes it slightly harder to figure out a password by reading over
somebody's shoulder).
be called. it'd cleanup() then exit(). however, cleanup() is scheduled
to run at exit via atexit(). This means that it gets run twice, and
this causes confusion for things like endwin(). The end result is
that rather than actually exiting and printing the "sysinst terminated"
message, after one control-c it looks like it's still sitting at the
last screen you were viewing even though it's actually at a shell prompt.
squelch the cleanup() in the SIGINTR handler to avoid this problem.
* while here, nuke the annoying space before the "sysinst terminated."
message. it looks bad, and serves no purpose.
read/write that much. Previously, too much was written back to
disk (although it didn't do any harm because of the sequence
of execution).
Also, upgrade the MBR type from 386bsd -> NetBSD if needed during
an upgrade operation.
Check if there's no active partition after MBR editing.
Ask for own MBR to be installed if we're booting from out of CHS range.
Ask for bootselector to be installed if > 1 OS, and configure it.
tables being written on disk:
- when counting non-BSD partitions, use part[i], not part[0]
- when using full disk for NetBSD, initialise all the fileds of the
mbr entries (especially flags)
- When converting to on-disk format, if start and size = 0, initialise
c/h/s to 0 for both start and end. convert_mbr_chs() would make an entry
0/0/0, 0/0/1 which is not bogus, but not what we really want either.
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.
- in run_prog(), do an explicit wclear(stdscr); wrefresh(stdscr);
before launching subwindows. This seems to solve all the display
problems associated with run_prog().
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.