Commit Graph

687 Commits

Author SHA1 Message Date
cgd 5c3428778d convert tables to use the new table formatting functons. i386 tested,
mac68k and bebox bits compiled to the extent possible.  (bebox seems
broken, with duplicated menu names, but it doesn't look like that's my
fault.)
1999-07-04 08:01:39 +00:00
cgd 6b37daf0b6 From Alan Barrett <apb@iafrica.com>, in response to my response to his PR:
>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.
1999-07-03 09:02:23 +00:00
fvdl 440bb56d81 Don't use .PATH here, it won't work because of crunchgen. XXX 1999-06-30 22:21:57 +00:00
mrg e7e33e2136 miniroot changes:
install.sub:
	- fix interface grovelling, ifmedia support, allow ifmedia and link
	  to have a "none" (-> "") answer (which lets you give nothing when
	  a default answer is given)
	- allow installing more than one set at a time, including "all" as
	  a synonym for all remaining sets
	- mount -o async when extracting sets
    makeconf.awk:
	- put default "libs" section at the end rather than the start, so
	  you can put other "libs" in before this list
	- minor cleanup

    mtree.conf:
	- create /kern

    sparc install.md:
	- MDSETS are now "kern xbase xcomp xcontrib xfont xserver"
	- use /kern & kernfs (replaces dmesg)
	- replace grep & cut pipe lines with sed
	- replace grep hackery with sed hackery
	- grep and cut are no longer required!  yay!
	- deal with no /usr/bin/vi -- call disklabel -i
	- in md_copy_kern() link the netbsd.GENERIC we got from the kern set,
	  rather than the miniroot kernel
    sparc miniroot list:
	- no more dmesg, cut or grep

