Commit Graph

40 Commits

Author SHA1 Message Date
Alexander Vershilov
b46747f998 Add module for cgroup processing
sh/rc-cgroup.sh.in: new script to handle cgroup processing
sh/rc-cgroup.sh.in: do not use grep or cut (modification by William Hubbs)
sh/runscript.sh.in: use the cgroup script
2013-02-16 01:28:35 -06:00
William Hubbs
82d3918d7a move rc_svcdir to /run/openrc on Linux systems
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
2012-05-14 13:49:06 -05:00
Robin H. Johnson
c75352af3d sh/tmpfiles: tmpfiles.d support.
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-12 01:37:31 -07: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
5066d40ac8 Use pattern rules instead of suffix rules
Rework the makefiles to use pattern rules instead of suffix rules.
This is the preferred way to write implicit rules according to the gnu
make manual.
2011-10-29 09:43:24 -05: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
e8413733c1 Revert "remove functions.sh symbolic link in init.d"
This reverts commit f4407ac83d.
2011-06-27 12:11:01 -05:00
William Hubbs
f4407ac83d remove functions.sh symbolic link in init.d 2011-06-27 11:56:12 -05:00
Roy Marples
c0fd1b49e4 Move non compiled libraries from /lib/rc to /libexec/rc
OpenRC version is now stored as plaintext in /libexec/rc/version

Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.
2009-05-23 20:38:12 +01:00
Roy Marples
5510451bac We need to replace @LIB@ here. 2008-06-21 14:10:59 +00:00
Roy Marples
5ba6f0a628 We need to ensure that the init script started is correct, translating symlinks. This has a new rule - multiplexed services must exist in the same dir as the master sript. So we need to ensuret that net.lo(0) is the real script and not a symlink itself. This fixes Gentoo #219526. 2008-04-29 10:25:45 +00:00
Roy Marples
c807b3a815 INITDIR should already be prefixed. 2008-03-25 17:19:41 +00:00
Roy Marples
4d6b84290a These now need to be prefixed. 2008-03-25 17:17:15 +00:00
Roy Marples
08791ec4a2 INITDIR should already be prefixed. 2008-03-25 17:11:44 +00:00
Roy Marples
55eb3794fb Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS. 2008-03-25 14:06:05 +00:00
Mike Frysinger
486d517674 setup a bit of a test framework 2008-03-24 07:17:05 +00:00
Roy Marples
6d2e1f7add Fix building on Linux. 2008-03-19 19:43:08 +00:00
Roy Marples
a689b66023 Add tunable SYSCONFDIR 2008-03-05 12:27:11 +00:00
Roy Marples
61c476e72d Use exlicit make targets, not directory contents. 2008-03-03 12:34:51 +00:00
Roy Marples
67c5fd6bb8 Ensure that our scripts call prefixed runscript. 2008-03-02 21:14:01 +00:00
Roy Marples
a135d0d93b Fix installing into PREFIX. 2008-03-01 22:12:33 +00:00
Roy Marples
f092045650 Support the use of PREFIX and PKG_PREFIX. 2008-02-28 11:08:49 +00:00
Roy Marples
c2648ca5f5 Makefile SH variable now tweaks the default shell used by our scripts. 2008-02-27 20:29:32 +00:00
Roy Marples
b054a7251b INSTALLAFTER needs to be defined before we include our mk's to work. 2008-01-13 17:49:29 +00:00
Roy Marples
f755187020 Change lib name during make, not install. 2008-01-13 13:55:23 +00:00
Roy Marples
6ca21b4c6a More make fixes 2008-01-10 16:57:05 +00:00
Roy Marples
4314784520 Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's. 2008-01-10 16:35:59 +00:00
Roy Marples
ddb3ab4704 Use LIBNAME for multilib so as not to conflict with LIB 2008-01-05 21:05:19 +00:00
Roy Marples
cc96c0933d Juggle the Makefiles so that sh knows about NET_LO 2008-01-03 15:48:33 +00:00
Roy Marples
19765f289c Move the linking of files in /etc/init.d into the sh/Makefile so that install -jN works. 2008-01-03 14:49:34 +00:00
Roy Marples
cbea91cae5 Remove rc-help.sh and replace with a man page for runscript 8. 2007-12-20 17:39:13 +00:00
Roy Marples
a010d0bb69 Remove the try and check_statedir functions 2007-12-14 14:19:03 +00:00
Roy Marples
ac9279cc0d Massive whitespace cleanup 2007-11-28 15:45:03 +00:00
Roy Marples
d81def80b0 Move /etc/conf.d/rc to /etc/rc.conf.
Lowercase all configurable variables, non configurations remain uppercase.
Replace rc_env_bool with rc_yesno.
Split localmount info procfs (Linux) and dumpon, savecore (BSD)
2007-11-23 12:04:11 +00:00
Roy Marples
88ccccc22a Move runlevel and lib logic to the sub Makefiles 2007-11-19 16:42:28 +00:00
Roy Marples
5f8cf73b22 Our build chain now works with GNU and BSD make implementations 2007-11-19 13:48:43 +00:00
Roy Marples
77f9015f0b /lib/rcscripts -> /lib/rc 2007-09-19 13:53:40 +00:00
Roy Marples
5af58b4514 Rewrite the core parts in C. We now provide librc so other programs can
query runlevels, services and state without using bash. We also provide
libeinfo so other programs can easily use our informational functions.

As such, we have dropped the requirement of using bash as the init script
shell. We now use /bin/sh and have strived to make the scripts as portable
as possible. Shells that work are bash and dash. busybox works provided
you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you
should disable find too.
zsh and ksh do not work at this time.

Networking support is currently being re-vamped also as it was heavily bash
array based. As such, a new config format is available like so
config_eth0="1.2.3.4/24 5.6.7.8/16"
or like so
config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'"

We will still support the old bash array format provided that /bin/sh IS
a link it bash.

ChangeLog for baselayout-1 can be found in our SVN repo.
2007-04-05 11:18:42 +00:00