Commit Graph

123 Commits

Author SHA1 Message Date
David E. O'Brien
36d4953214 Make logic more readable. 2004-11-19 03:52:41 +00:00
Bruce Evans
03f0d9e8ae Fixed assorted misuses of NULL in integer context. 2004-03-11 11:58:16 +00:00
John Baldwin
e5d1715e5e Do an update mount operation to mount the mfsroot as read/write rather
than read/only when sysinstall is running as init.  This fixes several
install issues.
2003-12-20 16:34:45 +00:00
David E. O'Brien
eec2e4bdde * Negative #if's are harder to read as they don't tell exactly what arch
something applies to.  So change #ifndef to an explicit list of defines.
* Treate sparc64 and ia64 as 64-bit platforms, which means larger roots.
* sparc64 should halt back to the firmware, not reset.
* sparc64 doesn't need to play MS-DOS/BIOS partition crap games.

Reviewed by:	jake
2002-10-11 22:30:09 +00:00
John Hay
96d1ba768f Teach sysinstall that documents on the boot floppy might not be gzipped.
Reviewed by:	ru
2002-08-09 07:44:43 +00:00
Jordan K. Hubbard
7a631f774d MFS: Stop reaping children. It makes evil things happen to the extraction
loop.
2001-11-01 23:32:46 +00:00
John Baldwin
b718f11936 Move the 'type' variable inside the block where it is actually used. 2001-10-23 17:31:11 +00:00
Jordan K. Hubbard
27a550e5ed DTRT in the restart case 2001-10-12 07:36:34 +00:00
Murray Stokely
55e3fefc53 Close all open file descriptors before restarting sysinstall.
PR:		bin/30737
Submitted by:	Alexey V. Neyman <alex.neyman@auriga.ru>
2001-09-30 00:43:32 +00:00
Murray Stokely
3b603fb7d3 Silence warnings. 2001-09-22 22:25:35 +00:00
Murray Stokely
eba8393e91 Add a function to free all of sysinstall's internal variables from the
environment.  This fixes an annoying bug where hitting Ctrl-C and
telling sysinstall to 'restart' will do no such thing since many of
the options are still set and so you won't be prompted for them
again.

MFC after:	1 week
2001-09-22 18:10:56 +00:00
Murray Stokely
417257575f Whitespace change only. Use the same indention level throughout this
file and add a blank line after variable declarations.

Submitted by:	jhb
2001-09-14 08:39:22 +00:00
Murray Stokely
810fd59fbb If we're running as init, install a signal handler for SIGCHLD.
PR:		bin/14729
Submitted by:	jhb
2001-09-06 09:53:53 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
John Baldwin
25edf1a5eb Look for help files in /usr/src/usr.sbin/sysinstall instead of
/usr/src/release/sysinstall.
2001-01-17 19:51:08 +00:00
Jordan K. Hubbard
621005e3cb Adapt sysinstall to use the new msgNoYes() function which assumes
no as a default.  Sysinstall should be both less dangerous and less
annoying as a result of this change, though that's just my opinion
(since they're the defaults which annoy ME the least :).
2000-12-14 02:49:02 +00:00
Jordan K. Hubbard
a911f71629 Changes have been made to support a concept of VAR_FIXIT_TTY being
standard or serial.  This change needs to be done to the entire system that
depends on this.  This way we don't have some code using OnVTY checks
and other doing
        strcmp(variable_get(VAR_FIXIT_TTY), "standard") == 0
checks.  Also we need to set VAR_FIXIT_TTY to "serial" if we come up on
a serial console.

Also fixed a dialog problem in that dialog was used when dialog was
disabled causing some troubles such as not letting the cursor keys
work when exiting the fixit mode on media (ie. not the fixit shell but
for example fixit on a floppy).

Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
PR:		22352
2000-10-30 23:46:12 +00:00
Eivind Eklund
dd92980bbd Teach sysinstall how to restart itself on Ctrl-C (as an addition to its old
tricks of rebooting and continuing where it was.)

Reviewed by:	jkh, jhb
2000-10-29 09:57:50 +00:00
Poul-Henning Kamp
00d25f512c Initiate deorbit burn sequence for <machine/console.h>.
Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.
2000-10-08 21:34:00 +00:00
David E. O'Brien
7090abf525 Allow the Fix-it functionality to detect that we are on a serial console,
and DTRT rather than start the fixit shell on a non-existant vty.

PR:	19837
Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
Approved by:	JKH
2000-07-18 09:14:06 +00:00
John Baldwin
d3d93ffd5f Add #includes for sysctlbyname() to quiet a warning. 2000-03-25 04:23:08 +00:00
Jordan K. Hubbard
ccd140ac08 Make sysinstall use the new debug.boothowto OID. It will now go
straight into debug mode if you boot -v.  Also conditionalize some
annoying debugging output now that we have this ability.

Partially submitted by:	msmith
Approved by:	jkh [to make certain wise-acres happy ;)]
2000-02-25 20:55:15 +00:00
Jordan K. Hubbard
61547e027b In retrospect, msgNotify() should leave its contents on the screen
longer to give the user something to look at while things are happening.
Change it to do so and insert the appropriate screen saves elsewhere.
1999-12-17 02:46:04 +00:00
Jordan K. Hubbard
7025aeb16e Completely rip-out and redesign sysinstall's refresh model as well
as redoing all the menus to have proper, or at least non-hallucinogenic,
keyboard accelerators.

