Commit Graph

170 Commits

Author SHA1 Message Date
Mike Frysinger
c427d3c1fe net: ccwgroup: smooth up/down process
We need to bring the link up ourselves after we've properly configured
the device.  The common code tries to bring the link up itself, but it
does so before things are configured, and so it ends up failing.

When shutting down, we need to wait for the kernel to finish destroying
the interface.  Otherwise, when doing a restart, openrc is quick enough
to tell the kernel to destroy things, but then start trying to bring it
back up before the kernel has finished.

X-Gentoo-Bug: 367467
X-Gentoo-Bug-URL: http://bugs.gentoo.org/367467
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-28 00:02:11 -04:00
William Hubbs
fd48bc09ff net:bonding small style change for readability 2011-05-16 14:57:46 -05:00
Kfir Lavi
db1daa5857 Do not add slaves to bond interface if they are already added
X-Gentoo-Bug: 366653
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=366653
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2011-05-16 09:21:18 -04:00
Mike Frysinger
2493a1f32e net: ccwgroup: forward port changes from baselayout-1
Quite a bit of work happened in baselayout-1 on the ccwgroup module, but
seems it didn't make it into openrc.  So forward port all the existing
code so we can work with more than just qeth and layer2 options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-16 01:22:32 -04:00
William Hubbs
b712a9161f change udhcpc support to busybox udhcpc
This updates the udhcpc support to use busybox's udhcpc instead of the
stand alone version.

I would like to thank jackieku <kjackie@gmail.com> for assisting with
this update.

X-Gentoo-Bug: 205286
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=205286
2011-04-26 15:25:08 -05:00
Robin H. Johnson
2d197357ef [oldnet] Bug #363959: Improve plug_timeout ifplugd/netplugd code.
- Add support for a global plug_timeout setting to match the
  documentation.
- Update the documentation to also show per-interface configuration.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-04-19 17:49:20 +00:00
William Hubbs
73c862b792 fix typo in ethtool.sh
This was causing the ethtool interface to not work.