sparc ramdisk changes:
    Makefile:
	- `ramdiskbin.conf' is now generated by makeconf.awk
	- don't use libhack's opendir, it breaks
    dot.profile:
	- don't assume terminal is `sun'
	- set EDITOR=ed
	-
    list:
	- instbin -> ramdiskbin to make `makeconf.awk' work
	- CRUNCHSPECIAL those special dirs
	- add our LIBS as necessary

libhack changes:
	- if NOLIBHACKOPENDIR is set, don't build opendir.o
1999-06-27 12:55:58 +00:00
cgd 9db718d7b7 arm32 has an X server set 1999-06-27 02:10:58 +00:00
cgd 721d94b596 nuke md_copy_filesystem()'s contents. it now just returns 0. 1999-06-27 00:23:07 +00:00
cgd d87d2f2837 use -DNO_EDITCOMPLETE -DNO_ABOUT rather than -DSMALL. The latter excludes
the progress meter code, which isn't particularly large and which is _very_
useful when downloading distribution sets from a not-local network.
1999-06-25 01:07:56 +00:00
cgd 026efaa662 replace "/sbin/ping -c 2 %s" with "/sbin/ping -v -c 5 -w 5 -o -n %s".
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.
1999-06-24 00:16:49 +00:00
cgd 834b871ea5 don't make /etc/hosts's contents a message. there's no point and it
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.
1999-06-23 22:55:14 +00:00
cgd 491d56190d address the problems described in PR#7833 and its followups: ftp/nfs
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.
1999-06-22 18:47:07 +00:00
cgd 092b1acdb4 now that msg_window returns a value, check it 1999-06-22 15:04:15 +00:00
bouyer ab68dc3e40 Translate into french the new stuffs added by cgd. 1999-06-22 12:45:26 +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 f9227dd6ef kill the "If you see error messages above..." and related chunks from
the disksetupdone message.  If there were errors, sysinst would (or
should) have bailed out.
1999-06-22 04:29:54 +00:00
cgd 72928b1093 nuke ask_ynquestion from orbit. not only was it bogus w.r.t. what is
allowed in C (see PR 6431), but it's also bogus w.r.t. sysinst's message
display style, etc.  XXX the French msg file needs translation.
1999-06-22 02:43:09 +00:00
cgd 1efdb57757 explicitly mention that the domain name requested is the DNS domain name 1999-06-22 02:21:58 +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 afa3578c2f provide a way to ignore tty-generated signals (INTR and QUIT) and/or
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.
1999-06-22 00:43:57 +00:00
cgd f337a5c974 actually use all of the action window for command output 1999-06-21 02:55:27 +00:00
cgd 7f0f3a202c simplify the code to display cmd output in subwindows slightly. while
at it, remove the gratuitous inefficiencies.
1999-06-21 02:47:41 +00:00
danw a70101fd7b const poison login 1999-06-21 02:32:20 +00:00
cgd 9c8517c573 handle CRs properly when running cmds w/output to subwin 1999-06-21 02:31:17 +00:00
cgd 40587021a6 dependencies on BSDSRCDIR should be _removed_, not introduced. Use
paths relative to ${.CURDIR} instead.  Using BSDSRCDIR here means that
it's impossible to compile these programs out of the source tree they're
a part of, unless that sort tree happens to be the one at BSDSRCDIR.
1999-06-21 01:19:36 +00:00
cgd f4ce9a35ea nuke extra spaces around logging menu title, allow the menu to be
automatically horizontally centered.
1999-06-20 20:26:42 +00:00
cgd 45a8fa11cd reimplement most of get_ifconfig_info() so that it only ignores network
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.
1999-06-20 07:55:00 +00:00
cgd cdd16f2bf9 clues for the clueless and convenient common-bogon grep list. 1999-06-20 06:53:06 +00:00
cgd a1d9660ade typos noticed in PR#7248 1999-06-20 06:42:05 +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
cgd eb1ee6e879 message and menu files now named *.en rather than *.eng (via repository
move).  Fixes PR#7277.
1999-06-20 05:55:51 +00:00
cgd a28535f4c0 Moved to ./msg.mi.en,v 1999-06-20 05:48:49 +00:00
cgd f3d8660f1f Moved from ./msg.mi.eng,v 1999-06-20 05:48:48 +00:00
cgd 5bc1f13c47 Moved to ./menus.mi.en,v 1999-06-20 05:48:45 +00:00
cgd 303077ef06 Moved from ./menus.mi.eng,v 1999-06-20 05:48:44 +00:00
cgd d15ec67e7c Moved to ./arch/mac68k/msg.md.en,v 1999-06-20 05:48:42 +00:00
cgd 36c2855ac2 Moved from ./arch/mac68k/msg.md.eng,v 1999-06-20 05:48:41 +00:00
cgd 4641e1cceb Moved to ./arch/mac68k/menus.md.en,v 1999-06-20 05:48:39 +00:00
cgd 109d4d2820 Moved from ./arch/mac68k/menus.md.eng,v 1999-06-20 05:48:38 +00:00
cgd f0eb5d2943 Moved to ./arch/bebox/msg.md.en,v 1999-06-20 05:48:36 +00:00
cgd 0ca07199cd Moved from ./arch/bebox/msg.md.eng,v 1999-06-20 05:48:35 +00:00
cgd 1e1bd40fc1 Moved to ./arch/bebox/menus.md.en,v 1999-06-20 05:48:34 +00:00
cgd d909fb233b Moved from ./arch/bebox/menus.md.eng,v 1999-06-20 05:48:33 +00:00
cgd 7d4a1bcfd0 Moved to ./arch/vax/msg.md.en,v 1999-06-20 05:48:21 +00:00
cgd e6e1d712f2 Moved from ./arch/vax/msg.md.eng,v 1999-06-20 05:48:20 +00:00
cgd 32c1996a86 Moved to ./arch/vax/menus.md.en,v 1999-06-20 05:48:19 +00:00
cgd 02e778ce3f Moved from ./arch/vax/menus.md.eng,v 1999-06-20 05:48:18 +00:00
cgd 53ad1be219 Moved to ./arch/macppc/msg.md.en,v 1999-06-20 05:48:14 +00:00
cgd 1209c0ae3d Moved from ./arch/macppc/msg.md.eng,v 1999-06-20 05:48:13 +00:00
cgd 9722658a75 Moved to ./arch/macppc/menus.md.en,v 1999-06-20 05:48:13 +00:00
cgd b26232be40 Moved from ./arch/macppc/menus.md.eng,v 1999-06-20 05:48:12 +00:00
cgd 6979132b6e Moved to ./arch/sparc/msg.md.en,v 1999-06-20 05:48:11 +00:00
cgd 251277862f Moved from ./arch/sparc/msg.md.eng,v 1999-06-20 05:48:10 +00:00
cgd c991293875 Moved to ./arch/sparc/menus.md.en,v 1999-06-20 05:48:09 +00:00
cgd 9542802224 Moved from ./arch/sparc/menus.md.eng,v 1999-06-20 05:48:08 +00:00
cgd 667ca88f62 Moved to ./arch/pmax/msg.md.en,v 1999-06-20 05:48:07 +00:00
cgd 947338be21 Moved from ./arch/pmax/msg.md.eng,v 1999-06-20 05:48:06 +00:00
cgd 827fb383e3 Moved to ./arch/pmax/menus.md.en,v 1999-06-20 05:48:06 +00:00
cgd d80758862c Moved from ./arch/pmax/menus.md.eng,v 1999-06-20 05:48:05 +00:00
cgd caa48ae9df Moved to ./arch/pc532/msg.md.en,v 1999-06-20 05:48:03 +00:00
cgd 95c31e6136 Moved from ./arch/pc532/msg.md.eng,v 1999-06-20 05:48:02 +00:00
cgd 25bbeb1bc7 Moved to ./arch/pc532/menus.md.en,v 1999-06-20 05:48:02 +00:00
cgd 64c6534433 Moved from ./arch/pc532/menus.md.eng,v 1999-06-20 05:48:01 +00:00
cgd 185d9f5c26 Moved to ./arch/i386/msg.md.en,v 1999-06-20 05:47:59 +00:00
cgd 5b971a4435 Moved from ./arch/i386/msg.md.eng,v 1999-06-20 05:47:58 +00:00
cgd 7cede0dbab Moved to ./arch/i386/menus.md.en,v 1999-06-20 05:47:57 +00:00
cgd 88f46e6a38 Moved from ./arch/i386/menus.md.eng,v 1999-06-20 05:47:56 +00:00
cgd 1ca2706d9b Moved to ./arch/arm32/msg.md.en,v 1999-06-20 05:47:53 +00:00
cgd 14205fc529 Moved from ./arch/arm32/msg.md.eng,v 1999-06-20 05:47:52 +00:00
cgd 34c597ab48 Moved to ./arch/arm32/menus.md.en,v 1999-06-20 05:47:51 +00:00
cgd 8af3c264a7 Moved from ./arch/arm32/menus.md.eng,v 1999-06-20 05:47:50 +00:00
cgd 5fd4cb736d Moved to ./arch/alpha/msg.md.en,v 1999-06-20 05:47:49 +00:00
cgd 737bb75981 Moved from ./arch/alpha/msg.md.eng,v 1999-06-20 05:47:48 +00:00
cgd 4d6228ce87 Moved to ./arch/alpha/menus.md.en,v 1999-06-20 05:47:47 +00:00
cgd 953eba11a8 Moved from ./arch/alpha/menus.md.eng,v 1999-06-20 05:47:46 +00:00
cgd ab6f2f5d56 since all horizontal placement specs here are attempts to center the menu,
just stick with the new default (horizontal centering).
1999-06-20 05:44:26 +00:00
garbled 128b6749ab Check the return code of subwin and newwin for NULL. 1999-06-20 04:17:57 +00:00
cgd 56de4e1945 slightly better title for the utility menu 1999-06-20 02:15:22 +00:00
cgd 01d9e08651 instead of defining a specific menu item for exit, use an 'exit' spec
with a custom string.  This way the top-level exit is 'x', like the rest.
1999-06-20 02:09:20 +00:00
cgd 4ffb63388c kill bogus spaces before and after menu titles. the menu code now positions
titles correctly.
1999-06-20 01:23:32 +00:00
cgd fb8da4672e initialize the menu systerm before setting up the message window. Then
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.)
1999-06-19 06:52:22 +00:00
cgd 8d188fe03a fix a slight bogon in the geometry approval message. (This is the
correct disk -> This is the correct geometry.)  (Thanks to tls and
wrstuden for help w/french.)
1999-06-19 01:23:52 +00:00
cgd ee07f989ae Clean up the FTP source selection menu some. When changing all but
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"...)
1999-06-19 01:10:59 +00:00
cgd 5e4db63c27 * when encoding an FTP url, if the path starts with a / put a %2F at the
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).
1999-06-18 23:26:40 +00:00
cgd e26af403c2 get rid of some annoying (bad-looking) and unnecessary spaces in the
network name/address/etc. prompts.
1999-06-18 23:14:01 +00:00
cgd bf0ffa5211 * hitting control-c (causing SIGINTR) would cause the SIGINTR handler to
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.
1999-06-18 08:54:28 +00:00
cgd c42289089f nuke md_copy_filesystem()'s contents. it now just returns 0. 1999-06-18 05:08:57 +00:00
gwr 74d4236abd Warning fixes from kurt.schreiner 1999-05-27 05:41:15 +00:00
gwr b6019bb35a fix warning allegedly reported on i386 1999-05-23 22:08:17 +00:00
veego 3a53c9e30e Fxi the last commit:
move the include of bsd.prog.mk in front of the .PATH.
1999-05-23 10:25:43 +00:00
tron 2f3417d997 Fix listfiles to handle object directories. Patches supplied by
Izumi Tsutsui in PR misc/7628.
1999-05-23 07:31:19 +00:00
gwr 14ec5cd1da Things in distrib/utils need to know BSDSRCDIR anway,
so we might as well use it.  Lots simpler.
1999-05-19 04:17:49 +00:00
gwr bb4c388e4e New files... 1999-05-19 03:58:13 +00:00
gwr a68da00556 Prune out NLS stuff. 1999-05-19 03:55:33 +00:00
gwr 0538cba737 Stubbed-out utmp file functions. 1999-05-19 03:54:40 +00:00
gwr 573562df6c Slimmed-down localeconv 1999-05-19 03:53:58 +00:00
gwr 1cf8e1e36b Prune out references to qsort in opendir unionfs code.
(Never needed on a ramdisk root.)
1999-05-19 03:53:03 +00:00
bouyer 145e79f160 Sync with the english version. 1999-05-18 18:07:25 +00:00
ross 219ec208d3 WARNS
include prototype for memset(3)
1999-05-13 12:55:37 +00:00
ross f4b387af13 Fix unclosed .Bl.
Adjust tag width.
1999-05-11 16:39:03 +00:00
wrstuden f2a11156e3 We don't need to give explicit rules for .c.o conversion, the default
ones work fine, and are correct for cross-compiling.
1999-05-06 18:48:23 +00:00
simonb a94b4b4c49 Add setting RTC offset for pc's. 1999-05-05 01:21:37 +00:00
fvdl e254cfed65 Since our mbr code and bootselector are only 512 bytes long, only
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.
1999-05-02 15:26:22 +00:00
fvdl 337300d376 Change partition type if we're installing into an old 386bsd partition.
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.
1999-05-02 13:07:15 +00:00
drochner 5c7be261d4 disable the "install" target in a way which works if other "install"
rules are present
1999-04-28 09:18:13 +00:00
abs 4a2304f936 Cleanup to work on sparc again 1999-04-26 05:04:50 +00:00
ross 944dc00f76 * Umm, the installboot(8) run is important. Don't ignore errors!
* Use the current boot program schema.
1999-04-23 19:10:54 +00:00
tsubai 9751244932 md_post_newfs() should return int. 1999-04-23 01:38:35 +00:00
simonb eec6041cf5 An empty stub routine should return success not failure! 1999-04-21 11:55:07 +00:00
ws aded74faa1 Update the set split counts for floppy installation to match reality. 1999-04-19 13:17:09 +00:00
minoura 86417913a0 Which is the tmp_dir (the directory which contain CHANGES or that of
base.tgz) was a FAQ.  Note more clearly.
1999-04-18 14:34:52 +00:00
simonb e491f2661b Don't frob the interals of a WINDOW*, use the getmaxx() and getmaxy()
macros.
1999-04-18 04:09:27 +00:00
simonb c6f8d15017 md_post_newfs() now returns int after the latest round of changes. 1999-04-16 15:42:32 +00:00
simonb 7e09f8d2f8 Descend into sysinst directory if sysinst/arch/${MACHINE} exists. 1999-04-16 10:10:24 +00:00
ender 3a4b99f66e Make this compile again. 1999-04-16 08:29:15 +00:00
bouyer 88c3275af3 Add wclear()/wupdate() before MSG_makedev, bits of the previous screen
were left.
1999-04-15 12:25:54 +00:00
nathanw d69ac94192 Make this compile again (a return -> return foo was missed when
md_copy_filesystem was made to return an int in 1.10).
1999-04-15 05:01:04 +00:00
bouyer de3024ade3 Correct some bugs in mbr handling, which could lead to invalid partition
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.
1999-04-14 16:00:42 +00:00
bouyer 0e3751fa5f If there is no files to delete, return 1 (success), not 0. 1999-04-14 12:47:27 +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
bouyer 5c7e21f9cb - Add a message explaining the user how to specify units for inputs
- 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().
1999-04-13 14:49:56 +00:00
bouyer be743ed36b - Add 2 functions in label.c, getpartoff()/getpartsize() used to let the user
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.
1999-04-11 22:40:19 +00:00
jonb fb618761b7 Make this compile again... fix a couple of small typo's 1999-04-09 12:44:44 +00:00
bouyer 72d28a06a3 Oups, missed a lot of run_prog() calls when I changed the prototype. 1999-04-09 10:43:56 +00:00
bouyer 04f9354ab3 Some fixes for the do_install() function:
- 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.
1999-04-09 10:24:38 +00:00
bouyer a17071efea Sync with .eng versions. 1999-04-08 12:54:52 +00:00
simonb 1c15941926 Remove any leading '/'s in the pathname component of the FTP URL.
When the complete URL is constructed, and '/' is inserted between
the hostname and the pathname components.
1999-04-07 13:09:55 +00:00
simonb f04624dfbf Remove single quotes from the ftp URL and remove the comment about
"protecting the URL from the shell."  run_prog() now breaks up it's
argument and calls execvp() directly, so there's no shell to be wary
off...
1999-04-07 05:18:49 +00:00
tsubai b8f166d4da Fix menu item number. 1999-04-06 09:31:40 +00:00
simonb e8f5904d9e Move prototype for disp_cur_part() from defs.h to mbr.h. 1999-04-05 06:59:36 +00:00
simonb 277c24dc4c Don't include <sys/disklabel.h> - "defs.h" does this us with the
right #defines so that we get the filesystem type names.
s/fstype/fstypenames/
1999-04-05 06:24:17 +00:00
fvdl 2eef6a3ee1 Make sure to get the magic MBR number right (i.e. use u_int16_t). 1999-04-03 22:56:22 +00:00
fvdl 793f57a4e6 Adapt setting of active partition to newer MBR handling. 1999-04-01 11:33:02 +00:00
fvdl a5d73e00eb Rework the MBR code, and some of the labelling code.
* 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.
1999-03-31 00:44:48 +00:00
kleink 270c5e6806 Typo. 1999-03-28 17:12:12 +00:00
minoura 632ad8cde6 Use pax(1) instead of tar(1).
MD parts already have this change.  /usr/bin/tar can be removed from
the miniroot.
1999-03-26 09:24:27 +00:00
ender c32aac7964 Uncomment some file copies now that the files actually exist. 1999-03-26 08:52:44 +00:00
mark f7644e2429 Allow various X11 sets to be installed. 1999-03-26 03:03:37 +00:00
mark 1f8be737e2 Pull in cgd's improved filecore bootblock checksumming code from
sys/arch/arm32/arm32/disksubr_acorn.c
1999-03-26 03:02:45 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
ross ac722a849a Bug fix: deal with race-like (select(2) vs wait4(2)) error flow bogon. 1999-03-22 09:02:47 +00:00
ender e7a6b35eae The sysinst utility for NetBSD/mac68k. From Bob Nestor <rnestor@metronet.com>
in PR #6867 with some cleanup by me.
1999-03-22 08:37:31 +00:00
he 2efafeabaa Add note about /usr/include/machine and e.g. /usr/include/i386 on upgrade. 1999-03-19 15:44:59 +00:00
perry 0547e6d3b2 URLs can't safely contain certain characters unless they are %XX hex
encoded. This means certain passwords, usernames, etc., will not work
with "ftp ftp://...."

This code, submitted by Alan Barrett <apb@iafrica.com>, fixes this by
hex encoding unsafe strings in a clean fashion. This should close a
couple of outstanding PRs. Thanks Alan!
1999-03-19 14:49:07 +00:00
simonb 826dd9708b Add "Set root's shell and password." 1999-03-17 12:42:42 +00:00
fvdl a4ca20e23e Start cleaning up geometry code by storing the disk geometry in a structure
with proper names, not an integer array with is numerically indexed.
1999-03-14 14:19:05 +00:00
ender 5a333883e0 Fix a typo. 1999-03-13 23:17:04 +00:00
sommerfe 93c6dea365 Make it more clear where this came from. 1999-03-13 19:11:54 +00:00
sommerfe a8ff351bae Warnsify.
Add reduced version of getcap routines, so sysinst need not drag in
the database goop via libtermcap.
1999-03-13 19:08:43 +00:00
marc a08745a0e8 if exec fails, perror() and _exit(). exit() is no good, because if
the child runs the atexit cleanup() function, the filesystems get
unmounted and things lose.
1999-03-11 16:48:27 +00:00
he 1a36836b8e If TIOCGWINSIZE returns 0 x 0, default to 80 x 24 instead of crashing. 1999-03-09 19:30:00 +00:00
garbled c6d6153ab6 Found another case of shell redirection in a run_prog. Tidy it up with
do_system, and appropriate logging calls.
1999-03-08 19:42:30 +00:00
is 2c7fa23c38 Fix Copyright dates 1999-02-16 23:34:10 +00:00
is dc068e0d1f Assign my files to The NetBSD Foundation, Inc. 1999-02-16 22:46:55 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
kleink b75d68301e <sys/fcntl.h> -> <fcntl.h> 1999-02-12 15:04:00 +00:00
he ff15f486fc Move extern declaration of do_system() from run.c to defs.h, used by i386/md.c 1999-02-01 14:08:35 +00:00
garbled ed77015dc8 When special casing these commands with do_system, remember to add
manual logging and scripting calls, so everything is recorded in it's
proper location.
1999-01-25 23:55:10 +00:00
garbled 851ee9e397 1) Remove all vestiges of tar from src/distrib. Use pax and appropriate
commandlines for all tar operations.  (work supplied by Matt Green)
2) Update arch/*/md.c to deal with new sysinst/run.c.  Special case
anything that needs to do a redirect or a pipe.
3) #if 0 some unused code in target.c. This code will need to be updated,
or special cased with do_system.

Big thank you to Matt for all his work on this.
1999-01-25 23:34:20 +00:00
garbled 5a277f5dfd Fix thinko. Thanks to mrg. 1999-01-23 15:54:31 +00:00
garbled 10218daeef Correct some oversights in the sysinst conversion. arch/alpha/md.c and
others allready had these fixes.
1999-01-23 06:19:17 +00:00
garbled 232877f475 Forgot to check this one file into the tree with sysinst. 1999-01-23 06:11:51 +00:00
tsubai da7b796faf Uncomment X11 stuff. 1999-01-21 08:55:40 +00:00
garbled 37a95fd205 Oops.. missed an external declaration in the merge.. compiles now. ;) 1999-01-21 08:13:02 +00:00
garbled 865c31ac7b This change includes the following:
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.
1999-01-21 08:02:17 +00:00
mrg 2e85a68f15 ignatios' tool to build bootable sparc/sun3 cdroms. 1999-01-18 07:37:23 +00:00
tron 25e26cd4d4 NetBSD-current uses 169 as MBR partition ID, not 165.
Fixes PR install/6737 by Soren S. Jorvang.
1999-01-11 23:23:28 +00:00
mrg a17ace088d move gzip_s to x_gzip via repository copy. gzip_s was the wrong name from the start. 1999-01-11 13:02:03 +00:00
mrg 747cbac661 add a -DSMALL netstat. saves ~30k of text/data for me, on the sparc. 1999-01-10 13:50:35 +00:00
simonb 309b01ee4b Add handling raid's as well 1999-01-10 00:52:33 +00:00
simonb 9e61ed141a Add handling ccd's 1999-01-09 12:58:03 +00:00
simonb b520d1bbc1 s/sprintf/snprintf/ 1998-12-16 22:35:26 +00:00
ragge 42b291e36f Sysinst support for vax. 1998-11-30 22:36:00 +00:00
jonathan 2b381dd5ae Copy script-based installer from i386 ramdisk to MI directory. 1998-11-28 01:38:30 +00:00
bouyer 07b6364862 A few line overflow fixes, for 1.3.3. 1998-11-25 12:50:54 +00:00
sakamoto 4f70b04b16 Add bebox install floppy and sysinst files. 1998-11-19 08:58:02 +00:00
simonb 4a17f9c066 Remove comment saying a translation is needed - it's there! 1998-11-18 02:06:48 +00:00
bouyer cc52aa9190 Sync with msg.mi.eng. 1998-11-16 12:49:09 +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
thorpej d08c29080c Need deflateParams() stub now, too. 1998-11-12 16:49:47 +00:00
bouyer e45d95cb56 Make the warning about whole-disk installation less ambigous. 1998-11-11 17:58:42 +00:00
bouyer fa7460bdff Sync with menus.md.eng 1.15, msg.md.eng 1.7 1998-11-11 16:04:41 +00:00
bouyer d9605b4cef Translation of recently-added messages, from Stephane Engel. 1998-11-10 15:06:29 +00:00
jonathan 9e93af392d Handle ifconfig "media: ethernet manual" output for devices with
non-soft-settable media.  Treat that as if there was no media output.

Use a supplied media-string of "<null>" or "<default>" or synonyms to
avoid passing explicit media flags onto ifconfig.
1998-11-09 07:56:11 +00:00
jonathan 6ad9b1b1ef UI safety: change order of menu entries in BSD disklabel-editing menu,
so that the default option is to change a partition entry, rather than
proceed.  (The change-parittion menu has an option to quit.)
1998-11-08 04:42:21 +00:00
jonathan 9f856c8207 Fix sneezo during commit. 1998-11-08 02:56:27 +00:00
jonathan d325644fcd Fix thinko in previous commit (spelling mistake in argument name). 1998-11-08 02:55:07 +00:00
jonathan 39a8d7790a Use MI function label.c:savenewlabel() in MD code to to save labels,
now that cut-and-paste errors are resolved and MD changes unified.
Postponed for i386, pmax until 1.3.3 frozen.
1998-11-08 02:11:23 +00:00
jonathan 8b4f18eb50 Pull up change from arm32 version: only copy disktab.preinstall if not DEBUG.
Pull up rev 1.3 from arch/sparc/md.c version:
    add a "ta=4.2BSD" to disktab. fixing choosing X sets to install.
1998-11-08 02:06:27 +00:00
jonathan bdc004ebc2 Fix lossage from overly-aggressie undoing of i386 'd' partition lossage:
alpha, sparc, ppc md.c files had disktab string ":sd#.." to save
disklabel sector-size, when they really need ":se#..."
(Can now make this MI.)
1998-11-08 01:45:45 +00:00
jonathan 82e31c8f5a Change `layout' message to explicitly say that here, partitions are
being defined in the BSD disklabel (not the MBR).
1998-11-07 22:57:37 +00:00
jonathan 29dce06a1a Explain that this menu lets the user choose partition-size units for
either BSD disklabel partitions, or (on some ports) for MBR slices, too.

