Commit Graph

35 Commits

Author SHA1 Message Date
jdolecek b29d271447 change launch_subwin() to pass failure reason back to caller, add check
pipe(2) call was successful
make launch_subwin(), va_prog_cmdstr() static
2001-09-13 18:07:26 +00:00
mrg d436dd6641 extend sysinst disk handling, some general clean ups, better /etc support
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.
2001-01-14 02:38:13 +00:00
mrg 8da46e6897 de-__P()-ify 2000-12-22 10:12:12 +00:00
fvdl 30b8888d4a * Change the interface of run_prog: use a flags argument instead of
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.
2000-10-11 23:47:55 +00:00
hubertf caa284ac57 * Add timezone-setting menu to sysinst, offering all timezones from
(/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
2000-08-15 01:08:00 +00:00
thorpej d972fb140a Don't access curses internals, use getmaxy() instead. 2000-04-14 21:46:11 +00:00
he 5b26c39aa4 Remove local declaration of errno, rely on <errno.h> instead. 2000-01-24 10:40:56 +00:00
mycroft 4fe7833802 Fix display problems:
* 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.
2000-01-19 09:44:01 +00:00
mycroft 03d845d8cf Fix display glitch when suspending and resuming. 2000-01-19 08:46:26 +00:00
mycroft c82f5a6009 In command execution displays, only draw a single line between the status
display and the output window, not a whole box.  This looks better, and it
works much better on terminals.
2000-01-13 18:52:21 +00:00
jeremy c85fda06d1 Added error checking to log and script file creation functions.
Prevents sysinst from coredumping should the root filesystem be accidentally
mounted read-only.
2000-01-07 02:02:05 +00:00
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