History log of /freebsd-10.0-release/etc/pccard_ether
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 242784 08-Nov-2012 n_hibma

Not only load pccard_ether settings, also load network settings. This
is only a problem when a /etc/rc.conf.d/network file is being used.

PR: conf/160373
Submitted by: n_hibma
MFC after: 1 week


# 179961 23-Jun-2008 mtm

Implement a "quiet" mode for rc.d/netif, which only outputs
the interface name of interfaces that were configured.

This change has the added benefit that ifn_start() and
ifn_stop() in network.subr no longer write to standard output.
Whether to output and what to output is now handled entirely
in rc.d/netif.


# 165011 08-Dec-2006 hrs

Disable IPv6 configuration for interfaces in pccard_ether_start().

After a change of devd.conf, devd(8) handles NIC attach/detach event
by using /etc/pccard_ether with the interface name as the argument.
This model does not work properly with IPv6 configuration because the
implementation of IPv6 stateless auto-configuration in the FreeBSD
rc.d scripts depends on whether there are any explicit configurations
for interfaces or not. It works this way: if no manual configuration,
it will perform auto-configuration, but otherwise no
auto-configuration will be performed. So, this behavior can only be
determined by all of the interfaces on a system, not a single one.
For this reason, the network6_interface_setup() function called from
the pccard_ether_start() does not work with a single interface name.
And what is worse, this combination of devd.conf and
pccard_ether_start() caused a bad side-effect that when
ipv6_enable=YES, all of interfaces marked as DOWN would be UP
unconditionally (and router solicitation was sent) just after devd(8)
was invoked. This should be fixed in a more sophisticated way.


# 162490 20-Sep-2006 brooks

Introduce a new method ipv6if which attemptes to figure out if an
interface is an IPv6 interface.

Use this method to decide if we should attempt to configure an interface
with an IPv6 address in pccard_ether. The mechanism pccard_ether uses
to do this is unsuited to the task because it assumes the list of
interfaces it is passed is the full list of IPv6 interfaces and makes
decissions based on that. This is at least a step in the right
direction and is probably about as much as we can MFC safely.

PR: conf/103428
MFC after: 3 days


# 162481 20-Sep-2006 brooks

Flushing all IPv4 routes when an interface is removed or unconfigured
makes no sense. Remove the undocumented removable_route_flush feature
from pccard_ether.

X-MFC after: never


# 162480 20-Sep-2006 brooks

Search the list of up interfaces provided by "ifconfig -ul" instead of
greping for UP in "ifconfig $ifn". This eliminates a dependancy on
/usr.


# 161437 18-Aug-2006 brooks

Don't try to start interfaces that don't exist.

Reported by: Dominique Goncalves <dominique.goncalves at gmail.com>


# 161386 17-Aug-2006 brooks

Introduce a new function, ifexists and use it to avoid attempting to
touch interfaces that don't actually exist in the stop case. In the
process move some IPv4 specific code from ifconfig_down to ipv4_down.

This should solve problems with ifconfig: error messages on boot when
interfaces are renamed.


# 150882 03-Oct-2005 brooks

Use more rc.subr bits to clean up pccard_ether and implement new
features. Both the presence of a NOAUTO keyword and an interface being
up can be ignored is the forcestart option is used. Additionally, a
restart option has been added.

Reviewed by: ume


# 150702 28-Sep-2005 brooks

Be less IPv4 centric. When checking if the interface is already
configured, check if the UP flag is set instead of checking for the
netmask keyword.


# 149401 23-Aug-2005 brooks

- Remove the removable_interfaces variable. /etc/pccard_ether will
now run on any interface.
- Add a new ifconfig_<ifn> keyword, NOAUTO which prevents configuration
of an interface at boot or via /etc/pccard_ether. This allows
/etc/rc.d/netif to be used to start and stop an interface on a purely
manual basis. The decision to affect pccard_ether may be revisited at
a later date.

Requested by: imp, gallatin (removable_interfaces)
Discussed with: sam, Randy Bush (NOAUTO)


# 147424 16-Jun-2005 brooks

Make sure we actually read the config files before testing values from
them.

Reported by: Darren Pilgrim <dmp at bitfreak dot org>
PR: conf/82313
Approved by: re (network interface startup blanket)


# 147088 07-Jun-2005 brooks

Support code for the OpenBSD dhclient. This significantly changes the
way interfaces are configured. Some key points:

- At startup, all interfaces are configured through /etc/rc.d/netif.
- ifconfig_<if> variables my now mix real ifconfig commands the with
DHCP and WPA directives. For example, this allows media
configuration prior to running dhclient.
- /etc/rc.d/dhclient is not run at startup except by netif to start
dhclient on specific interfaces.
- /etc/pccard_ether calls "/etc/rc.d/netif start <if>" to do most of
it's work.
- /etc/pccard_ether no longer takes additional arguments to pass to
ifconfig. Instead, ifconfig_<if> variables are now honored in favor
of pccard_ifconfig when available.
- /etc/pccard_ether will only run on interfaces specified in
removable_interfaces, even if pccard_ifconfig is set.


