Commit Graph

37 Commits

Author SHA1 Message Date
Martin Blapp
ebba2f158c Move the stop_dhcp in start_dhcp again before the
delay. It seems that dhclient really needs the time
to get killed.
2003-08-12 22:44:48 +00:00
Martin Blapp
8b95f89e4a Remove the dhclient.${interface}.pid defines. They are now
obsolete. A working dhclient with OMAPI will also not need
this.
2003-08-12 22:27:08 +00:00
Martin Blapp
d7c24a758f Make this working with two or more pccards and with more than
one internal device. Don't call the startup procedure again if
we already use start.

Support a manually started dhclient and keep its configured
interfaces after pccard removal.

Make pccard_ether working in single-user mode without /usr mounted.
2003-08-12 20:22:44 +00:00
Martin Blapp
5912967938 Fix typo 2003-08-12 15:15:34 +00:00
Martin Blapp
d10526a03b Improve the handling dhcp handling of pccard_ether.
There are now many configurations which have a NIC on board, and
pccard slots. If a dhclient is running on the internal nic, the
Improve the handling dhcp handling of pccard_ether.

Improve the dhcp handling of pccard_ether.

There are now many configurations which have a NIC on board and
Improve the dhcp handling of pccard_ether.

There are now many configurations which have a NIC on board and
cardbus slots too. If a dhclient was already running on the internal
NIC, the user was forced to kill a running dhclient manually.

If now a pccard is included at startup time, /etc/rc.d/dhclient
start does include it into the startup list for dhcp devices.
That means you can now do dhcp on the internal and the pccard devices
at the same time. If the card is plugged in later, a running dhclient
(working for the internal interface only) is killed, and restarted,
but the interface name of the new pccard is added to the internal
name. After removal, /etc/rc.d/dhclient is started again. This
script does nothing if there are no devices in /etc/rc.conf

This is only a workaround for a well known problem. After we have
a dhcp client which handles device adding and removal, it will go
away.
2003-08-11 20:32:00 +00:00
Maxim Konovalov
33e268e7a8 o Correct usage example: ep(4) does not have 'link0' option.
o Fix a typo.

PR:		misc/51955
Submitted by:	Xander <x+freebsd-gnats@surfnet.nl>
MFC after:	1 week
2003-06-16 09:11:29 +00:00
Hajimu UMEMOTO
f9b96756eb follow dhcp_* changes. 2003-06-07 19:40:54 +00:00
Hajimu UMEMOTO
bcd1e80f87 pccard_ether didn't setup IPv6 after rcTOS sweep.
Reviewed by:	mtm and dougb
Approved by:	re (scott)
2003-05-12 11:36:50 +00:00
Hajimu UMEMOTO
924aa27d79 use /etc/rc.d/network_ipv6 instead of obsoleted /etc/rc.network6. 2003-05-05 19:06:46 +00:00
Warner Losh
c9e1bbfb91 o redirect the grep to /dev/null
o use ifn rather than interface in rc.network
o merge into rc.d/network1

Approved by: (re blanket)
2002-12-12 09:31:10 +00:00
Warner Losh
39a61a1fda o Don't do anything if the interface is already up.
o Only delay in pccard_ether when we're doing dhcp and starting the interface.

Approved: (re blanket for devd)
2002-12-11 23:30:34 +00:00
Warner Losh
8dac8c268d Due to a bug in the ed driver, which leads to hangs when using it with
dhclient and pccard_ether, introduce the concept of a "settle time" to
pccard_ether with the new pccard_ether_delay variable.  Defaults to 5
seconds, which is enough time for the ed driver to finish its
autoconfiguration for newer Linksys based cards.  This also can
eliminate the ed0: timeout messages that happen at startup as well.

