aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-04-03net/ifconfig, net/iproute: need sysfsRobin H. Johnson
sysfs needs to be available before we can check interfaces. On udev systems this was not a problem, but with mdev/static-dev, there is no other need for sysfs until later in the init. X-Gentoo-Bug: 410701 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=410701 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-04-01Change the method for calculating the interface metric for linux systemsWilliam Hubbs
On linux systems running >=linux-3.2, the /proc/net/dev file cannot be relied on to show the order network interfaces were added to the system. Also, there is currently a bug in the implementation of the seek call for this file which can cause a system to go into an infinite loop. This commit changes the _ifindex function to retreive the value of /sys/class/net/${IFACE}/ifindex and use that value instead of attempting to calculate one from the interface's position in /proc/net/dev. reported-by: John Keeping <john.keeping@lineone.net> X-Gentoo-Bug: 410127 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=410127
2012-03-29init.d/fsck: only check local file systemsWilliam Hubbs
On linux systems, fsck was not taking into account which filesystems were local or remote. This commit adds the -t option, with an appropriate value, to the fsck call so that remote file systems are not checked. reported-by: Vladimir Berezhnoy <non7top@gmail.com> X-Gentoo-Bug: 408363 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=408363
2012-03-26librc: Do not output error messages from within the library.William Hubbs
This fixes a compile issue. Also, it is cleaner to have the client output error messages as opposed to having the library do this. Reported-by: Ewoud Kohl van Wijngaarden <gentoo@kohlvanwijngaarden.nl> X-Gentoo-Bug: 409743 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409743
2012-03-26Add -lxc keyword to sysctl script for linux systemsWilliam Hubbs
Kernel parameters should not be set from inside a lxc guest. Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com>
2012-03-25localmount: Only unmount local filesystems if we are shutting downWilliam Hubbs
Make the stop function in localmount only unmount file systems when the system is going down. reported-by: Alexey Prokopchuk <alexpro@homelan.lg.ua> X-Gentoo-Bug: 407167 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=407167
2012-03-24sysctl: use @SYSCONFDIR@ in the scripts instead of hard coding /etcWilliam Hubbs
2012-03-24Allow files in sysctl.d to override sysctl.confWilliam Hubbs
reported-by: Peter Gantner (a.k.a. nephros) <gentoo@nephros.org> X-Gentoo-Bug: 406631 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406631
2012-03-24init.d/sysctl.Linux: do not use sysctl -qDiego Elio Pettenò
The -q option is not implemented by BusyBox, so instead of using that, make it so that the standard error is caught, but standard output is thrown away. Note: the ordered behaviour of redirection is part of POSIX so we should be on the safe side with this change, as first we duplicate the output descriptor to be used as stderr, then we change the output descriptor to point to NULL. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
2012-03-24Document the required_dirs and required_files variablesWilliam Hubbs
2012-03-19doc/net.example: Add warnings that changing MAC on bonds can break things.Robin H. Johnson
In most cases, changing the MAC on a bond manually is wrong. The bonding module will do it as needed to failover between interfaces, or to get multiple interfaces to correctly have the same MAC. We cannot however enforce it, as there are some corner cases where it is actually valid (hardware that requires specific MAC configuration, like some quad-port NICs). Suggested-by: Martin Mokrejs <mmokrejs@fold.natur.cuni.cz> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-19doc/net.example: Update bonding exampleRobin H. Johnson
The newer bonding code using sysfs does not clearly show the most common bond parameter: mode Also include a path to the referenced kernel documentation for the other settings. X-Gentoo-Bug: 408333 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=408333 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-12sh/tmpfiles: Upstream clarifications & quoting fixes.Robin H. Johnson
Upstream has clarified via IRC: - hardcoding /usr/lib/ is an explicit choice. It should NOT consider $libdir at all. - The z/Z relabel types should call restorecon, not chcon. - Whitespace is not allowed in tmpfiles.d/*.conf path entries, but is allowed in globs results. Fixed quoting of path arguments for this. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-12sh/tmpfiles: tmpfiles.d support.Robin H. Johnson
This is the baseline support for tmpfiles.d. Still missing: - SELinux relabel, pending upstream clarification - LIBDIR vs multilib systems, pending upstream clarification - Whitespace in paths? - Clean support not implemented - "x" exclude type not implemented X-Gentoo-Bug: 396003 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396003 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-11net/ifconfig: The location of the ifconfig binary has changedRobin H. Johnson
The location of the ifconfig binary has changed in net-tools-1.60_p20120127084908, and if we do not check both locations for it, the user will get errors like: _is_wireless: command not found _exists: command not found X-Gentoo-Bug: 407757 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=407757
2012-03-03Runscript: allow extra_commands to be run in chrootsWilliam Hubbs
The commands defined in the extra_commands variable do not depend on whether the service is stopped or started, so it is valid to run them in chroot environments. Also, add a note to the runscript man page about the commands in extra_commands being able to run whether or not the service is started. Reported-by: Robin Johnson <robbat2@gentoo.org> X-Gentoo-Bug: 406713 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406713
2012-03-02Bug #405491: _exists can give a false negative since /proc/net/dev can be ↵Robin H. Johnson
slow to update sometimes when interfaces are added rapidly. Use sysfs instead. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-02Add a potential future problem I can see with metric calculation and ↵Robin H. Johnson
interfaces that change often. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-03-02Clarify the meaning of the clock_hctosys variableWilliam Hubbs
Reported-by: Ian Abbott <ian@abbott.org> X-Gentoo-Bug: 405861 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=405861
2012-02-25librc: make rc_proc_getent available for all operating systemsWilliam Hubbs
This looks up an option on the kernel command line. For now, itworks on linux and returns NULL on the bsds, but we are definitely open to patches for that side.
2012-02-25Fix rc_proc_getent() undeclared on BSDChristian Ruppert
X-Gentoo-Bug: 405713 X-Gentoo-Bug-URL: https://bugs.gentoo.org/405713 Reported-by: Dmitri Bogomolov <4glitch@gmail.com>
2012-02-23Skip pam if running as rootWilliam Hubbs
Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com> X-Gentoo-Bug: 386623 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=386623
2012-02-21Remove prefix supportWilliam Hubbs
I spoke with the prefix team sometime back and was told that they do not have an interest in using OpenRC on prefix systems.
2012-02-20Drop rc_sys definition from build systemWilliam Hubbs
2012-02-20rc: remove calls to rc_sys_v2 and rc_sys_v1William Hubbs
These separate calls are no longer needed since we do not warn about falling back to automatic detection.
2012-02-20remove the warning about falling back to autodetectionJory A. Pratt
2012-02-20Revert "Revert "swap: go back to using swapon for Linux systems""William Hubbs
This reverts commit 06d67017850e106f14d8948003027612253b143a. After researching this further, we do need this commit. The other issue is a bug in fstabinfo which will also need to be fixed.
2012-02-20update ignore patternsWilliam Hubbs
2012-02-20Revert "swap: go back to using swapon for Linux systems"William Hubbs
This reverts commit 297720787f914ca34f2d04c66980c18c57700865. robbat2 tells me there is a better way to fix this.
2012-02-20swap: go back to using swapon for Linux systemsWilliam Hubbs
There are several reasons for going back to this: - fstabinfo doesn't work with labels in fstab - when a device is passed to swapon individually, the swap priority from fstab is not honored. - We also add the -e option to only activate available swap devices. reported-by: Duncan <1i5t5.duncan@cox.net> X-Gentoo-Bug: 405021 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=405021
2012-02-19Clarify the documentation about the reboot runlevelWilliam Hubbs
The reboot runlevel does exist, but it gets remapped to the shutdown runlevel internally.
2012-02-19Document the RC_REBOOT variableWilliam Hubbs
2012-02-18net: add deprecation warning for old style net dependency variablesWilliam Hubbs
2012-02-18net: fix documentation for interface dependenciesWilliam Hubbs
The network script had a separate case for handling network interface dependencies using variables of the form rc_before/after/use/need/provide_ifname. This is unnecessary since openrc already supports rc_net_ifname_need/use/before/after/provide. This commit updates the documentation to use this more generally supported form.
2012-02-18Fix meaning of "provide net"William Hubbs
I was informed that "provide net" should mean that there is network communication outside the local computer. In this case, the loopback interface can't "provide net", but there needs to be a way for other processes to know that the loopback interface is active. To this end, this commit makes the loopback "provide lo" and all other interfaces "provide net".
2012-02-18hwclock: set the hardware clock on shutdownWilliam Hubbs
Previously, the default on linux systems was to not set the hardware clock to match the system clock during shutdown. This changes that default to be consistent with *bsd and swclock.
2012-02-17hwclock: Clarify documentationWilliam Hubbs
The clock_hctosys and clock_systohc settings really do not have anything to do with running an ntp daemon, so remove that reference from the documentation. Reported-by: Milos Ivanovic <milosivanovic@orcon.net.nz> X-Gentoo-Bug: 401433 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401433
2012-02-16Enable binfmt_misc for openvz containersWilliam Hubbs
Reported-by: Daniel Robbins <drobbins@funtoo.org> X-Gentoo-Bug: 401875 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401875
2012-02-16Replace hard coded reference to /etc with @SYSCONFDIR@William Hubbs
I found a reference to "/etc" in the procfs script. This changes that reference to @SYSCONFDIR@.
2012-02-13Allow localmount to run in openvz containersWilliam Hubbs
Reported-By: Daniel Robbins <drobbins@funtoo.org> X-Gentoo-Bug: 401063 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401063
2012-02-13Revert "Remove rc_parallel from rc.conf"William Hubbs
This reverts commit 695f3886fb2d255e64387ce780be3c1cbc170fa9. Reported-by: Pacho Ramos <pacho@gentoo.org> X-Gentoo-Bug: 400741 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400741
2012-02-13Swap: fix redirectWilliam Hubbs
Swap should redirect stdout and stderr from swapon to null and not just stderr.
2012-02-13Improve swap handlingWilliam Hubbs
Modify the swap script so it starts before and stops after localmount. Also, on linux, this script should skip mounting swap on loopback. Add a swapfiles script which runs after localmount and is designed to activate additional swap space which could not be activated before localmount was run. This includes loopback swap on linux and swapfiles which are on local file systems that were not mounted when swap was activated initially. The start code does reactivate swap that is already active, but this is not an error condition. Reported-by: Giampaolo Tomassoni <giampaolo@tomassoni.biz> X-Gentoo-Bug: 401003 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401003
2012-02-12Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/openrcChristian Ruppert
2012-02-12Fix some more warningsChristian Ruppert
2012-02-12Fix typo in swap scriptWilliam Hubbs
2012-02-12Use size_t instead of intChristian Ruppert
2012-02-11Remove unused/useless function single_user()Christian Ruppert
2012-02-10termencoding: change "need root" to "use root"William Hubbs
This allows root to be removed from the boot runlevel which is needed sometimes when the root fs is mounted read-only. Reported-By: Maxim Kammerer <mk@dee.su> X-Gentoo-Bug: 400921 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400921
2012-02-10root.in: split a long line for readabilityWilliam Hubbs