# 140378 17-Jan-2005 ceri

The submitter of bin/75786 turned out to not have removable interfaces,
and so the fix committed in r1.42 was not quite correct for the case
where there are two or more DHCP consuming removable interfaces - dhclient
must be restarted so that the other interfaces continue to function
correctly.

Approved by: murray
MFC After: 7 days


# 139678 04-Jan-2005 ceri

Correct syntactical weirdness in a call to /etc/rc.d/dhclient. Fixes:

PR: bin/75786
Reported by: Radko Keves <rado at daemon dot sk>
Approved by: murray
MFC After: 5 days ( to RELENG_5 )


# 130151 06-Jun-2004 schweikh

Removed whitespace at BOF, EOL & EOF.


# 126646 05-Mar-2004 rse

remove superfluous space before end of backtick expression


# 124984 25-Jan-2004 ambrisko

- Existing code would ignore pccard_ether_delay when more then 9 seconds
- If there was an exiting dhclient running on the same interface as the
new iface that left and returned then dhclient would be told to use the
same interface twice. Dhclient would fail and exit after getting
confused. Use "sort -u" on them to ensure no duplicates.
This is a mostly a race condition on suspend and resume and how things
happen to occur.
- Check for netmask being set on an interface rather then up. An interface
can be up but not configured.

Reviewed by: mbr


# 120097 15-Sep-2003 mbr

Release a previous lease if there is any, instead of
just killing dhclient. Needed my some broken dhcpd
implementations to be able to get a lease again.


# 118847 12-Aug-2003 mbr

Move the stop_dhcp in start_dhcp again before the
delay. It seems that dhclient really needs the time
to get killed.


# 118845 12-Aug-2003 mbr

Remove the dhclient.${interface}.pid defines. They are now
obsolete. A working dhclient with OMAPI will also not need
this.


# 118840 12-Aug-2003 mbr

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.


# 118829 12-Aug-2003 mbr

Fix typo


# 118797 11-Aug-2003 mbr

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.


# 116436 16-Jun-2003 maxim

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


# 115980 07-Jun-2003 ume

follow dhcp_* changes.


# 114942 12-May-2003 ume

pccard_ether didn't setup IPv6 after rcTOS sweep.

Reviewed by: mtm and dougb
Approved by: re (scott)


# 114746 05-May-2003 ume

use /etc/rc.d/network_ipv6 instead of obsoleted /etc/rc.network6.


# 107774 12-Dec-2002 imp

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)


# 107761 11-Dec-2002 imp

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)


# 83389 13-Sep-2001 imp

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.


# 76415 09-May-2001 ume

Avoid flushing IPv6 routes. `route flush' removes necessary
routes for IPv6 as well as IPv4 routes.


# 76045 26-Apr-2001 ume

Enable static IPv6 address assignment on PCMCIA NIC.

PR: conf/26633


# 70349 25-Dec-2000 toshi

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.


# 70108 17-Dec-2000 dougb

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


# 67795 28-Oct-2000 joe

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>


# 67221 16-Oct-2000 joe

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.


# 67220 16-Oct-2000 joe

Avoid passing the optional ifconfig arguments to dhcpc as well as ifconfig.
This bug has been here since revision 1.8.


# 65559 07-Sep-2000 ume

Make sure to accept RA. Some laptops run /etc/pccard_ether before
/etc/rc.network6.

PR: bin/21062


# 63308 17-Jul-2000 ume

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.


# 59674 27-Apr-2000 sheldonh

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>


# 57144 11-Feb-2000 nsayer

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


# 51231 13-Sep-1999 sheldonh

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>


# 50472 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 50357 25-Aug-1999 sheldonh

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


# 44203 22-Feb-1999 steve

dhclient is now in /sbin.


# 43849 10-Feb-1999 jkh

Use /etc/defaults/rc.conf everywhere, falling back to /etc/rc.conf
as necessary (for half-assed upgrades).


# 38738 01-Sep-1998 brian

Add Id keywords


# 38312 14-Aug-1998 phk

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>


# 31793 16-Dec-1997 pst

Warn if ISC-DHCP not available.


# 31760 16-Dec-1997 pst

Support ISC-DHCP if the package is available.


# 31326 20-Nov-1997 nate

- 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>


# 31297 19-Nov-1997 nate

- 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


# 27117 30-Jun-1997 jkh

sysconfig -> rc.conf
PR: 3978
Submitted by: Janick.Taillandier@ratp.fr


# 15366 23-Apr-1996 nate

Fix reverse logic bug which caused the ethernet configuration to never work.


# 14596 12-Mar-1996 nate

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.