summaryrefslogtreecommitdiff
path: root/src/librc/librc.c
Commit message (Collapse)AuthorAge
* librc: do not allow "." and ".." as runlevel namesWilliam Hubbs2013-10-21
| | | | | | | | The rc_runlevel_exists function was attempting to treat "." and ".." as valid runlevels; however, this should not be allowed. X-Gentoo-Bug: 488710 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=488710
* librc: fix a read off-by-one bugNatanael Copa2013-10-04
| | | | | | | | | We should first check if we are within bounds and then read rather than the opposite. This makes valgrind happy. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* Fix stacked runlevel supportAlexander V Vershilov2013-09-20
| | | | | | | | | | | | | | | Patch was provided by Max Hacking <max.gentoo.bugzilla@hacking.co.uk> and slightly fixed by Alexander Vershilov <qnikst@gentoo.org> and William Hubbs <williamh@gentoo.org>. Fixes: 1). Rebase to newest OpenRC version. 2). Remove code style fixes. Port to currect code style. 3). Fix rc_runlevel_stack instead of introducing new function. 4). Make get_runlevel_chain a private function. X-Gentoo-Bug: 467368 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467368
* Fix autodetection of lxcNatanael Copa2013-04-09
| | | | | | | | | The /proc/1/environ contains various \0 terminated strings. The current code will only work when the search string is in the first of those. To fix this we look for strings in entire buffer. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
* Bring Back prefix supportWilliam Hubbs2012-07-26
| | | | | We now have a team member who is interested in OpenRC on prefix, so I am bringing it back to the main tree.
* 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.
* Fix some more warningsChristian Ruppert2012-02-12
|
* add support for extra_stopped_commandsWilliam Hubbs2011-11-16
|
* add auto detection for lxcWilliam Hubbs2011-11-07
| | | | | | Reported-by: Francesco Riosa <francesco+gentoo_bugzilla@pnpitalia.it> X-Gentoo-Bug: 384151 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=384151
* Fix rc_service_value_get() to return multiple lines as wellChristian Ruppert2011-07-13
| | | | | | | | | | | As introduced in bug 372547 using service_get_value() in the init scripts or using rc_service_value_get() directly will only return one line. This patch fixes it by using the new rc_getfile() function, it returns even multiple lines. We're still using a char *, so the lines will be appended instead of added into new element. X-Gentoo-Bug: 372547 X-Gentoo-Bug-URL: http://bugs.gentoo.org/372547
* drop useless "All rights reserved" noticeMike Frysinger2011-06-29
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* librc: tweak style: foo () -> foo()Mike Frysinger2011-05-28
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fix rc_service_extra_commands return valueJames Le Cuirot2011-04-27
| | | | | | | | | If there were no extra commands, rc_service_extra_commands returned a list containing a single empty string. This changes that to return an empty list, which is more consistent with what you would expect. X-Gentoo-Bug: 360013 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360013
* fix list returned by rc_service_extra_commandsWilliam Hubbs2011-04-27
| | | | | | | | | | | | | | This function was returning the setting of the variable $opts, which is not correct. $opts was used in baselayout-1, but it is replaced by $extra_commands and $extra_started_commands in openrc. This does not appear to break backward compatibility since this function does not appear to be used anywhere in the openrc code. Thanks to James Le Cuirot for the original patch. X-Gentoo-Bug: 360013 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360013
* Document that rc_sys_v{1,2} should not be used outside of OpenRC.Robin H. Johnson2011-01-17
|
* Style fix: "char *foo" not "char* foo".Robin H. Johnson2011-01-17
|
* Style fix: /* */ comments not // comments.Robin H. Johnson2011-01-17
|
* Style fix: "while (" not "while(".Robin H. Johnson2011-01-17
|
* Style fix: "if (" not "if(".Robin H. Johnson2011-01-17
|
* Clean up all trailing whitespace in src/.Robin H. Johnson2011-01-17
|
* Make sure old rc_sys code never runs if the rc_sys variable exists.Robin H. Johnson2011-01-05
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Remove broken automatic LXC subsystem detection.Robin H. Johnson2011-01-05
| | | | | | | | | | | 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>
* Implement explicit selection of subsystem types.Robin H. Johnson2011-01-05
| | | | | | | | | | | - 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>
* random spelling fixesMike Frysinger2010-01-08
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Add support for Linux Containers, fixes #202.Roy Marples2009-11-04
| | | | Patch by bug reporter.
* Don't quote optsRoy Marples2009-09-21
|
* Add runlevel stacking, #88Roy Marples2009-05-02
| | | | | This implementation has the limitation that you cannot have a stacked runlevel and service of the same name in a runlevel.
* Add (c) to CopyrightRoy Marples2009-05-01
|
* Improve style for KNFRoy Marples2009-04-23
|
* Set errno when service does not exist better.Roy Marples2009-02-28
|
* Clean up some compiler warnings.Roy Marples2009-01-29
|
* Remove coldplug and just have hotplug which is a list of allowed/disallowed ↵Roy Marples2008-10-10
| | | | services. Makes things much easier.
* sysinit is now a real runlevel that handles things like udev, dmesg andRoy Marples2008-10-10
| | | | | | | | | | | mounting various bits in /dev and /sys. init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems) To make development of this easier we now return an empty RC_STRINGLIST instead of a NULL for empty things. If you don't have a udev init script installed, don't reboot your box OR roll back to an older OpenRC version.
* Add new OpenVZ detection codeRoy Marples2008-08-19
|
* No need to include this.Roy Marples2008-06-05
|
* Give an error when running zap as a generic user.Roy Marples2008-04-08
|
* Merge branch 'master' of git@git.overlays.gentoo.org:proj/openrcRoy Marples2008-03-28
|
* Support XEN on NetBSDRoy Marples2008-03-28
|
* Remove rc_service_start/stop from librc as they block and unmask signals. ↵Roy Marples2008-03-28
| | | | The application may not wish this behaviour and should fork/exec the service itself.
* Add license blurb to a few files and append my email to my name.Roy Marples2008-03-26
|
* Fix adding services to the boot runlevel, #43Roy Marples2008-03-24
|
* add missing rc_stringlist_new/rc_sys hidden defsMike Frysinger2008-03-24
|
* Fix returning a service descriptions.Roy Marples2008-03-23
|
* Add rc-service and update all softlevel refs to runlevel.Roy Marples2008-03-19
|
* Fix define nameRoy Marples2008-03-19
|
* Return scheduled services correctly.Roy Marples2008-03-19
|
* Make rc_getline private and save it's buffer so it's sort of like getline ↵Roy Marples2008-03-17
| | | | from glibc.
* init some vars.Roy Marples2008-03-17
|
* This should be a fixed buffer.Roy Marples2008-03-17
|
* Punt the rc_strcatpaths function and use snprintf instead to save on ↵Roy Marples2008-03-17
| | | | expensive malloc calls.