Note that ZBR disks make cyinder alignment rather academic.
1998-11-07 22:04:19 +00:00
jonathan 1823e2d762 Add text to `whole disk'' vs `normal' menu that explains to the user
just what the hell sysinst is asking for.  (Why do we include the
`dangerously dedicated at all?)

Fix dangerous UI botch: make `normal' install the default, not `whole disk'.
1998-11-07 20:57:52 +00:00
jonathan 06079cb5e7 Expand messages prompting for BIOS geometry; say explicitly that it's
the BIOS that's being asked for, and that the real geometry is for
comparison only.
1998-11-07 20:17:28 +00:00
simonb df9541e68b Move all partitioning menus up by one, and add an entry (two for the
i386) so that the partition menu items match the selector letters).

XXX: All the .fr files need checking - look for the comment
	/* XXX: ENGLISH -> FRENCH */
1998-11-03 13:26:03 +00:00
jonathan 56b85b59ae The disk-scanning loop in get_disks() had a magic upper bound of 5.
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).
1998-10-31 03:54:44 +00:00
phil be6397e767 Implement a config file (-f file) option that overrides compiled in
defaults for things like rel (release number), ftp host, ftp prefix,
cdrom device, cdrom directory and others.
1998-10-25 19:15:04 +00:00
phil c0b49a1eac Make all menus scrollable by default so small screens won't have
problems.
1998-10-22 05:38:50 +00:00
phil 984947d5b9 Change how network interfaces are selected to allow for longer names,
e.g. epic0.  (Fixes PR 5778)
1998-10-14 05:27:52 +00:00
erh b3edb8ba74 Add braces to make egcs happy. 1998-10-12 17:00:43 +00:00
ross ccc17f86dd g/c debug rule 1998-10-08 01:08:24 +00:00
ross e462ec8f09 Simplify the SRCDIR comment. 1998-10-08 00:44:16 +00:00
mark 0220416488 Miscellaneous maintainance and debugging.
Fix several size / offset calculation errors.
Make some of the default partition sizes more realistic.
1998-10-06 01:43:12 +00:00
mark 0402c9b7d8 Add T_FILECORE to the DTYPE enum.
Add filecore to the fstype array.
1998-10-06 01:37:17 +00:00
phil 51fbe5aee3 Fix class c netmask. 1998-09-17 16:45:36 +00:00
phil 5807dd11b1 Comments added/modified to clarify how txtwalk works. 1998-09-17 05:57:28 +00:00
phil 3330188abd 1.3 has long since come and gone, update some entries, add a couple. 1998-09-17 04:11:54 +00:00
mrg a93789ab6a add a "ta=4.2BSD" to disktab. fixing choosing X sets to install. 1998-08-30 09:08:52 +00:00
perry e31adf91d8 bzero->memset 1998-08-10 02:23:45 +00:00
perry 4900e681b0 bcmp->memcmp 1998-08-10 02:22:30 +00:00
hubertf bc66f03729 /route/s/-f/flush/ 1998-08-05 07:44:58 +00:00
lukem aa02ec494a link with -lutil for fparseln(). noted by jim bernard in bin/5895 1998-08-02 03:17:21 +00:00
tsubai 04e0026f9b Add md part of sysinst. 1998-07-29 05:41:55 +00:00
rvb a3d43525ee Fix BIOS GEOMETRY menu 1998-07-21 14:53:36 +00:00
mrg 32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
mrg 58e5e70a16 remove bogus unnecessary "NetBSD-X.Y" directory from cdrom path; it will not exist for future cdroms 1998-06-22 12:18:52 +00:00
mrg d1b0d1b602 KNF. 1998-06-20 13:05:48 +00:00
mrg 3e6e1c5a04 KNF, and don't copy filesystem. 1998-06-20 12:46:00 +00:00
mrg 8eff781723 add my zlib-based gzip for installs. 1998-06-06 06:11:19 +00:00
mrg 5725ca5157 initial sysinst support for the sparc, based on the alpha stuff. not heavily tested. 1998-06-06 05:34:00 +00:00
lukem 86d96336f3 spell successfully correctly 1998-06-02 14:14:46 +00:00
fvdl 4cefa17401 Forgot this in previous. 1998-05-15 15:19:25 +00:00
fvdl f998547470 Add MD cleanup function to do some thingd once the install is done.
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.
1998-05-15 15:12:29 +00:00
ross f7a658d062 The 3/29 rewrite broke floppy builds, so add back a (different)
hack to enable this to work when included from a different directory.
Idea:  if the crunchgen(1) child were to cd to the target directory
just prior to executing its manufactured Makefile, then problems
like this might not occur.
1998-05-03 16:50:25 +00:00
ross 25df7fccdd Build x_sh, even though some non-sysinst ports don't use it. Yet. 1998-05-02 08:04:52 +00:00
fair c4b0f47514 fix mdoc references and .Nm usage 1998-04-28 18:17:33 +00:00
lukem d3ecec520c use CPPFLAGS not CFLAGS 1998-04-13 14:10:05 +00:00
christos 1820947a9f Simplify so that this works. 1998-03-29 09:22:06 +00:00
thorpej 7eed6ad8d8 Bring in bsd.own.mk to get the definition of BSDSRCDIR before checking
to see if it's defined.
1998-03-19 00:08:25 +00:00
cgd f45dd19e06 note that only static compilation makes sense here 1998-03-02 19:50:53 +00:00
phil 8668166c18 Make sure fdisk gets told the proper BIOS geometry on every
execution of fdisk.  Otherwise we loose big time.  Should close
PR 5052.
1998-02-27 21:30:09 +00:00
phil 84c669fc44 Make the CDROM default path be .../NetBSD-<rel>/<machine>/binary/sets
as specified in release(7) for the ftp site.  This is because I'm
assuming that the CDROM would just be a copy of the ftp site minus
duplication.
1998-02-25 05:26:37 +00:00
jonathan 1483395dbe Move DOS BIOS-geometry and MBR-handling code to MI code for powerpc, arc:
* Split bios geometry and MBR partition editing code formerly in
    arch/i386/{md,fdisk}.c to mbr.c in mi  directory.
  * Leave /sbin/fdisk parsing/handling code in separate file,
    we may want to change it later. move to mi directory.
  * Create mbr.h with declarations for MBR/BIOS-geomotry code.
    #include "mbr.h" in  i386 md.h.
  * Use symbolic names for 386bsd and new NetBSD partition IDs.

