Refactor rc_conf_value into librc for use in library context.
Also requires moving:
- rc_conf internal static
- Defines: PROFILE_ENV, SYS_WHITELIST, USR_WHITELIST, RC_PATH_PREFIX
moved to rc.h with new RC_ prefix added.
- Defines: RC_CONF, RC_CONF_OLD moved to rc.h.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
In addition to detecting what multicall applet we want via argv[0],
provide an explicit override mode with a --applet initial argument.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
The deprecation notice for automatic detection of the system type stated
that the automatic detection will be removed no later than 2010/03/01,
but it should state 2011/03/01.
* status on a stopped service now has a return code of 3 (was 1)
* starting an already started service now has a return code of 0 (was 1)
* stopping an already stopped service now has a return code of 0 (was 1)
runscript.sh needs to abort if the . command used to load
conf.d files and the service script does not execute successfully.
I would like to thank Mike Frysinger for his input wrt style on this
patch.
- delete the contents of the $RC_LIBEXECDIR/console directory but not
the directory itself.
- direct error output from the chmod call for /tmp to /dev/null.
Any system using cgroups was being detected as an LXC system. This was
triggering on OpenVZ under RHEL6 as well as the "automated per tty task
groups" as discussed on the LKML.
All LXC users should now switch to the new rc_sys variable introduced in
the previous patch.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
- Fixes bugs #347583, #349389, both of which were triggered by cgroups
being detected as the LXC subsystem type.
- Makes it much easier to select "prefix" type.
- "rc -S" will now print a warning if you have not configured rc_sys in
/etc/rc.conf
- All other semantics of rc_sys are unchanged in this patch.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
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'
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.
- 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.
The _netdev option in fstab on linux systems indicates
that a filesystem should only be mounted if the network is available.
This commit fixes netmount to support this.