Commit Graph

2026 Commits

Author SHA1 Message Date
William Hubbs
84aa4ba818 Revert "net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically"
This reverts commit f583030e3c.

The previous commit did not account for the case of not having iproute2
installed.

Reported-by: Duncan <1i5t5.duncan@cox.net>
X-Gentoo-Bug: 397875
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=397875
2012-01-06 14:51:43 -06:00
William Hubbs
982ac38f35 cgroups: hide configure option to turn off cgroups
Turning off the default cgroups is possible, but these groups are the
recommended setup from the kernel, so turning them off is highly
discouraged.
2012-01-05 22:29:37 -06:00
William Hubbs
cd52fecc4e cgroups: turn on groups by default
The control groups we create are the ones recommended by the linux
kernel, so this should be on most of the time if cgroups are enabled in
the kernel.
2012-01-05 22:28:04 -06:00
William Hubbs
dbfcf23273 really disable /var/{lock,run} migration to /run
This needs to be disabled until we have tmpfiles.d support. The previous
method did not disable it correctly.
2012-01-05 06:55:08 -06:00
Mike Frysinger
f583030e3c net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-04 16:38:11 -05:00
William Hubbs
1771a83b92 Reword the documentation for the retry option for start-stop-daemon 2011-12-30 22:20:03 -06:00
William Hubbs
e873ef2ba7 Reword retry documentation on runscript man page 2011-12-30 22:12:59 -06:00
Christian Ruppert
26edfe369c Fix the description of --retry in start-stop-daemon(8)
X-Gentoo-Bug: 368615
X-Gentoo-Bug-URL: https://bugs.gentoo.org/368615
Reported-by: Stuart Shelton <srcshelton@gmail.com>
2011-12-31 03:43:25 +01:00
Christian Ruppert
34b7632d1d Do not exit immediately when a service has been stopped already
The old behaviour was to exit(EXIT_SUCCESS) in case the service has been stopped
already, even if further commands has been passed to the init script
(like zap, start).
So using for example /etc/init.d/foo stop zap start would abort immediately
after "stop" if the service has been stopped already. Though there may be cases
were we need it to proceed with the remaining commands, zap and start in this
case.
This patch fixes the behaviour to continue and proceed with the remaining
commands whenever necessary.

X-Gentoo-Bug: 371845
X-Gentoo-Bug-URL: https://bugs.gentoo.org/371845
2011-12-31 03:35:32 +01:00
Christian Ruppert
fb8db18d79 Add "retry" option for the stop() template 2011-12-31 02:41:59 +01:00
William Hubbs
6d5a2d5f9e Net: do not bring down interfaces during shutdown 2011-12-30 10:44:56 -06:00
William Hubbs
810f2e55fb Documentation updates
- Clarify that start_stop_daemon_args is only used when starting a
  daemon.
- fix several typos.
2011-12-30 10:35:16 -06:00
Christian Ruppert
372745844b Code style fixes 2011-12-30 16:03:24 +01:00
Christian Ruppert
191ea10f86 Document start_stop_daemon_args 2011-12-30 16:03:24 +01:00
Christian Ruppert
0d6ae379f4 Compare stricter in proc_getent
The new proc_getent compares stricter so that e.g. "ro" doesn't match
root=/dev/sdaN anymore.
So it has to be either "ro" or "ro=".
2011-12-30 16:03:24 +01:00
Marien Zwart
2471d741f7 net:macvlan: bring up the interface
X-Gentoo-Bug: 396429
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396429
2011-12-29 19:10:32 -06:00
William Hubbs
759f4ca4f2 net: remove _check_macvlan function
This test is incorrect, and we do not need the modprobe. If macvlan is a
module, it is automatically modprobed when the first macvlan link is
added. Also, the /sys directory referred to in the test does not exist
if macvlan is built into the kernel.

