summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Release openrc-0.10.1openrc-0.10.1William Hubbs2012-05-24
|
* rc: fix inverted string compare logicMike Frysinger2012-05-24
| | | | | | | X-Gentoo-Bug: 417227 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=417227 Reported-by: sphakka <marcoep@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Release openrc-0.10openrc-0.10William Hubbs2012-05-22
|
* rc: fix thinko in applet collapseMike Frysinger2012-05-16
| | | | | | | We want to lookup the service based on the applet name. Reported-by: Christian Ruppert <idl0r@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* local is only allowed in functionsChristian Ruppert2012-05-17
|
* move rc_svcdir to /run/openrc on Linux systemsWilliam Hubbs2012-05-14
| | | | | | | | | | | | | | | If you are not using linux, this should not affect you. If you are using linux, from this point forward, openrc requires the /run directory to be a mounted tmpfs. If it is, you can run @LIBEXECDIR@/sh/migrate-to-run.sh as root to migrate your dependency tree and state information to the new location. If it is not, you must create the /run directory as root with permissions 755 then reboot your system. reported-by: Maxim Kammerer <mk@dee.su> X-Gentoo-Bug: 401059 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401059
* do not umount /usr on linux systemsWilliam Hubbs2012-05-13
| | | | | | | | | We can't really umount /usr on linux systems because /usr is a special case if it is a separate filesystem which is handled by an initramfs. reported-by: tamiko+GENTOO@kyomu.43-1.org X-Gentoo-Bug: 415523 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=415523
* rc: collapse the applet if statements into a single array walkMike Frysinger2012-05-06
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* add a new ARRAY_SIZE macro and use itMike Frysinger2012-05-06
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* split out librc-independent helpers into a dedicated header fileMike Frysinger2012-05-06
| | | | | | | Many of these helpers are not special to librc, so split them out so they can be used in all source trees (including libeinfo). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* net: Be sure to install the ip6rd module.Robin H. Johnson2012-05-03
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* clarify the message about /proc being already mountedWilliam Hubbs2012-05-02
| | | | | | This message was being taken by some users as an error, so I have removed the part about "skipping..." Hopefully this will make the message less alarming.
* Do not try to remount /run read onlyAlexey Shvetsov2012-05-02
| | | | | On a diskless system, doing this causes the system to lock up during shutdown.
* fix references to functions.shWilliam Hubbs2012-04-26
| | | | | | | There were a couple of places where we were sourcing functions.sh in @SYSCONFDIR@/init.d. This is only a backward compatibility symlink, so it should not be used for openrc. The correct place to source this from is @LIBEXECDIR@/sh.
* Change the working directory for depend onlyWilliam Hubbs2012-04-26
| | | | | | We already have a special case for depend processing, so we should change the working directory there only. This prevents us from forcing all init scripts to be run in the init directory.
* Revert "Revert "Let runscript enter the service dir before expand globs""William Hubbs2012-04-26
| | | | | | This reverts commit f971c4c0b5e45500f1255f2e076f2c101d2f9281. After further discussion, this is a good first step toward a fix, so I am putting it back.
* Revert "Let runscript enter the service dir before expand globs"William Hubbs2012-04-26
| | | | | This reverts commit 9d0dce35c3e46b4515499f3f0f1c47645be0bc48. This is being reverted due to the fix still being under discussion.
* Let runscript enter the service dir before expand globsChristian Ruppert2012-04-26
| | | | | | | | | | | | Enter the service directory, like gendeps.sh does, to make sure globs are expanded in it rather than in /. That makes sure that globbing like "need *" will end up in all files of the init.d directory. Signed-off-by: Christian Ruppert <idl0r@gentoo.org> Reported-by: Guenther Brunthaler <gb_about_gnu@gmx.net> X-Gentoo-Bug: 412677 X-Gentoo-Bug-URL: https://bugs.gentoo.org/412677
* Reduce overhead by leaving rc_deptree_update_needed() as soon as possibleChristian Ruppert2012-04-26
| | | | | | There's no need to check any further if we're returning true anyway. Signed-off-by: Christian Ruppert <idl0r@gentoo.org>
* Disable some questionable linesChristian Ruppert2012-04-26
| | | | | | | | | | | | | | | | | | | Caused by bug 412589 I was looking at the do_mark_service() function and quickly found that the segfault is caused by a strlen() call against a NULL pointer. I also noticed it's using "/exclusive/%s.%s" so svcname.pid, all other functions are just using the svcname.. So it seems that svcname.pid was/is never used and thus not necessary at all. In relation to the above, the if statement in the do_mark_service() function ("if (ok && svcname && strcmp(svcname, service) == 0) {") needs to be fixed/improved as svcname and service are almost always equal, see my comment in the function for further details. Signed-off-by: Christian Ruppert <idl0r@gentoo.org> Reported-by: Patrick McLean <chutzpah@gentoo.org> X-Gentoo-Bug: 412589 X-Gentoo-Bug-URL: https://bugs.gentoo.org/412589
* WhitespaceChristian Ruppert2012-04-24
|
* Remove duplicate getenv("RC_SVCNAME") callChristian Ruppert2012-04-24
|
* init.d/procfs: posix compatibility fixSergei Trofimovich2012-04-16
| | | | | | | | | | | | | | | | | I've noticed in at boot: # /etc/init.d/procfs restart procfs | * WARNING: you are stopping a boot service procfs |[: 308: unexpected operator Which calls $ /bin/dash -c '[ "$RC_SYS" == "OPENVZ" ] && echo "ovz" || echo "nope"' [: 1: unexpected operator nope Fixed by using '='. X-Gentoo-Bug: 412237 x-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=412237
* network scripts need sysfs on linux systemsWilliam Hubbs2012-04-03
| | | | | Adjust the previous commit so that on linux systems the network scripts need sysfs.
* net/ifconfig, net/iproute: need sysfsRobin H. Johnson2012-04-03
| | | | | | | | | | 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>
* Change the method for calculating the interface metric for linux systemsWilliam Hubbs2012-04-01
| | | | | | | | | | | | | | 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
* init.d/fsck: only check local file systemsWilliam Hubbs2012-03-29
| | | | | | | | | | | 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
* librc: Do not output error messages from within the library.William Hubbs2012-03-26
| | | | | | | | | 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
* Add -lxc keyword to sysctl script for linux systemsWilliam Hubbs2012-03-26
| | | | | | Kernel parameters should not be set from inside a lxc guest. Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com>
* localmount: Only unmount local filesystems if we are shutting downWilliam Hubbs2012-03-25
| | | | | | | | | 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
* sysctl: use @SYSCONFDIR@ in the scripts instead of hard coding /etcWilliam Hubbs2012-03-24
|
* Allow files in sysctl.d to override sysctl.confWilliam Hubbs2012-03-24
| | | | | | 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
* init.d/sysctl.Linux: do not use sysctl -qDiego Elio Pettenò2012-03-24
| | | | | | | | | | | | | 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>
* Document the required_dirs and required_files variablesWilliam Hubbs2012-03-24
|
* doc/net.example: Add warnings that changing MAC on bonds can break things.Robin H. Johnson2012-03-19
| | | | | | | | | | | | | 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>
* doc/net.example: Update bonding exampleRobin H. Johnson2012-03-19
| | | | | | | | | | | | | 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>
* sh/tmpfiles: Upstream clarifications & quoting fixes.Robin H. Johnson2012-03-12
| | | | | | | | | | | | 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>
* sh/tmpfiles: tmpfiles.d support.Robin H. Johnson2012-03-12
| | | | | | | | | | | | | | | 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>
* net/ifconfig: The location of the ifconfig binary has changedRobin H. Johnson2012-03-11
| | | | | | | | | | | 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
* Runscript: allow extra_commands to be run in chrootsWilliam Hubbs2012-03-03
| | | | | | | | | | | | | 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
* Bug #405491: _exists can give a false negative since /proc/net/dev can be ↵Robin H. Johnson2012-03-02
| | | | | | slow to update sometimes when interfaces are added rapidly. Use sysfs instead. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Add a potential future problem I can see with metric calculation and ↵Robin H. Johnson2012-03-02
| | | | | | interfaces that change often. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Clarify the meaning of the clock_hctosys variableWilliam Hubbs2012-03-02
| | | | | | Reported-by: Ian Abbott <ian@abbott.org> X-Gentoo-Bug: 405861 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=405861
* librc: make rc_proc_getent available for all operating systemsWilliam Hubbs2012-02-25
| | | | | | 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.
* Fix rc_proc_getent() undeclared on BSDChristian Ruppert2012-02-25
| | | | | | X-Gentoo-Bug: 405713 X-Gentoo-Bug-URL: https://bugs.gentoo.org/405713 Reported-by: Dmitri Bogomolov <4glitch@gmail.com>
* Skip pam if running as rootWilliam Hubbs2012-02-23
| | | | | | 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
* Remove prefix supportopenrc-0.9.9William Hubbs2012-02-21
| | | | | I spoke with the prefix team sometime back and was told that they do not have an interest in using OpenRC on prefix systems.
* Drop rc_sys definition from build systemWilliam Hubbs2012-02-20
|
* rc: remove calls to rc_sys_v2 and rc_sys_v1William Hubbs2012-02-20
| | | | | These separate calls are no longer needed since we do not warn about falling back to automatic detection.
* remove the warning about falling back to autodetectionJory A. Pratt2012-02-20
|