Commit Graph

30 Commits

Author SHA1 Message Date
William Hubbs
6d5a2d5f9e Net: do not bring down interfaces during shutdown 2011-12-30 10:44:56 -06:00
William Hubbs
20f612080c net: use yesno to test up_before_preup 2011-12-27 17:59:39 -06:00
Robin H. Johnson
9a01f68515 net: Add up_before_preup variable for CAN devices
Historically, we have tried to up interfaces before running preup, so
that the kernel setups up the device and makes things like ethtool work
(some hardware cannot be correct probed until then). However this ends
up breaking other hardware, so a variable has been introduced to allow
the up prior to preup to be disabled: up_before_preup_IFVAR=no

X-Gentoo-Bug: 389475
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=389475
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 16:27:38 -08:00
William Hubbs
46b96eb80d Network: start interfaces after dbus
This is needed to allow auto-connect at boot.

Reported-by: David J Cozatt <ygdrasil@comcast.net>
X-Gentoo-Bug: 390955
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=390955
2011-12-12 19:46:03 -06:00
Mike Frysinger
cc45abb77b net.lo: fix typo in previous math commit
x-Gentoo-Bug: 391671
x-Gentoo-Bug-URL: http://bugs.gentoo.org/391671
Reported-by: Duncan <1i5t5.duncan@cox.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-23 13:17:20 -05:00
Mike Frysinger
ef1ff1b4f2 make shell math operations style more succulent
Convert the style:
	var=$((${var} + 1))
to:
	: $(( var += 1 ))

The latter is easier to read imo.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-19 02:25:36 -05:00
William Hubbs
9175534752 Small style change 2011-10-02 12:21:17 -05:00
Christian Ruppert
930f4021b1 Add a new helper functions for _{flatten,get}_array
A new helper function (_array_helper) since both, the _flatten_array and
_get_array function share partially the same code.
We also reduce multiple whitespace to a single space, remove leading newlines
as well as skipping "empty" lines.

This makes the data returned by _{flatten,get}_array much nicer than before.
It also fixes bug 366677 where net-tools having trouble with the whitespace
mentioned above. iproute2 was not affected.

Reported-by: Andrew Maltsev <am@ejelta.com>
X-Gentoo-Bug: 366677
X-Gentoo-Bug-URL: https://bugs.gentoo.org/366677
2011-09-21 00:21:43 +02:00
Yun Zheng Hu
a029dee59b Do not print "null" or "noop" when configuring an interface
Note by william hubbs:

I modified the patch to compare "null" and "noop" with $1 instead of
${config}.

Reported-by:    Yun Zheng Hu <hu@fox-it.com>
X-Gentoo-Bug: 379577
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=379577
2011-08-20 14:10:07 -05:00
William Hubbs
e3b02abd7a Add warnings for the use of bash arrays
Currently, we allow the use of bash arrays for some configuration settings.
This is undocumented, so I want to remove the support from openrc.

The first phase of this removal will be this commit which adds warnings
to encourage people not to use bash arrays.

X-Gentoo-Bug: 374875
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=374875
2011-07-14 01:26:29 -05:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
William Hubbs
de0ded4ed0 revert changes for bug #292894
This is being done because these dependency changes caused a regression.
We will need to revisit the previously mentioned bug.

X-Gentoo-Bug: 363693
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363693
2011-04-15 19:21:20 -05:00
William Hubbs
03cd55aa19 start loopback interface before mtab
X-Gentoo-Bug: 292894
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=292894
2011-04-11 15:33:41 -05:00
William Hubbs
85827d474c remove "after bootmisc" dependency from loopback interface 2011-04-10 17:24:44 -05:00
William Hubbs
8e925368b7 bring up the loopback interface earlier
For most situations, the loopback interface can depend on root instead
of localmount, so this patch makes that happen. It also adds comments to
the net.example files explaining when a user might want to change this
and giving an example.

I would like to thank Robin Johnson for the original patch and suggested
examples.

X-Gentoo-Bug: 292894
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=292894

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-04-10 16:10:47 -05:00
William Hubbs
15660dbbfc add fallback_routes support to network scripts
Add support for optional fallback_routes_* variables in the network scripts.
This is similar to the fallback_route_* support in baselayout-1.
However, if you do not have fallback_routes set for an interface but you
do have routes set, that setting will be used, so you do not need this
variable unless you want the fallback routes to be different from the
primary routes.

X-Gentoo-Bug: 250978
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=250978
2011-04-09 13:54:01 -05:00
Ed Wildgoose
60d8d4f5bb do not delete addresses when stopping a ppp interface.
This is important in situations where ppp is being used in a demand
dialing setup.

X-Gentoo-Bug: 359069
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=359069
2011-03-21 23:55:55 -05: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
7f7baa6c3c Bug #266659: we really need to allow peer, pointtopoint in parsing config lines. 2010-12-11 18:29:34 -08:00
Roy Marples
b4104957b1 We should use -feature instead of nofeature.
This matches the ifconfig and Gentoo USE flag syntax and is hopefully
easier to read.
Fixes #178.
2009-07-01 00:07:32 +01:00
Roy Marples
aaced3face Update copyright 2009-06-05 09:20:10 +01:00
Roy Marples
60134ddec5 Only delete addresses for interfaces that exist. 2009-05-29 15:23:23 +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
22959c3963 Fix working on zsh 2008-12-30 00:05:17 +00:00
Roy Marples
0786141026 Restore interface_exists, interface_up and interface_exists, #123. 2008-11-10 12:31:20 +00:00
Roy Marples
c18c74e816 Fix adding just the default route, #119 thanks to pva. 2008-10-14 15:27:52 +00:00
Roy Marples
f2ea7ca514 Let ifdown control all interfaces. 2008-06-03 11:51:36 +00:00
Roy Marples
766ec96e3d Add ifdown_eth0=NO so that the interface stays up for WakeOnLan, Gentoo #220875 2008-05-09 10:29:06 +00:00
Roy Marples
5ba6f0a628 We need to ensure that the init script started is correct, translating symlinks. This has a new rule - multiplexed services must exist in the same dir as the master sript. So we need to ensuret that net.lo(0) is the real script and not a symlink itself. This fixes Gentoo #219526. 2008-04-29 10:25:45 +00:00