Reported-by: Marien Zwart <marienz@gentoo.org>
X-Gentoo-Bug: 396427
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396427
2011-12-29 18:00:25 -06:00
William Hubbs
6c8e8e2a96 disable /run migration until we have /run in baselayout 2011-12-29 17:28:05 -06:00
William Hubbs
29da0c8bf0 cgroups: default the size of the tmpfs to 10 mb 2011-12-29 10:01:28 -06:00
Christian Ruppert
49e99a7393 Don't try to write the log during sysinit
During the sysinit and shutdown runlevels the logfile destination may be
read-only. Skip the error messages in this case.

X-Gentoo-Bug: 390645
X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645
2011-12-29 13:58:08 +01:00
Christian Ruppert
8dcb7554ee Use RC_LEVEL_SHUTDOWN 2011-12-29 03:16:53 +01:00
Christian Ruppert
b754a27f62 Remove useless rc_runlevel_get() call
The current runlevel will be passed to rc_logger_open() already.
2011-12-29 03:08:29 +01:00
Christian Ruppert
ec65f181ea Don't print error when the logfile isn't writeable during shutdown
The logfile or its basedir may be read-only during shutdown because the
directory may be umounted or read-only remounted already. In this case we simply
skip this error.
This is related to a comment in bug 390645 but the initial bug is not fixed
through this commit.

X-Gentoo-Bug: 390645
X-Gentoo-Bug-URL: https://bugs.gentoo.org/390645
2011-12-29 02:50:24 +01:00
Robin H. Johnson
b12cb2f507 net/iproute2: POSIX sh compatability: ${x/a/b} invalid
The ${x/a/b} shell construct is NOT defined in the POSIX specification,
it's a bash addition.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-28 20:32:10 +00:00
William Hubbs
1875db4ff6 net: document up_before_preup for BSD 2011-12-28 11:17:58 -06:00
William Hubbs
26ceddae5e net: clean up documentation for up_before_preup 2011-12-28 10:41:07 -06:00
William Hubbs
20f612080c net: use yesno to test up_before_preup 2011-12-27 17:59:39 -06:00
Robin H. Johnson
5615325a84 net/vlan: Fix prestop when device was hard-removed already
During stop of an interface, if it has been removed already (eg
hotunplug), not existing is fine.

X-Gentoo-Bug: 395859
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=395859
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:56:26 -08:00
Robin H. Johnson
537171eac2 Fix whitespace.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:51:28 -08:00
Robin H. Johnson
415f480410 net/vlan, net/macvlan: iproute2 is required for new VLAN configuration
Since commit 683a21b0a in Feburary 2011, iproute2 has been required for
new VLAN configuration. MACVLAN is also impossible to configure without
iproute2. However we did not check if iproute2 was actually in the
modules for a given interface, so it could end up hanging or giving
weird errors. Check for iproute2 before usage now.

X-Gentoo-Bug: 389437
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=389437
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:22:29 -08:00
Robin H. Johnson
acf77b73af net/ip6to4: Split to use pre_start and start so that other tunnel names work.
We need to create interfaces of custom names before we can sucessfully
start them. To do this, we have to add tunnels during prestart instead
of start. Split up the ip6to4 script to do this, saving the computed
variables for use in start with the new service data commands.

X-Gentoo-Bug: 372575
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=372575
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-26 17:08:27 -08: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
Robin H. Johnson
7b1c1e1623 net/iproute2: Confirmed that broadcast and peer can be used together.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21 08:10:47 +00:00
Robin H. Johnson
8bb4b759eb net/iproute2: IPv6 cannot be used with broadcast
Broadcast and IPv6 should not be used together. Do not try to set the
keyword for auto-generation of the broadcast address. If the user passes
a broadcast address for IPv6, throw an error.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21 08:08:31 +00:00
Robin H. Johnson
e5eb062f05 net/iproute2: iproute2 flag handling
Several of the optional flags were not being handled correctly, they
were being passed as values only, without the keyword before them.
Affected keywords: anycast, label, scope, valid_lft, preferred_lft

Also change the handling of keywords to a common setup now, making
broadcast and peer strings the same as the above keywords.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-21 08:02:53 +00:00
William Hubbs
f6dc3d5ae9 cgroups: always mount the tmpfs on /sys/fs/cgroup
X-Gentoo-Bug:395079
X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=395079
2011-12-20 01:42:36 -06:00
Piotr Karbowski
3e2001f6a2 add rc_cgroup option to allow disabling of cgroup default setup
Currently, cgroups are still in development, so we are not setting them
up by default. However, this default will be changed in the future.