MFC: after RE says OK.
2001-09-13 06:18:07 +00:00
Hajimu UMEMOTO
882a13da9c Avoid flushing IPv6 routes. `route flush' removes necessary
routes for IPv6 as well as IPv4 routes.
2001-05-09 20:30:55 +00:00
Hajimu UMEMOTO
4f34d18339 Enable static IPv6 address assignment on PCMCIA NIC.
PR:		conf/26633
2001-04-26 17:33:37 +00:00
Toshihiko ARAI
6b91b72b72 Add support for PC-card router configuration. (MFPAO)
o Add the removable_interfaces variable for list of removable network
  interfaces (PC-card ethernet, wireless network and USB ethernet etc).
o ifconfig_<ifn>_alias0, static_routes_<ifn>, removable_route_flush,
  /etc/start_if.<ifn> and /etc/stop_if.<ifn> are support.
o removable_route_flush variable is set to "NO" if you want to use the
  machine as gateway using two or more removable network cards. If
  static routing is needed use static_routes_<ifn> instead of
  static_routes or defaultrouter.
o The optional static_routes_<ifn> variable is likely static_routes.
o /etc/start_if.<ifn> and /etc/stop_if.<ifn> are shell script to be
  specified that are called when a card is inserted or removed.
2000-12-25 09:21:18 +00:00
Doug Barton
e14563a3f3 Apply a more consistent style to the echo statements in /etc/ scripts.
* Put quotes around each line
* Single quotes for lines with no variable interpolation
* Double quotes if there is
* Capitalize each word that begins a line
* Make echo -n 'Doing foo:' ... echo '.' more of a standard

No functionality changes
2000-12-17 08:16:06 +00:00
Josef Karthauser
78ba546662 Fix a blatant bug when running '/etc/pccard_ether device stop'.
I wasn't dropping the interface correctly, but not noticing because
the interface was going away when the card was ejected.

Submitted by:	Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
2000-10-28 14:31:40 +00:00
Josef Karthauser
69d1f468bf Add an optional start/stop argument to pccard_ether, and migrate
the 'ifconfig ifN delete' into pccard_ether under the 'stop'
function.

In addition start dhclient with a pid file based on the interface
name, e.g. /var/run/dhclient.ep0.pid, and kill the correct dhclient
(or dhcpc) process when the card is removed.
2000-10-16 19:11:11 +00:00
Josef Karthauser
3b7c548b4b Avoid passing the optional ifconfig arguments to dhcpc as well as ifconfig.
This bug has been here since revision 1.8.
2000-10-16 19:03:48 +00:00
Hajimu UMEMOTO
025ada8856 Make sure to accept RA. Some laptops run /etc/pccard_ether before
/etc/rc.network6.

PR:		bin/21062
2000-09-07 03:06:06 +00:00
Hajimu UMEMOTO
feeff03591 If ipv6_enable is set to yes, do IPv6 setup for PCCARD ethernet
card.  This is still at staring point and end node case only.
2000-07-17 12:33:57 +00:00
Sheldon Hearn
f66e7afa28 Add to defaults/rc.conf a new function source_rc_confs which rc
scripts may use to source safely overrides in ${rc_conf_files}
files.

This protects users who insist on the bad practice of copying
/etc/defaults/rc.conf to /etc/rc.conf from a recursive loop
that exhausts available file descriptors.

Several people have expressed interest in breaking this function
out into its own shell script.  Anyone who wants to embark on
such an undertaking would do well to study the attributed PR.

PR:		17595
Reported by:	adrian
Submitted by:	Doug Barton <Doug@gorean.org>
2000-04-27 08:43:49 +00:00
Nick Sayer
ad2a9d04d1 When running dhclient on a PC-Card insertion, specify the inserted
interface on the dhclient command line. Not doing so screws up vmware's
network interface by attempting to configure it for DHCP (which will
never work, of course). It also would impact any other interface that
may be present that, again, would likely be manually configured for
some other purpose.

Approved by: jkh
2000-02-11 14:49:42 +00:00
Sheldon Hearn
321704296f Apply a consistent style to most of the etc scripts. Particularly, use
case instead of test where appropriate, since case allows case is a sh
builtin and (as a side-effect) allows case-insensitivity.

Changes discussed on freebsd-hackers.

Submitted by:	Doug Barton <Doug@gorean.org>
1999-09-13 15:44:20 +00:00
Peter Wemm
9b7a44a60e $Id$ -> $FreeBSD$ 1999-08-27 23:37:10 +00:00
Sheldon Hearn
b68adff6b7 Style clean-up:
* All variables are now embraced: ${foo}

	* All comparisons against some value now take the form:
	  [ "${foo}" ? "value" ]
	  where ? is a comparison operator

	* All empty string tests now take the form:
	  [ -z "${foo}" ]

	* All non-empty string tests now take the form:
	  [ -n "${foo}" ]

Submitted by:	jkh
1999-08-25 16:01:45 +00:00
Steve Price
c6b0cb111f dhclient is now in /sbin. 1999-02-22 02:55:18 +00:00
Jordan K. Hubbard
9c63624e6f Use /etc/defaults/rc.conf everywhere, falling back to /etc/rc.conf
as necessary (for half-assed upgrades).
1999-02-10 18:08:16 +00:00
Brian Somers
a19eda1f28 Add Id keywords 1998-09-02 01:34:57 +00:00
Poul-Henning Kamp
6b21649d16 Wrapper script for PC Card Ethernet Adapters only supports ISC DHCP;
I prefer wide-dhcp, and since both are packages, it should get
equal billing.

PR:		7568
Reviewed by:	phk
Submitted by:	Drew Derbyshire <software@kew.com>
1998-08-14 06:31:58 +00:00
Paul Traina
f8371be67d Warn if ISC-DHCP not available. 1997-12-17 01:57:18 +00:00
Paul Traina
8e4ed0829d Support ISC-DHCP if the package is available. 1997-12-16 02:25:36 +00:00
Nate Williams
51d18e4a08 - In addtition to flushing the routes, also flush the arp cache when bringing
up the new network link.

Submitted by:	Guido van Rooij <guido@gvr.org>
1997-11-20 22:31:11 +00:00
Nate Williams
52f2ef0b82 - Setup a default route (if one is set) when the card is inserted. This
needs to be re-thought, but should work better for 95% of the users.

Stolen from:	rc.network
1997-11-19 18:51:25 +00:00
Jordan K. Hubbard
c3fa356aba sysconfig -> rc.conf
PR:		3978
Submitted by:	Janick.Taillandier@ratp.fr
1997-06-30 19:10:50 +00:00
Nate Williams
1f3a4e3ffa Fix reverse logic bug which caused the ethernet configuration to never work. 1996-04-24 00:04:10 +00:00
Nate Williams
5d9d7f34a7 PC-CARD hooks. Someday it will actually enable working code. :)
Reviewed by:	phk
Submitted by:	Tatsumi Hosokawa <hosokawa@mt.cs.keio.ac.jp> & BSD Nomads

I re-wrote alot of this, but the ideas are based on the code from the
most recent pccard-snapshot.
1996-03-12 15:39:26 +00:00