This requires my recent update to libdialog to work properly and will
probably also exhibit some other "interesting" behavior while the last
few missing screen clears are found (which is why I'm not going to MFC
immediately).  At least now, however, sysinstall does not gratuitously
redraw random screens at the drop of a hat and drive serial console
installers out of their minds.
1999-12-14 04:25:29 +00:00
Jordan K. Hubbard
404f4d4100 I shouldn't have incremented PART_OFF; it was wrong and broke label
display to boot.  Also fix some various warning fluff while I'm in
here cleaning up.
1999-12-12 04:58:02 +00:00
Jordan K. Hubbard
29ed216a4d o Catch up with pnp changes - kget no longer saves pnp data.
o Catch up with ncurses updates - some internal function names have changed.
1999-09-04 16:01:15 +00:00
Jordan K. Hubbard
3910e95363 Oh crud, did I ever screw the pooch! Rather than sync this with -stable,
I backed-out the changes in -current and didn't touch stable at all (I
thought I had my patch order reversed, not what actually happened).
AIEEE!  I can't even blame the crack for this one since I broke my
crack pipe a few weeks ago.  I think sleep deprivation gets the blame
for this one.

Medal for noticing this one goes to:	Jim Bloom <bloom@acm.org>
1999-09-02 00:51:16 +00:00
Jordan K. Hubbard
d03dcaa779 MFC: Catch 3.2-stable sysinstall up to 4.0-current level functionality,
bringing in DHCP support.  The only thing I left out were Poul-Henning's
newfs changes since I'm not sure if he's brought the rest of that support
into -stable yet.  If it turns out that this is the case, I'll MFC those
changes too.
1999-09-01 04:29:30 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Bill Fumerola
e3bae09e70 we only need to declare i if we are building for the alpha. 1999-07-29 21:12:54 +00:00
Jordan K. Hubbard
305fbc7e78 More Alpha ifdefage. 1999-07-20 07:39:22 +00:00
Jordan K. Hubbard
ad183257e6 Another batch of fixes for dhcp support in sysinstall, now dragging
in some code from C. Stone to parse the lease information.  This is still
a WIP and this commit is largely intended to allow others to sync up; the
dhclient code still only works when doing dhcp configuration post-install
and requires a bit more work on the boot floppy before it will truly
work in the minimal bootstrapping role.
1999-07-19 10:06:18 +00:00
Jordan K. Hubbard
b3af40fb2b Add in a hack to turn off unaligned access warnings for alpha.
Submitted by:	msmith
1999-07-16 22:07:09 +00:00
Jordan K. Hubbard
065f34b7e2 Unbreak the fixit floppy.
Clean up some of the media handling to use common routines.
1999-02-15 00:49:33 +00:00
Jordan K. Hubbard
046bfca773 Fix incorrect initial state for two variables. 1999-02-14 21:26:29 +00:00
Jordan K. Hubbard
58dd43480c Write changes out to /etc/rc.conf again; rc.conf.site is dead! 1999-02-09 22:18:10 +00:00
Jordan K. Hubbard
63cad5499d Totally change the way variables are accounted for in sysinstall.
Now we know which variables are internal and which need to be
backed to /etc/rc.conf.site.  rc.conf is not touched now.

