Commit Graph

143 Commits

Author SHA1 Message Date
Randi Harper
49bc38beb2 Make sysinstall WARNS=2 clean.
Approved by:	cperciva (mentor)
MFC after:	1 month
2010-06-11 20:56:40 +00:00
Randi Harper
2333387e05 Fix uninitialized variables that cause a crash when the network is
initialized and sysinstall is not running as init.

Submitted by: Nick Mills
Approved by: cperciva (mentor)
MFC after: 3 days
2010-06-10 20:13:10 +00:00
Randi Harper
97293c5833 Fix bug introduced in r198317: Don't leak a file descriptor after scanning for network devices.
Approved by:	cperciva (mentor)
MFC after:	1 week (original commit + bugfix)
2010-04-21 12:02:45 +00:00
Rink Springer
c8c45602aa Introduce 'netDev=ANY' support for scripted (install.cfg) installs, which results in the first ethernet interface with physical link being selected.
While here, fix a minor typo causing an 'if' to be missed.

Submitted by:	randi
2009-10-21 11:10:34 +00:00
Colin Percival
6262c79b70 Allow a comma-separated list of network interfaces to be specified via the
netDev option in install.cfg.

Submitted by:	randi
MFC after:	1 week
2009-05-15 00:18:31 +00:00
Warner Losh
53f86ba8f8 Remove vestiges of OLDCARD PC Card support. We haven't needed/used
this since 5.x.
2009-02-15 03:10:20 +00:00
Xin LI
cbfaeb5fe3 Tighten IP address check, prevent '..' from being passed
from the check.

Submitted by:	Ren Zhen <bg1tpt gmail com>
MFC after:	2 weeks
2007-05-17 06:08:42 +00:00
John Baldwin
9d4514b0fd Fix numerous warnings. Aside from menu items in system.c and menu.c
this now compiles on i386 with WARNS?= 3.  Most of the fixes included
adding missing 'static' keywords to internal functions, using fully-defined
terminators in statically defined arrays of structs, and various
signed vs unsigned mismatches.  Also G/C'd unused configSecurity()
function.
2006-02-28 21:49:33 +00:00
Ceri Davies
79c034867a s/lp/plip/ for PLIP interfaces.
Approved by:	jhb
MFC after:	1 week
2006-02-13 20:49:32 +00:00
Xin LI
11d5abebd2 Attempt to fix DHCP address acquisition which was broken by rev. 1.133.
MFC After:	3 days
2006-02-06 06:49:57 +00:00
Ceri Davies
d5d399e113 Preserve any additional arguments to ifconfig that were specified in the
DHCP case too.

PR:		bin/74406
Approved by:	jhb (proxy mentor)
MFC after:	3 days
2006-01-15 23:00:07 +00:00
Scott Long
2beec8e0a5 Adapt sysinstall to the new dhclient. This includes explicitely telling
it about the lease file location and not invoking it with the (non-existant)
'-r' option.  Releasing leases works vastly different now, so this isn't
needed.