This commit message and patch were updated by
William Hubbs <williamh@gentoo.org>.

X-Gentoo-Bug: 395079
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=395079
2011-12-20 01:14:08 -06:00
William Hubbs
ed4605bf9f cgroups: remove references to the "openrc" cgroup
Openrc will set up cgroups the way the kernel documentation recommends.
2011-12-19 21:54:53 -06:00
William Hubbs
461c69acdb cgroups: mount cgroups suggested by the kernel documentation
The linux kernel documentation suggests mounting a separate cgroup
hierarchy for each subsystem you want to control/monitor. This changes
the cgroups mounting code to do this.
2011-12-18 13:33:27 -06:00
Robin H. Johnson
879e1acd5d net: Support more variants of address family specification.
This includes address family specifications methods to help debug bug
358235 further.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-13 00:43:18 -08:00
Robin H. Johnson
06f6ce408c net/iproute2: Support routing policy for IPv6 per bug #385833
For creation of routing policy entries for IPv6, the family must be
explicitly specified to 'ip'.

X-Gentoo-Bug: 385833
X-Gentoo-Bug-URL: https://bugs.gentoo.org/385833
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-13 00:19:58 -08:00
Robin H. Johnson
ac2391e0cb net/vlan: Fix mtu setting
Fix minor shell typo that broke setting mtu on vlans.

X-Gentoo-Bug: 392971
X-Gentoo-Bug-URL: https://bugs.gentoo.org/392971
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-12 22:52:09 -08:00
William Hubbs
ce9994f7ca net/tuntap: fix return code when tools can't be found
This module should return failure if iproute2, openvpn or tunctl cannot
be found. Before it was returning success; this fixes the issue.
2011-12-13 00:25:58 -06:00
Salah Coronya
a38a5071f3 Tuntap: add iproute2 support
This patch was modified by William Hubbs <williamh@gentoo.org> to
document the new usage in net.example.

X-Gentoo-Bug: 394281
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=394281
2011-12-12 21:40:39 -06:00
Robin H. Johnson
2569eb644e net/ifconfig, net/iproute2: admin/oper state check functions
Provide consistent methods using iproute2/ifconfig to check operational
and administrative up/down state of interfaces. This is not the same as
ethtool's "Link detected" field, which is the state of the layer 2
medium.

TODO: How to check operational state in BSD?

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-12-12 19:20:39 -08:00
Robin H. Johnson
dd45506a40 net/bonding: ensure slave interfaces are down before adding.
The old ifenslave binary forcibly set new slave interface to down before
adding into the kernel, as a way of show it's version to the kernel. We
need to duplicate this so that the kernel doesn't think it's an old
ifenslave version using the bonding setup interface.

X-Gentoo-Bug: 391881
X-Gentoo-Bug-URL: https://bugs.gentoo.org/391881
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Thanks-to: Yun Zheng Hu <hu@fox-it.com>
2011-12-12 19:20:39 -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
William Hubbs
e574b5d441 fix compile error
A variable used in the previous commit was actually removed in another
commit; that is why I didn't catch it.

Reported-by: Duncan < 1i5t5.duncan@cox.net>
X-Gentoo-Bug: 394369
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=394369
2011-12-11 14:33:39 -06:00
William Hubbs
5e01051c4e Allow init scripts to be executed with a relative path
This was a regression that was caused by the fix for
http://bugs.gentoo.org/show_bug.cgi?id=350910. I am reverting the commit
that we said fixed that bug and re-opening it.

Reported-By: Nathaniel <nathaniel@paust.us
X-Gentoo-Bug: 392457
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392457
2011-12-11 01:18:08 -06:00
William Hubbs
8ea1190486 ip6to4: set correct subnet mask
The correct setting for this is /48.

Reported-by: MaratIK <marat.buharov@gmail.com>
X-Gentoo-Bug: 392723
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392723
2011-12-09 21:57:00 -06:00