Handle MBRs with both 386bsd and NetBSD partitions less stupidly.
1998-02-24 05:36:03 +00:00
jonathan 1cfa173f7c Add symbolic names for new NetBSD MBR partition ID and for Linux. 1998-02-24 04:32:22 +00:00
jonathan 0ed9642fe0 Add menu entries to md_distcustom for installing X11 sets
in menus.md.{eng,fr}, lifted verbatim from Alpha and pmax.
Give last split-floppy for each X11 set, for 1.3.

FIXME: if the number of floppies in any split set changes for 1.3.1,
syinst is hosed for 1.3.1. Same is true for any release: we can't
install from split sets if the count of floppies doesn't match
the precompiled version.

The number of floppies in a split set should be computed dynamically
from a directory listing, or read from a config file in the split
directory.
1998-02-23 22:55:09 +00:00
phil eaeadf7187 Take 3! Added prototypes instead of including defs.h. Compiles now
cleanly both with sysinst and standalone away from sysinst.
1998-02-20 07:43:52 +00:00
jonathan 98b0f2b8ad * Prune default CD path from "/Release/NetBSD/NetBSD-" back to "/NetBSD-".
* Add cp_to_target() to  copy a file from current root, to an absolute
  path relative to target root.

* Clean up alpha, arm32, i386, pmax MD code: use cp_to_target()
  NB: Alpha uses target_expand() when calling installboot.