Submitted by: sam
Approved by: re
2005-07-11 03:57:04 +00:00
Bruce Evans
b3eb982698 Unremoved a used variable in the PCCARD_ARCH case.
Reported by:	tinderbox
2004-03-12 15:28:13 +00:00
John Baldwin
c686ba3b94 Remove unused variables. 2004-03-11 18:50:05 +00:00
Bruce Evans
03f0d9e8ae Fixed assorted misuses of NULL in integer context. 2004-03-11 11:58:16 +00:00
Eivind Eklund
9220eb85cb Make a message less scary (based on user feedback) 2004-01-26 13:45:21 +00:00
Maxim Sobolev
9434c1a30b Add a new variable `noInet6', which if set disables IPv6 configuration
dialog for network interfaces.

MFC after:	20 days
2003-02-27 21:04:34 +00:00
Martin Blapp
f288477e4e Explicitly release a existing lease before we start dhclient (again).
If we already have a lease and restart sysinstall (or something with
the net configuration goes wrong), we would have to reboot just
because there is a dhclient hanging around.

Reviewed by:	murray (re)
MFC after:	5 days
2003-02-09 22:04:50 +00:00
Jun Kuriyama
b46e66a5a5 debugMsg() should end with "\n". 2002-11-01 02:05:05 +00:00
John Baldwin
dc1024256c If 'netInteractive' is set to true in an installation script, then
temporarily turn off the nonInteractive variable around the DHCP and IPv6
Yes/No questions in a network device setup so that those questions are
asked.
2002-05-31 13:39:55 +00:00
Murray Stokely
adca9ffd3d Only build and link the pccard module on architectures that support it (and
that have room for pccardd on mfsroot.flp).
2002-03-29 23:03:17 +00:00
Murray Stokely
f7be3a706e Provide a more specific help line for PLIP installs, reminding the
user that they must provide the peer's IP address in the 'extra
options to ifconfig' box.

PR:	misc/21273
2001-12-10 10:34:47 +00:00
Murray Stokely
3b603fb7d3 Silence warnings. 2001-09-22 22:25:35 +00:00
Jordan K. Hubbard
6a903a9b76 Rework the RTSOL logic from previous patch (it was wrong)
PR:		26187 && 24136
Submitted by:	Glenn Trewitt <trewitt@trewitt.org>
2001-09-15 02:28:18 +00:00
Murray Stokely
ca61f68601 Allow network device name to be given on the command line in the
interactive case.  This already works for non-interactive installs,
but at least one user thinks it would be useful and it certainly seems
more correct to allow it here as well.

So, this will now work :

# sysinstall netDev=fxp0 tcpMenuSelect

PR:		bin/30229
Submitted by:	Mikhail Teterin <mi@aldan.algebra.com>
2001-09-05 08:10:04 +00:00
Jordan K. Hubbard
7a7a162ba6 Whoops, forgot a hunk on the previous patch. Fix RTSOL variable handling
AND DHCP handling.
2001-08-31 20:03:05 +00:00
Jordan K. Hubbard
a46ce3a04b PR: 26187
Submitted by:   Glenn Trewitt <glenn@trewitt.org>
2001-08-31 19:56:59 +00:00
Jesper Skriver
dc3c85941a Fix IP address checking, now we allow addresses like 172.17.0.0/23 as
a host address

PR:		misc/27799
Reviewed by:	jkh
Approved by:	jkh
MFC after:	1 month
2001-07-12 00:01:45 +00:00
Kris Kennaway
a015c9348c Mark relevant functions __printflike()/__printf0like() and silence some of
the non-constant format string warnings.

MFC after:	1 week
2001-07-05 09:51:09 +00:00
Dima Dorfman
13704ca508 Introduce DEVICE_INIT, DEVICE_GET, and DEVICE_SHUTDOWN macros. As the
names suggest, they perform methods on Device's.  In addition, they
check that the pointer passed to them is valid; if it isn't, they
pretend that the action failed.  This fixes some crashes due to NULL
dereferences (e.g., PR 26509).

Approved by:	jkh (some time ago)
2001-07-02 00:18:04 +00:00
Peter Wemm
8ca420e7fa Ack! I finally got annoyed enough to actually kill this. There is no
need to manually force the network_interfaces variable in /etc/rc.conf,
and it only ever gets in the way.  rc.network and rc.network6 DTRT with
the default of 'auto'.  This should have died over a year ago.
2001-03-02 08:15:41 +00:00
Eivind Eklund
44084c9348 Add better IP, netmask and gateway checks.
- IP addresses are verified as being correct dotted quad format.
- Netmasks are verified as being in correct dotted quad or 0x* format,
  and being consecutive 1 bits followed by consecutive 0 bits.
- The gateway is verified as being correct dotted quad format and
  being reachable through the configured IP address and netmask.
2000-12-14 13:59:10 +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
Hajimu UMEMOTO
06617fbb29 Wait DAD complete after ifconfig up. 2000-12-04 18:06:49 +00:00
Hajimu UMEMOTO
f3581390d2 Popup IPv6 dialog, again. 2000-10-21 14:06:24 +00:00
Jordan K. Hubbard
b7bbaa3ca9 Correct variable check for VAR_TRY_DHCP. 2000-09-15 08:15:14 +00:00
Murray Stokely
9cd58f8533 This allows you to script sysinstall to say "NO" to DHCP and IPv6.
Previously, you could only script these features if you said YES.

Oops.  Accidentally commited to releng_4 first.

PR:		20334
Approved by:	jkh
2000-08-28 18:18:47 +00:00
Jordan K. Hubbard
3db81c0d49 Restore the screen after possibly spamming it.
Reported by:	Brian J. McGovern <mcgovern@spoon.beta.com>
2000-07-25 07:38:22 +00:00
Hajimu UMEMOTO
2931df8a40 IPv6 support.
IPv6 configuration is only done by rtsol.  Does someone really
need manual configuration? :-)
You can specify IPv6 DNS server as well.
We have only one server ftp7.jp.freebsd.org that speaks IPv6
in this time.  ftp7.jp speaks IPv4 as well and also listed as
Japan #7.

Approved by:	jkh
2000-07-14 08:33:10 +00:00
Murray Stokely
f092a22bbd Fixed minor annoyance with sysinstall being redundant / braindead in
the network -> interfaces menu.

Approved by:	jkh
2000-04-06 01:23:21 +00:00
Jordan K. Hubbard
f53cb8a8cc Now I remember why I didn't write out the gateway in the DHCP case;
it was a feature.
2000-02-20 21:58:10 +00:00
Jordan K. Hubbard
846a006bb2 OK, I admit defeat - allow the user to override hostname and gateway
values set by dhcp.
2000-01-28 02:15:07 +00:00
Tatsumi Hosokawa
16425993ca Set pccard_ifconfig in /etc/rc.conf automatically. 2000-01-14 19:05:55 +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
29527eb44c Defensive coding to prevent a potential segfault.
PR:		14706
Submitted by:	ru
1999-11-08 16:19:25 +00:00
Jordan K. Hubbard
0ec4416c55 Really fix the auto keyword botch correctly by just letting it
do its job and not override it when set.

Submitted by:		Ruslan Ermilov <ru@FreeBSD.org>
1999-10-05 10:10:42 +00:00
Jordan K. Hubbard
56373d38a8 Sigh, too many late nights! 1999-09-30 08:32:35 +00:00
Jordan K. Hubbard
222e52ceae Oh bollocks, I really screwed up the "auto" check here. Time
to crack the K&R; I must have forgotten the C language. :)

Embarrassingly noticed by:	Howard Gutch <logix@foobar.franken.de>
1999-09-27 21:48:28 +00:00