X-Gentoo-Bug: 360481
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360481
2011-04-07 07:48:56 -05:00
Marc Joliet
6e1239795f remove bashism from ethtool module
X-Gentoo-Bug: 360367
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=360367
2011-03-27 15:45:45 -05:00
Mike Frysinger
9f5eb03e5e net: bonding: avoid using bash string replace
X-Gentoo-Bug: 359311
X-Gentoo-Bug-URL: http://bugs.gentoo.org/359311
Reported-by: Raffaello D. Di Napoli <fastijum@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-18 14:24:18 -04:00
Robin H. Johnson
dfd42d1393 net/ethtool: official interface for changing ethtool params (bug #195479)
Implement a consistent interface for changing ethtool parameters, as
suggested in bug 195479. All variable names are based on the long option
to ethtool to set each group of parameters. Multiple entries seperated
by newlines are permitted for variable values.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 195479
2011-02-22 02:59:38 +00:00
Robin H. Johnson
20480048ca net/iproute2: Pass required explicit -6 for IPv6 tunnels (#347657)
Tunnel modes ipip6 and ip6ip6 require an explicit family selection for
the ip tunnel call.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Gentoo-Bug: 347657
2011-02-21 09:55:47 +00:00
Robin H. Johnson
683a21b0a0 net/vlan: update to use modern iproute2 interface
This replaces the vlan setup code that previously used the old vconfig
binary with a new implementation using the iproute2 interface.

vconfig does not handle many of the newer setups. No automatic migration
path is provided, as altering the configuration is non-trivial.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Written-by: Guillaume Castagnino <casta@xwing.info>
X-Gentoo-Bug: 346365
2011-02-21 09:41:48 +00:00
Christian Wetzig
7bc920ab56 fix typo in iproute2 module
X-Gentoo-Bug: 354511
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=354511
2011-02-12 13:34:46 -06:00
Christian
43678fd2c4 bridge.sh: use correct POSIX test, = not ==
X-Gentoo-Bug: 353124
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=353124
2011-02-05 07:24:11 -06:00
Mike Frysinger
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05:00
Robin H. Johnson
f84d997d4c Move the ip rule extra output to verbose mode only, and support verbose output on addresses and routes. 2010-12-15 13:02:04 -08:00
Robin H. Johnson
346148ceb8 Fix pointopoint->peer for iproute. 2010-12-15 12:40:21 -08:00
Robin H. Johnson
12a91636f4 Fix pointopoint typo in old ifconfig setup. 2010-12-15 12:37:50 -08:00
Robin H. Johnson
400b45d590 Final documentation cleanup for updated bridge code.
Specifically document how to handle the case of explicitly starting a
bridge and then dynamically adding interfaces to it.

brctl_br0=''
bridge_add_eth0='br0'
2010-12-12 00:58:47 +00:00
Robin H. Johnson
e07f0ef417 Merge support for Routing Policy Database (RPDB)
This can be used for multi-homed connections and other advanced routing
in Linux. See the documentation links for more information about doing
this in linux.

The code was a originally pure addon into the conf.d/net files, written
in mid-2004 for doing multi-homing between two internet connections. I
have finally cleaned this up and integrated it. Thanks to Jonathan Kwan
for giving me the original impetus to develop this for Gentoo (it was
his dual internet connections...).

In the intervening years, it was a example of postup/postdown in the
net.example file, however that suffered from a few corner case issues.

If you were using the code from net.example, please see the updated
section 'Advanced Routing' on syntax, and drop your old function blocks.
Additionally, note that the rules added are now directly saved for
removal when the interface is taken down.
2010-12-11 14:23:52 -08:00
Robin H. Johnson
dbb5af2023 Revamp of bridging code.
- Use sysfs to read bridge information from the system instead of
  parsing the brctl outputs.
- Allow setting of all bridge configuration parameters using new sysfs
  methods, modelled after bonding configuration. Also works for per-port
  bridge interface parameters.
- Document pre-starting an empty bridge for dynamic add.
- Check for interface existence before adding to bridge.
- Should fix bug #293046, #309185.
2010-12-11 12:26:38 -08:00
Robin H. Johnson
f8f03bdbbf Bug #345281: If wpa_supplicant is built w/ USE=dbus, we need to start after DBus is up. 2010-12-06 02:54:21 +00:00
William Hubbs
4ca32808dd Revert "allow ifplugd to work on wireless interfaces"
This reverts commit 4ea75dd1d6.
This caused a regression, see bug #345795.

Ifplugd is only designed to support wireless interfaces that use the
older wireless extentions.
2010-11-18 15:06:42 -06:00
Jory A. Pratt
68c021c424 ensure bonding interface is down before we attempt to configure, also
mode has to be configure before any other arguements are passed. Thanks
Ed Wildgoose <gentoo@wildgooses.com> for patch.
2010-10-31 16:40:54 -05:00
William Hubbs
4ea75dd1d6 allow ifplugd to work on wireless interfaces
this fixes bug #335494.
2010-09-14 19:37:52 -05:00
William Hubbs
f700243016 Revert "fix bug 266395"
This reverts commit 1a188f8f72.

This revert fixes bug #334663.
2010-09-02 09:42:11 -05:00
William Hubbs
23546e27d9 fix detection of renamed vlan interfaces
This fixes bug 327059, thanks to Jonathan for reporting this and for the patch.
2010-08-19 16:17:38 -05:00
William Hubbs
1a188f8f72 fix bug 266395
Do not stop wpa_supplicant or wpa_cli if they are in the background.
Thanks to Slava Gorbunov for the patch.
2010-08-18 15:01:23 -05:00
Anthony G. Basile
89829f6d7c Fixes bug #332383. Thanks Lutz Heermann. 2010-08-13 17:42:23 -04:00
Anthony G. Basile
6e3b3bfc53 Fix bug #332181. Thanks Lutz Heermann. 2010-08-13 17:32:31 -04:00
William Hubbs
d3ccbdb5a9 allow ip to be in /sbin or /bin
This makes it possible for the "ip" program in iproute2 to be installed
in /sbin or /bin.
2010-08-09 20:01:15 -05:00
William Hubbs
898552dcc3 fix metric
This change was also taken from Roy Marples' git.
2010-07-07 19:55:37 -05:00
Seth Robertson
316a316d9b Allow dhclient per $IFACE arguments. 2010-03-30 09:21:54 +01:00
Roy Marples
ae7a92ae7b Try and describe bonding errors a bit more. 2010-03-24 20:41:18 +00:00
Trevor Summers Smith
c0f5f2122c Allow bridge interfaces to be called bridge. 2010-02-09 17:10:04 +00:00
Mike Frysinger
ecf9ef49a7 random spelling fixes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-08 22:02:51 +00:00
Daniel Mierswa
f434c902a5 Use IFACE variable instead of iface.
Signed-off-by: Daniel Mierswa <impulze@impulze.org>
2009-12-31 07:21:59 +00:00
Alon Bar-Lev
ca752a5a2d Support phy80211, fixes #209. 2009-12-05 19:25:39 +00:00
Roy Marples
4df8770a90 Only add metric to dhcpcd if not given.
Fixes Gentoo #294312
2009-11-25 02:07:22 +00:00
Nao Nakashima
4a892a23ba Fix ppp options ordering.
Fixes #205.
2009-11-04 19:40:52 +00:00
Roy Marples
807e5d7250 Timeout for ipv6 addresses being tentative. 2009-09-04 13:23:40 +01:00
Roy Marples
7962218dd8 Apply MTU and txqueuelen after creating the tunnel. 2009-07-08 22:38:48 +01:00
Roy Marples
efec0b5012 nexthop routes don't use metrics 2009-06-01 20:06:56 +01:00
Roy Marples
a518d34549 Ignore more foo 2009-05-28 20:16:35 +01:00
Roy Marples
c0fd1b49e4 Move non compiled libraries from /lib/rc to /libexec/rc
OpenRC version is now stored as plaintext in /libexec/rc/version

Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.
2009-05-23 20:38:12 +01:00
Roy Marples
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
Roy Marples
d231a2f0d9 Fix logic, thanks to Maryasin Semen 2009-04-23 20:44:17 +00:00
Roy Marples
4febf00c06 Allow family on routes, #152 2009-04-19 20:05:40 +00:00
Roy Marples
4f163f9b9a Allow wpa_cli_$IFACE to too send args to wpa_cli. 2009-01-21 09:25:34 +00:00
Roy Marples
0298e4ffa0 Remove leading and trailing space on the ctrl_interface line. 2009-01-05 09:37:38 +00:00
Roy Marples
1ff289e305 Whitespace. 2008-12-23 10:39:45 +00:00
Roy Marples
9d9f17aa52 Allow working with the new ctrl_iface=DIR=foo directive. 2008-12-23 10:13:58 +00:00
Roy Marples
2c98c5326a Punt .gitignore files. 2008-12-04 12:12:09 +00:00
Roy Marples
9ec6ff02bb Style and typo. 2008-10-28 15:43:36 +00:00
Roy Marples
ae692e294e Don't quote $tunnel, Gentoo #218123. 2008-10-26 19:58:57 +00:00
Roy Marples
72dcac8c55 Shorten common messages for prefixed output. 2008-10-10 09:03:59 +00:00
Roy Marples
2c62d095c8 Typo. 2008-09-21 09:53:48 +00:00
Roy Marples
600d1f62fb Allow configuration of bond via extra sysfs entries, #105. 2008-09-19 09:32:24 +00:00
Roy Marples
2de401bca1 Enable bonding via sysfs, #104 thanks to Wolfram Schlich 2008-09-18 22:24:58 +00:00
Roy Marples
c4c024fc9d Allow an empty bridge with no options, Gentoo #237485. 2008-09-18 14:13:33 +00:00
Roy Marples
93a3b2dd02 Fix iwconfig parsing on Linux, #111 thanks to Andrew Gaffney. 2008-09-04 14:54:56 +00:00
Roy Marples
a9f7d2d5e5 Allow dhcpcd to use global dhcpcd variable for commandline options. 2008-08-19 22:30:59 +00:00
Roy Marples
46a74f244e Typo 2008-07-24 19:02:28 +00:00
Roy Marples
c67233f15c Don't set silly defaults that may brake users. 2008-07-09 18:28:45 +00:00
Roy Marples
bdd8b150cd Fix return display. 2008-07-09 13:36:37 +00:00
Roy Marples
c409dd0570 Some ifconfig's output weird inet6 loopback addresses 2008-05-28 13:38:58 +00:00
Roy Marples
f640ecaebb Only check tentative when we have a carrier, Gentoo #223061 2008-05-27 16:41:53 +00:00
Roy Marples
eeadc618fb Work with madwifi craptastic drivers. Hopefuly prism54 still works. 2008-05-27 13:07:18 +00:00
Roy Marples
bb069e1618 Use iwconfig defaults and config if available. 2008-05-27 10:46:27 +00:00
Roy Marples
328215e841 Work with new beta5 options to skip hoof files. 2008-05-25 22:57:44 +00:00
Roy Marples
b03282b901 Fix tunnel, #80. Someone should fix iproute2 documentation and help files also :P 2008-05-25 22:34:05 +00:00
Roy Marples
762dc3d197 Work with dhcpcd-4 style options. 2008-05-10 12:29:49 +00:00
Roy Marples
cedd81801a We should use correct iproute2 commands and fix busybox as it's iproute2 implementation is a little broken. 2008-04-30 09:18:20 +00:00
Roy Marples
1e3442f95d Work with aliases on NetBSD. 2008-04-23 13:17:13 +00:00
Roy Marples
799686e40d Fix force_preferred, #60. 2008-04-20 14:24:35 +00:00
Mike Frysinger
18b4108755 add support for parsing newer ifconfig output
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-04-19 07:22:30 +00:00
Roy Marples
725b9dc89c Use qlen instead of txqueuelen so we work with busybox iproute2, Gentoo #217948 2008-04-16 15:23:57 +00:00
Roy Marples
403abe73de Fix vlans, #49. 2008-04-01 21:34:31 +00:00
Roy Marples
fccff6a4ed Allow multiple ntp_servers without error, #47 2008-03-26 22:39:27 +00:00
Roy Marples
ecba32d1ca Install ifwatchd for NetBSD. 2008-03-26 19:39:43 +00:00
Roy Marples
864e17fabc Ignore more files. 2008-03-26 17:34:23 +00:00
Roy Marples
f90f2914b9 Add mising net files back. 2008-03-26 14:41:47 +00:00
Roy Marples
833903fc78 use $CP and $SED instead of cp and sed 2008-03-26 14:27:46 +00:00
Roy Marples
ccf238f852 Merge net.OS into net 2008-03-26 14:18:01 +00:00
Roy Marples
4d6b84290a These now need to be prefixed. 2008-03-25 17:17:15 +00:00
Roy Marples
55eb3794fb Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. 2008-03-25 14:06:05 +00:00
Roy Marples
6159a32f39 SVCNAME -> RC_SVCNAME, but export SVCNAME still for compat. 2008-03-19 19:57:24 +00:00
Roy Marples
8b23aaecff Add ifwatchd.sh to power the NetBSD ifwatchd program. Let wpa_supplicant work with it. 2008-03-10 21:34:46 +00:00
Roy Marples
a276050a54 Use correct shell_var function, Gentoo bug #212877 2008-03-10 08:56:28 +00:00
Roy Marples
61c476e72d Use exlicit make targets, not directory contents. 2008-03-03 12:34:51 +00:00
Roy Marples
fec312d448 Update copyrights, my email and license. 2008-01-11 15:31:10 +00:00
Roy Marples
5de53f176c Adopt a more C style for scripts and remove vim settings. 2008-01-11 15:08:57 +00:00
Roy Marples
acbaacb2c1 dhcpcd could be anywhere, so allow this. 2008-01-10 23:23:39 +00:00
Roy Marples
4314784520 Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's. 2008-01-10 16:35:59 +00:00
Roy Marples
69fe6844eb net modules should always be installed 2007-12-28 09:38:31 +00:00
Roy Marples
11c3b5ed6c whitespace 2007-12-24 22:37:44 +00:00
Roy Marples
ed620aec61 get_options -> service_get_value and save_options -> service_set_value 2007-12-19 14:28:38 +00:00
Roy Marples
437363a344 We no longer need SVCNAME here 2007-12-18 17:59:29 +00:00
Roy Marples
9f2403dffa Remove Gentoo copyright from all files that I know I have written 2007-12-14 14:12:38 +00:00
Roy Marples
7a18054fbe Only configure SSID if we are running on a wireless interface. 2007-12-10 16:25:29 +00:00