Commit Graph

24 Commits

Author SHA1 Message Date
abs b148673ade If the first wait4() in launch_subwin() caught the child exiting, the loop
would never exit. This resulted in somewhat suboptimal infinite install times.
1999-07-14 16:30:58 +00:00
cgd c624190287 convert run_prog's error message from being a "const char *" to a msg.
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.
1999-07-04 21:39:33 +00:00
cgd 1904092f06 message const poisoning, and conversion from integers to an opaque
message type.
1999-07-04 21:32:48 +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
cgd 9c8517c573 handle CRs properly when running cmds w/output to subwin 1999-06-21 02:31:17 +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 a640bc7014 copyright notice typo fixups, as noticed in PR#7248. This software
was developed, not develooped.
1999-06-20 06:08:13 +00:00
garbled 128b6749ab Check the return code of subwin and newwin for NULL. 1999-06-20 04:17:57 +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
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
ross ac722a849a Bug fix: deal with race-like (select(2) vs wait4(2)) error flow bogon. 1999-03-22 09:02:47 +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
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 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
perry e31adf91d8 bzero->memset 1998-08-10 02:23:45 +00:00
mrg d1b0d1b602 KNF. 1998-06-20 13:05:48 +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 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
phil 35e522db38 Sync to current state. (detect ftp error, clean up directories ...) 1997-09-27 00:09:22 +00:00
phil af1d23bed3 Import of sysinst. Not quite ready, but other ports want access for
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.
1997-09-26 23:02:53 +00:00