Also kget kernel change information back properly and set up a loader.rc
file to use it.
1999-02-05 22:15:52 +00:00
Jordan K. Hubbard
bed7bf35a2 close doc race. 1999-01-08 09:13:00 +00:00
Jordan K. Hubbard
af61828f44 Adapt sysinstall more fully to the alpha (deal with proper boot signatures,
don't present label editor, etc).

Submitted by:	dfr
1999-01-08 00:14:22 +00:00
Jordan K. Hubbard
aa9f92fbdb Deal with both foo.hlp and FOO.TXT files. 1998-11-03 03:38:56 +00:00
Jordan K. Hubbard
ef7b28dd0a Simplify gunzip usage even more (doh!). 1998-09-30 13:36:53 +00:00
Jordan K. Hubbard
35e9eb2f68 Call gunzip correctly. 1998-09-30 11:44:29 +00:00
Jordan K. Hubbard
b6aad04900 Make serial console based installs actually work by:
1. Detecting the split /dev/ttyv0 / /dev/console case, e.g. you've
   booted with the -h flag and you have a VGA card also.

2. Adding an extra "menu" for selecting terminal type and adding ANSI
   to the list of compiled-in terms.

3. Opening the proper file descriptors before disowning ourselves.
Requested by:	pst
1997-07-31 11:08:47 +00:00
Jordan K. Hubbard
e81ebf9281 Always write out rc.conf, regardless of status.
PR:		3698
1997-05-27 18:56:03 +00:00
Jordan K. Hubbard
3de5b08eda Adapt to rc.conf file format. 1997-04-28 10:31:14 +00:00
Jordan K. Hubbard
593230d218 Back out mount change here (which is the only branch it should have
occupied in the first place :)
1997-04-28 09:35:59 +00:00
Jordan K. Hubbard
7499a04abf YAMF22 1997-04-28 06:15:49 +00:00
Peter Wemm
b97fa2ef50 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
Jordan K. Hubbard
152ae47983 Save /etc/sysconfig data at the very very end, so that it can be
used post-install time as a configuration tool as well.

Update comments about a kernel recompile being necessary for PS/2 mice.
1997-02-10 19:44:08 +00:00
Jordan K. Hubbard
5214787fd5 OK, I've got two ideas to file in the "really seemed like a good idea
at the time, but on further reflection..." bucket with these changes.

1. Checking the media before frobbing the disks was a fine idea, and
   I wish it could have worked, but that leads to a rather difficult
   situation when you need to mount the media someplace and you're about
   to:

	a) Chroot away from your present root.
	b) Newfs the root to be.

   You're basically screwed since there's no place to stick the mount
   point where it will be found following the newfs/chroot (and eliminating
   the chroot in favor of just using the "root bias" feature would work
   great for the distributions but not the pkg_add calls done by the
   package installer).

2. Automatic timeout handling.  I don't know why, but alarm() frequently
   returns no residual even when the alarm didn't go off, which defies
   the man page but hey, since when was that so unusual?  Take out timeouts
   but retain the code which temporarily replaces the SIGINT handler in
   favor of a more media-specific handler.  This way, at least, if it's hanging
   you can at least whap it.  I think the timeout code would have been losing
   over *really slow* links anyway, so it's probably best that it go.

This should fix NFS, tape & CDROM installs again (serves me right for getting
complacent and using just the FTP installs in my testing).
1997-01-24 19:24:51 +00:00