Commit Graph

89 Commits

Author SHA1 Message Date
Austin S. Hemmelgarn
80d3928b0d cgroups: Add the hugetlb, net_cls and pids controllers
Note from WilliamH: I slightly rearranged the code and added the
settings in rc.conf.

X-Gentoo-Bug: 555488
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555488
2015-10-06 15:05:35 -05:00
William Hubbs
bbabf546f9 Document bash's handling of ulimit options
When bash is used in posix mode for the shell, the ulimit command uses
a block size of 512 bytes for the -c and -f options.

X-Gentoo-Bug: 549238
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=549238
2015-05-22 09:43:51 -05:00
William Hubbs
a15fa1a3b1 Rework supervisor integration framework
The original way of doing this allowed users to change the supervisor in
conf.d/*. This changes this so that the supervisor setup can be done in
the service script itself.
2015-05-11 09:44:06 -05:00
William Hubbs
0198affc74 The rc_supervisor variable is a service configuration variable
This variable should not be changed globally unless you really know what
you are doing.
2015-05-08 12:29:26 -05:00
William Hubbs
abef2fcb2d Make the default start, stop and status functions overridable
This will make it possible to add support for supervision suites such as
runit and s6.
2015-05-08 11:39:39 -05:00
William Hubbs
c709e6077c Add support for systemd-nspawn containers
This adds support for running OpenRC in a container created by
the systemd-nspawn utility.

This fixes #52.

X-Gentoo-Bug: 548058
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058
2015-05-01 09:04:07 -05:00
William Hubbs
72186ea3bb etc/rc and etc/rc.shutdown: change references from rc to openrc 2014-12-07 19:07:11 -06:00
Svante Signell
203b754f84 add missing files for GNU/Hurd 2014-10-23 13:00:24 -05:00
William Hubbs
24d82d9ff1 rc.conf: document rc_verbose 2014-08-11 12:57:23 -05:00
William Hubbs
e0e1f2a4da rc.conf: typo fix 2014-03-14 22:18:25 -05:00
William Hubbs
d0186d422c rc.conf: document rc_nocolor setting 2014-03-09 15:37:38 -05:00
William Hubbs
7230b29bf3 rc.conf: Sync list of network file systems with actual defaults
I would like to thank Aaron Ten Clay <aarontc@aarontc.com> for pointing
this out; this is based on a patch he submitted.

X-Gentoo-Bug: 491384
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=491384
2013-12-08 13:40:23 -06:00
Steven Chamberlain
766d71c2d3 Begin port to GNU/kFreeBSD
This is just a minimal port to get Debian up and running; the rest will
be done later.
2013-10-30 01:40:03 -05:00
Gary
9ebd5a6aff Add support for DragonFly BSD 2013-07-25 22:33:24 -05:00
Alexander Vershilov
c984506537 add cgroup cleanup support
This adds the ability to kill all processes within a service's cgroup
when that service is stopped or restarted.
2013-04-25 16:59:19 -05:00
William Hubbs
66dd88d6f6 config: move rc_fuser_timeout to rc.conf
I was told that fuser does exist on *bsd, so this will need to bee
supported there. This moves the timeout setting to rc.conf.
2013-03-12 14:16:41 -05:00
William Hubbs
6794441224 Make fuser command time out
This avoids situations in which fuser hangs because of open files on
remote file systems when the remote system goes down.
I have also passed this bug on to the maintainers of psmisc since it
should really be fixed in fuser.
This is based on a patch submitted by evermind@tuxfamily.org

Reported-by: evermind@tuxfamily.org
X-Gentoo-Bug: 455458
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=455458
2013-03-12 12:57:44 -05:00
William Hubbs
fac96b4df4 cgroups: major update to cgroups support
This reworks cgroups support so we have one variable in rc.conf for each
controller instead of each setting.

Also we add support for all of the possible cgroup controllers.

I would like to thank Alexander Vershilov for his help with testing and
reworking this code.
2013-02-19 17:09:30 -06:00
William Hubbs
a55eb3965e cgroups: remove comment about suspend for cpu_shares setting 2013-02-17 11:09:02 -06:00
William Hubbs
405dfea7ad cgroups: document kernel requirement for cpu controller settings 2013-02-16 16:11:33 -06:00
William Hubbs
31bcc6bee4 Typo Fix 2012-12-03 14:59:22 -06:00
Alexander Vershilov
4f19c2f512 Support cpu usage management for Linux
This commit was modified by William Hubbs as follows:

- The paths in the cgroup fs were put into variables to ease
  maintenance.
- Documentation was added to rc.conf.Linux.
- The services were added originally to openrc/svcname cgroups under the
  controller cgroups, but this left an "openrc" cgroup which was unused.
  Now they are added to individual cgroups with the name openrc_${RC_SVCNAME}.
2012-11-12 10:58:00 -06:00
Robin H. Johnson
1b0130961e checkbashisms: clean up export statements.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2012-11-07 00:22:33 +00:00
William Hubbs
eff07c48b7 Expand the documentation for service configuration variables
The original documentation for these variables did not give an example
of what to do if the service had a name that had illegal characters in
it, so this commit adds an example. There was no bug report; this was
suggested by Tobias Klausmann.
2012-10-30 11:12:20 -05:00
William Hubbs
e641b43849 Bring Back prefix support
We now have a team member who is interested in OpenRC on prefix, so I am
bringing it back to the main tree.
2012-07-26 10:54:48 -05:00
William Hubbs
3df0bd64cb cgroups: allow users to turn off creation of controller cgroups
This adds a switch to not create the one-cgroup-per-controller setup of
cgroups.

reported-by: davidweb@klaftenegger.de
X-Gentoo-Bug: 423317
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=423317
2012-07-03 13:49:58 -05:00
William Hubbs
3247184d86 Remove prefix support
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-21 07:27:16 -06:00
William Hubbs
32c506a4c8 Drop rc_sys definition from build system 2012-02-20 20:13:11 -06:00
William Hubbs
8199dee8d6 Revert "Remove rc_parallel from rc.conf"
This reverts commit 695f3886fb.

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-13 11:29:19 -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
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
695f3886fb Remove rc_parallel from rc.conf
rc_parallel has never been considered a stable feature of openrc. To
that end, I am removing the documentation for this feature from
rc.conf.

It is still available, but bugs against it are not considered stable
blockers, and it should only be used currently by developers and users
who are willing to test the feature.

X-Gentoo-Bug: 391945
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=391945
2011-11-26 17:33:10 -06:00
William Hubbs
d8bbeb184f CGroups: create the openrc cgroup hierarchy
Openrc will create a cgroup hierarchy called openrc which will have all
services it starts and all subsystems attached to it. If you need other
groups/hierarchies, please use libcgroup.
2011-11-20 14:07:46 -06:00
William Hubbs
0bbb764f70 Change RC_CGROUP to lower case 2011-11-17 16:42:03 -06:00
Patrick Lauer
20df56f0b2 Add CGroup support
X-Gentoo-Bug: 390297
X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=390297
2011-11-17 16:22:59 -06:00
Mike Frysinger
9a539ebbe1 further clean up OS differences in makefiles
No need for if() logic.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-20 14:32:37 -05:00
William Hubbs
9c77502f96 Make variable references in Makefiles consistent
Some variable references were written as $(foo), but the majority were
written as ${foo}. This commit changes all of the variable references
to using braces.
2011-10-19 12:22:23 -05:00
William Hubbs
ecf77254bb consolodate Makefiles
The tree contained many operating system specific Makefiles which were
being included in other Makefiles. This commit removes those and adds
the code to the makefiles which included them using make's conditional
processing.

X-Gentoo-Bug: 387441
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=387441
2011-10-18 03:23:00 -05:00
William Hubbs
fe6cd23287 rc_log_path should be quoted 2011-07-06 18:38:52 -05:00
Christian Ruppert
05e3251467 Rename rc_logger_path to rc_log_path 2011-07-06 21:16:15 +02:00
Christian Ruppert
48dcc55b65 Document the new rc_logger_path option 2011-07-06 00:47:15 +02:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
William Hubbs
372bae3213 make rc_sys system specific
This rearranges the configuration files so it is more clear that the
rc_sys setting is system specific.

X-Gentoo-Bug: 363957
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363957
2011-04-18 14:42:02 -05:00
William Hubbs
c9912942f0 update documentation for rc_sys
Originally the plan was to deprecate this code, but this will not be
happening. There are some subsystems which can still be autodetected, so
we are keeping this code and allowing users to override the automatic
detection with this variable as well as set it to other subtypes we
cannot autodetect.

X-Gentoo-Bug: 357247
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=357247
2011-03-21 23:04:08 -05:00
Mike Frysinger
d7e48fe643 rc_sys: let default behavior be automagic
The default rc_sys behavior was changed to always require manual
intervention by users.  This pretty much breaks all of the diff
system variants out there if people don't explicitly edit their
rc.conf file ahead of time.  We should have things work "out of
the box" as much as possible and reasonable.

X-Gentoo-Bug: 357247
X-Gentoo-Bug-URL: http://bugs.gentoo.org/357247
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-14 20:35:08 -05:00
William Hubbs
0f3d6a01c7 remove references to the migration guide
The openrc code base is not gentoo specific, so I feel that we should
not refer to the migration guide in the comments inside the configuration
files.
2011-03-05 00:11:24 -06:00
William Hubbs
3fca6bd027 allow default rc_sys value to be set at build time
This allows the default value of rc_sys to be set when openrc is
compiled. This will allow openrc to be installed, e.g. on vserver guests
and will allow them to be rebooted without the need to edit rc.conf.

This patch is a combined effort between myself and Robin Johnson.

X-Gentoo-Bug: 357247
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=357247
2011-03-05 00:04:06 -06:00
William Hubbs
202fa20cbc fix typo 2011-03-03 15:06:39 -06:00
Mike Frysinger
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05:00
Robin H. Johnson
b113ad49e9 Bug #351783: more documentation for rc_sys. But really see the OpenRC migration guide where this is covered. 2011-01-16 22:48:10 +00:00