* Add tests for target == current root. Intended to support
  `upgrade/reinstall' to current root, either for testing or easier
  minor-release upgrades. Only tested on pmax.
1998-02-20 02:33:51 +00:00
jonathan 2ce5d64f35 Pull up fixes for coment typos, punctuation, and (partial,inconsistent) KNF
from sysinst/arch/alpha/md.c.
1998-02-20 01:53:59 +00:00
jonathan 317aef44f1 Undo the include cleanups of previous revision. Fixes missing
prototypes when compiling into sysinst, rather than standalone testing.
1998-02-20 01:40:53 +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
phil a7a3b90218 Clean up the includes, make it work as an independent program better,
add a loop in the main to factor all command line parameters.
1998-02-19 19:38:39 +00:00
phil a924a02bc1 Make the primes generation go to the true square root of parameter
max.  (Pointed out by jb@dilbert.apo.nmsu.edu (Jon Brinkmann) on
usenet.)
1998-02-19 18:37:58 +00:00
thorpej 69c0c710e5 Fix some printfs and prototypes. 1998-02-09 07:40:15 +00:00
thorpej fee167dd96 Needs <time.h> 1998-02-09 07:34:16 +00:00
phil c39e6b7b4f Moved selection of distribution sets to before selection of distribution
medium.
1998-02-09 07:03:38 +00:00
phil 4b083bc3ac Ask for custom/full and select distribution files before selecting
distribution medium.  Makes ftp fetch only needed files.
1998-02-09 06:55:27 +00:00
jonathan b59abe7c80 Set hostname (via sethostname()) after configuring network.
Save hostname in /etc/myname when saving networkg config.
From Nathan J. Williams <nathanw@mit.edu> in PR bin/4781.
1998-02-07 10:28:02 +00:00
jonathan 005abca7c5 Fix typo in table of files to check for in target. Found by Phil Nelson. 1998-02-07 09:32:32 +00:00
christos e3fbe7d27f Warnsify, remove register declarations and -lcompat 1998-02-04 11:08:37 +00:00
thorpej bf64e85e53 XXX No xserver set for now. 1998-02-01 02:11:01 +00:00
thorpej 6aed8140af Oops, fix a few stray "arm32"s.. (Guess where I copied these files from? :-) 1998-01-31 22:30:09 +00:00
thorpej ff2548ba56 First-cut at Alpha support in sysinst. 1998-01-31 22:28:33 +00:00
perry 4a5428be69 RCS Id Police. 1998-01-09 18:56:42 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
fvdl 9630119c6d * mount NFS directory to get the sets from read-only,
same for floppies (from Christoph Badura)
* allow user to run 'Configure network' multiple times, to correct errors
  for example.
* deal with network interfaces that need explicit media type selection
  (i.e. ask for it when it is needed, also store it in the generated
  /etc/ifconfig.blah file on the destination disk)
1997-12-26 01:58:44 +00:00
fvdl 0eecf02c79 Fix naming of split sets to be loaded from floppy. From Christoph Badura. 1997-12-25 17:54:41 +00:00
matthias 675f5874b0 - call bim to install the boot program on the disk
- define DISKLABEL_CMD to make sysinst label the disk
1997-12-25 09:10:48 +00:00
cjs a85a1c039c Initialise the array primes at run-time rather than compile time
so it's put in bss rather than data. Saves 38K or so. :-) (Well,
only 125 bytes or so after commpression.)
1997-12-20 23:47:02 +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
fvdl 1188ad336b Copy a temporary termcap file onto the harddisk for sysinst's convenience.
Enables sysinst to be run from the harddisk itself as well (PCMCIA workaround).
1997-12-19 00:57:18 +00:00
fvdl 65295d9fb4 Fix typo that made label overlap check unreliable. 1997-12-18 11:54:11 +00:00
phil 9ebbc533c7 Make sure last extension of split files matches BETA release.
(misc .ai -> .aj)
1997-12-16 01:13:58 +00:00
bouyer 4f685d31cb Sync with .eng. 1997-12-15 13:19:47 +00:00
fvdl 71e91aafda Add option to check for BIOS < 1024 root partition size limit, and
enable the user to re-edit things in case it fails.
1997-12-15 00:43:57 +00:00
gwr 6536ca4e3e On the m68k, compile ramdisk stuff with -msoft-float
so we can be sure there are no float instructions.
Nothing in here uses floating point, and this saves
space by avoiding the FPU_EMULATOR in the kernel.
1997-12-12 23:26:29 +00:00
jonathan 3c0420c31a Commit change from Dec 6 discussion on current_users:
use example rc.conf lines for setting rc_configured.
1997-12-12 22:26:32 +00:00
gwr ef111cbc49 Add: more x_ftp x_route zcat 1997-12-12 03:38:30 +00:00
gwr 727536cab0 Add getnet.c 1997-12-12 03:36:38 +00:00
gwr 637548c0c9 Add NOMAN=1 1997-12-12 03:34:39 +00:00
gwr 717a6b07a9 Keep getnetbyname from pulling in the resolver. 1997-12-12 03:05:59 +00:00
fvdl 5325d6d716 Mark partition as 'set' when changing the type. 1997-12-11 02:02:22 +00:00
fvdl 385f01a1ad Mark partitions as 'set' when changing the type, otherwise the change
will get lost if you only change the type.
1997-12-11 01:36:22 +00:00
bouyer 36ddb1973c Fix some line overflow. 1997-12-10 10:38:15 +00:00
phil ead95231ed pc532 partitions and md stuff. 1997-12-10 04:36:19 +00:00
jonathan 00a23f52d7 Delete implemented TODO items from the for-1.3 list.
Note special-purpose delay after run_prog() for untarring sets.
1997-12-07 03:03:19 +00:00
bouyer 5423c09ec6 Sync with .eng versions + correct some spellings/wording. 1997-12-05 17:37:41 +00:00
phil 00b12cbbd6 Ping the right host. (From Matthias Pfaller.) 1997-12-05 17:19:48 +00:00
simonb b0b1d20a3c Change the tar command that copies the diskimage files to the target
disk to use reletive pathnames to stop the "removing /" warnings.
Fixes pr#4579.
1997-12-05 14:55:09 +00:00
simonb c483af0a08 Fix typo in partition overlap checking - the inner loop check for
boringpart used the outer loop variable.
1997-12-05 14:46:01 +00:00
jonathan 3722de06d9 Put shell quotes around FTP URLs in case of shell metachars in passwords.
From PR #4580.
1997-12-05 14:26:27 +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
simonb 424f55f4b5 Add a cleanup function (set with atexit()) that shuts down curses nicely
and unmounts any filesystems left mounted when sysinst exits under any
circumstances.
1997-12-05 13:38:59 +00:00
bouyer 33e8f8cecb Sync with msg.mi.eng + better translation in one place. 1997-12-04 16:57:56 +00:00
jonathan ead082ab43 tar.gz -> .tgz as per release(7).
Clarify English text of localfssource: it's for an un-mounted
local filesystem, not an already-mounted pathname.
1997-12-04 13:24:30 +00:00
jonathan 7bd6655894 Add check for overlapping partitions:
* 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.
1997-12-04 11:27:56 +00:00
jonathan fc3fa7cd7f Implement TODO item to unwind target mounts on completion:
* Add mount_with_unwind() that adds mountpoint to a LIFO queue
    of  mountpoints to undo on error.   Use in target_mount().
  * Add unwind_mounts() which traverses the LIFO queue and unmounts
    filesystems, silently ignoring errors.
  * create toplevel() function which displays banner message and
    calls unwind_mounts().
  * change toplevel menu to call toplevel() instead of inline banner.

Where to do unwinds needs more thought.  Perhaps we should only unwind
if an upgrade or install appears unsuccessful, so after a successful
install, the target is mounted (e.g., for upgrading /etc/rc.conf).
1997-12-04 09:05:35 +00:00
jonathan 6266fb93be Quote disktab(5) entry name so that label names with spaces
(e.g., "bsd disk") work CVS:
1997-12-02 11:00:59 +00:00
jonathan 4b1dd00797 Fix target_already_root() check: is_active_rootpart() takes a
string like "sd0a", and compares it against mounted_rootpart(),
which returns a string like "/dev/sd0a". For now, prepend "/dev".
1997-12-02 03:02:29 +00:00
fvdl 0cd2d70c37 * Check for an existing MBR not by looking at the geometry, but by looking
at used partitions. fdisk may report the number of cylinders > 1024
  correctly if no translation is used.
* Print out the end of the partition as well as the size when editing things.
* Enable the user to specify the BIOS geometry if he/she wishes.
* Fix 1023 / 1024 mixup. The reason BIOSs will return 1023 is an old IBM
  convention to use the last cylinder as diagnostic cylinder. The user
  can still skip the last ('real') cylinder if specified.
* Make some messages more verbose.
1997-11-29 21:49:13 +00:00
bouyer ffd59152fd French version of the sysinst messages, contributed by Stephane Engel
<steph@Inox.darh.ensta.fr>. Just put LANG=fr in Makefile.inc to
use them.
1997-11-27 10:10:54 +00:00
bouyer f5fee9d6a1 French version of the sysinst messages, contributed by Stephane Engel
<steph@Inox.darh.ensta.fr>. Just put LANG=fr in Makefile.inc to
use them.
1997-11-27 10:10:05 +00:00
phil 1e785c32c4 Reworked partitioning issues for i386, closes PRs 4520, 4534, 4536.
Other tweeks to make install better.
1997-11-25 20:34:59 +00:00
thorpej 75dd009b1d Update for the lay-of-the-land as described in release(7). As such, move
all pathname-on-server related definitions to MI code, since they are now
defined to be consistent across all platforms.  Also, nuke the "rels" global,
since release numbers are now always specified in "long form", i.e. 1.3A
vs. 13A.
1997-11-25 06:53:07 +00:00
thorpej 01278747a2 Prompt for keypress after FTP failure, so we know what went wrong.
From Havard.Eidnes@runit.sintef.no, PR #4521.
1997-11-25 00:24:52 +00:00
simonb 33960f8371 Load defaults for hostname, IP address and netmask if these are already
configured.
1997-11-22 14:16:55 +00:00
simonb 6cf76648f3 Don't try to ping a nameserver or default router if not is specified. Also
don't build an /etc/resolv.conf if a nameserver is not specified.
Fixes PRs #4548 and #4539.
1997-11-22 13:52:45 +00:00
simonb e2b222f32d If not network interfaces are found, just return without cycling forever
with no valid choices.
Fixes PR#4542 from Stephane Engel.
1997-11-22 00:29:33 +00:00
simonb b80b4d1cd0 Catch SIGINT and do a endwin() to leave tty in a sane state. 1997-11-21 12:08:06 +00:00
simonb cd110ecf63 Use a default of 32MB for the root filesystem with a custom partition
layout.
1997-11-19 14:06:47 +00:00
simonb 2ddb44e7f3 Backout previous chance with distrib set location. The should be done
in a MI manner when we work exactly what that is...
1997-11-17 21:27:47 +00:00
cjs 6a623f7271 Add <strings.h> where necessary, and remove support for tags. 1997-11-17 03:07:52 +00:00
cjs f74fa34ebe Don't need real regexps on search. 1997-11-17 03:00:16 +00:00
cjs 963d5659fb Import of berkeley more(1) for use on install disks, because it's
considerably smaller than less(1), our replacement for it.
1997-11-17 02:37:15 +00:00
cjs 85527948f6 Add -DSMALL versions of ftp and sh for install disks. 1997-11-17 01:35:57 +00:00
simonb cd1152e9eb Change the tar command that copies the diskimage files to the target
disk to use reletive pathnames to stop the "removing /" warnings.
1997-11-16 12:53:07 +00:00
simonb 06f521afad Distribution sets are in ..../binary, not ..../binary/Tarfiles 1997-11-16 12:50:05 +00:00
simonb c8f66d4491 Use bootp or dhcp to get some network services? (hostname, domain
name, name servers...)
1997-11-15 11:09:45 +00:00
simonb b2ba0b82ff Fix typo in a comment. 1997-11-14 23:47:49 +00:00
simonb 5a662afa53 A few more ideas. Clean SIGINT handling, loading from mounted
filesystems and from maximum entropy - better error message handling
1997-11-14 09:32:24 +00:00
phil a4f785ec69 Fix va_start call, PR 4477. 1997-11-13 17:26:25 +00:00
simonb 0c8e3514d7 Reposition some menus (the "change a partition" and "change distribution
sets" menus) so that the bottom of the menu doesn't go below the 24th
line of the screen.
1997-11-13 04:23:39 +00:00
jonathan 35fa360c0b * Create /mnt2 before unpacking sets, in case it's not on install media.
* 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.
1997-11-13 03:06:44 +00:00
jonathan bf4782e7cf Rephrase intro text to mention sysinst by name, mention upgrades, and
to fit in 80 colums even during _ALPHA.
1997-11-13 02:44:34 +00:00
phil 4ec8d82726 Clear up confusion of extract_dist() extract directory source. New var
ext_dir that is absolute directory name of where files are located to
extract.  All setup routines must set that directory name correctly.
Make target.c compile if DEBUG is set.
1997-11-11 00:43:31 +00:00
jonathan 9f8db6cd26 Add ideas from Simon Burge.
Mark things currently in progress, but which won't make it for today's
review, as `to do for release'.
1997-11-10 17:11:19 +00:00
jonathan 61531e7b2d fix typo ("/netsbd"). Use target call to copy /tmp/.hdprofile to target root. 1997-11-10 08:16:21 +00:00
jonathan f3e413c744 Only duplicate /install.usr into the target /usr if we /install.usr exists. 1997-11-10 06:08:55 +00:00
jonathan 8f4cc24742 Change dist_list[] order in all md.h files to unpack `base' before `etc'. 1997-11-10 03:57:00 +00:00
jonathan 35c15567d3 Better, more correct pipeline for usr/bin files, from Simon Burge. 1997-11-10 01:52:46 +00:00
jonathan b1def2c4bb Workaround for MI code running "/usr/bin/tar".
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.)
1997-11-10 01:07:12 +00:00
phil 0e4140c713 - lower swap size for smaller systems
- fix bug in custom partition sizes that made huge swap partition defaults
1997-11-09 16:07:56 +00:00
phil 5337c61bc4 -TODO: Remove names as they were source name rather than names of who should
do it.
-change install confirmation message to outline install process
-move english print text into msg.mi.eng.
1997-11-09 15:54:15 +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 3b987e7971 * Add local definition of DISKLABEL_CMD to arch/i386/md.h.
* Remove default definition from disk.c.  Ports that don't support
  dislabels (e.g., amiga) can now just not define DISKLABEL_CMD.
1997-11-09 04:14:10 +00:00
mark b7fff31651 Initial commit of arm32 MD support for sysinst. 1997-11-08 02:17:16 +00:00
jonathan 5aa3e4ef06 reflect recent changes. Add more random ideas for features. 1997-11-07 14:12:27 +00:00
jonathan cb086002a9 Add annoyingly verbose comments to pmax md.c and md.h, to serve as
documentation for porting to more hosts.

Define DISKLABEL_CMD in MD code.
CAVS: ----------------------------------------------------------------------
1997-11-07 08:43:46 +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
phil 483e07a88c - add TODO file for developer communication
- add user notification/response for errors during tar extraction
- twiddle ask_ynquestion()
1997-11-05 23:32:44 +00:00
mhitch f36de6c906 Use getrawpartition() rather than a constant when creating the new fstab. 1997-11-05 22:49:06 +00:00
mhitch 174cd0f5ef Add an option to install or upgrade from a local disk filesystem. Upgrade
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.
1997-11-05 22:45:53 +00:00
phil 599cb5da3d Make extract_dist use the getit information. (Correct fix) 1997-11-05 07:48:52 +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
phil 443efc08d3 Complete -r flag addition, info was static, now path names are runtime
constructed so -r flag makes a diffference in the distribution directory.
1997-11-05 01:23:06 +00:00
phil 9e973cbe0a - extract_dist now uses dist_list to know which to extract
- 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.
1997-11-04 01:39:03 +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 a5f389631d Make install() use msgc, not inline text, for the `disks done' text.
Expand that text, making clearer what sysinst is done, what kind of
errors to double-check for before proceeding, and what we're about to do next.
1997-11-03 06:18:08 +00:00
jonathan 3e74d705e2 * Clean up target.c to use a single consistent path-prefixing subroutine.
* 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*.
1997-11-03 02:38:41 +00:00
jonathan 2d4f71002f * Use getmaxpartitions() instead of explicit constant 8.
* 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.
1997-11-03 00:04:53 +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
phil 78a713a664 Add missing space in file name list. 1997-11-02 22:19:39 +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
jonathan 1b07f33492 copyright boilerplate (oops) 1997-11-02 08:30:39 +00:00
jonathan 2d01e4dc90 * Change sysinst MI code to use new install-target-filesystem access functions.
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.
1997-11-02 08:20:40 +00:00
jonathan cd7def2863 Use run_prog_or_continue to write bootblocks. pmaxes upgrade/install
from diskimage or NFS, so It's not absolutely fatal for the bootblock
update to fail.
1997-11-02 08:16:39 +00:00
jonathan a1d0279446 Add missing "xfont" set. Back in consistency with the message file.
(Why don't the curses menu for state and option match up horizontally?)
1997-11-02 08:15:02 +00:00
jonathan d9dbb24102 Add target path-prefixing code. Hide whethers the installation target
disk is at /mnt or / from the rest of sysinst.
1997-11-02 08:12:06 +00:00
jonathan 8315a3dff0 Add two variants of run_prog() for errors that aren't otherwise handled:
run_prog_or_die() -- aborts  if  system() returns an error.
   run_prog_or_continue() -- prints a  warning that installation may
	have failed but lets the user continue.  Suitable for running mkdir.
1997-11-02 03:45:27 +00:00
jonathan 57c4aa7f69 On pmax, write bootblocks to raw C partition, not A partition.
pmax still writes bootblocks with disklabel -B, not installboot.
1997-11-02 02:21:04 +00:00
jonathan 8f766ae320 Use max of (secperunit, (ntracks*secpertrack*ncyl)) when computing
RAW_PART for new labels, instead of just the latter.
Avoids shrinking RAW_PART label with pmax kernel-supplied default
labels or with already-labelled disks.

XXX Get real incore label, instead of default label instead (or as well)?
1997-11-01 23:44:23 +00:00
jonathan e1ba034070 Add xfont, xcontrib sets to compiled-in list. 1997-11-01 23:39:57 +00:00
phil 2cb88494a3 Tweeks to editing file system partitions, fix for PR4405, adding a method
to reselect the allocation multiplier while editing a disklabel.
1997-10-31 23:00:32 +00:00