Difference between revisions of "OpenRC (Funtoo)"

From Funtoo Linux
Jump to: navigation, search
m (moved Funtoo OpenRC to OpenRC (Funtoo): better alphabetization)
m (Reverted edits by 91.121.27.33 (talk) to last revision by P4)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Funtoo OpenRC is the current implementation of the system startup and init script framework for Funtoo Linux.
+
Funtoo OpenRC is the current implementation of the system startup and init script framework for Funtoo Linux. Official development sources can be found on [http://www.github.com/funtoo/openrc GitHub].
  
Funtoo OpenRC independently-maintained, forked version of the OpenRC init scripts. Funtoo Linux-specific changes generally relate to [[Funtoo Linux Networking|Funtoo network configuration]].
+
Funtoo OpenRC is an independently-maintained, forked version of the [http://roy.marples.name/projects/openrc/wiki OpenRC] init scripts ([http://www.gentoo.org/proj/en/base/openrc/ now maintained by Gentoo]). Funtoo Linux-specific changes generally relate to [[Funtoo Linux Networking|Funtoo network configuration]].
  
 
== Commands ==
 
== Commands ==
  
 
; rc-update
 
; rc-update
: add or remove a service from a particular runlevel, or stack runlevels
+
: add or remove a service from a particular runlevel, or implement [[Stacked Runlevels]]
 
; rc-status
 
; rc-status
 
: show current status of system services
 
: show current status of system services
 
; rc
 
; rc
 
: manage runlevel changes
 
: manage runlevel changes
 +
 +
== FAQ ==
 +
 +
=== How to I tell one startup script to depend on another? ===
 +
 +
The easiest way to do this is to modify the <tt>/etc/conf.d</tt> script that corresponds to the service that needs to depend on something else, so let's call this service <tt>this_service</tt>. Add the following to its conf.d file:
 +
 +
<pre>
 +
rc_need="other_service"
 +
</pre>
 +
 +
Now, <tt>this_service</tt> will depend on <tt>other_service</tt>.
 +
 +
=== OpenRC is ignoring dependencies and not reacting to dependency changes ===
 +
 +
This can happen when your system's time changes suddenly (maybe due to realizing your system clock is wrong and resetting it) and OpenRC dependency cache files are created with future dates. To clear the OpenRC cache, type:
 +
 +
<pre>
 +
# rc-update -u
 +
</pre>
 +
 +
Alternatively, you can perform this step manually:
 +
 +
<pre>
 +
# rm /libexec/rc/cache/*
 +
# rm /libexec/rc/init.d/deptree
 +
</pre>
 +
 +
Now regenerate the cache by typing:
 +
 +
<pre>
 +
# /libexec/rc/bin/rc-depend
 +
</pre>
 +
 +
The OpenRC dependency cache should now be up-to-date and OpenRC should behave properly again.
  
 
== History ==
 
== History ==
  
The Gentoo modular initscripts were created by Daniel Robbins for
+
The Gentoo modular init scripts were developed by Daniel Robbins for Gentoo Linux 1.0_rc6 during most of 2001 and released in September 2001 (TODO: add refs). After their development, the dependency-based init script system was maintained by a number of senior developers, starting with Azarah (Martin Schlemmer), with migration to the new init system assisted by Woodchip (Donnie Davies) who converted all ebuild init scripts to work with the new system. As Grant Goodyear notes:
Gentoo Linux 1.0_rc6, in development during most of 2001 and released
+
in September 2001 (need refs). After their development, the dependency-based initscript
+
system was maintained by a number of senior developers, starting with
+
Azarah (Martin Schlemmer), with migration to the new init system assisted
+
by Woodchip (Donnie Davies) who converted all ebuild init scripts to work
+
with the new system. As [http://www.gentoo.org/news/en/gwn/20040426-newsletter.xml Grant Goodyear notes]:
+
  
 
''My recollection is that one of woodchip's more impressive early feats was the
 
''My recollection is that one of woodchip's more impressive early feats was the
Line 30: Line 59:
 
''script in the Portage tree and committed new masked packages to await the
 
''script in the Portage tree and committed new masked packages to await the
 
''release of 1.0_rc6. Thanks to woodchip (and drobbins and azarah, of course) the
 
''release of 1.0_rc6. Thanks to woodchip (and drobbins and azarah, of course) the
''transition to the new init scripts was nearly painless.''
+
''transition to the new init scripts was nearly painless.'' <ref>http://www.gentoo.org/news/en/gwn/20040426-newsletter.xml</ref>
  
Roy Marples became a Gentoo/Linux developer in 2004 and maintained the modular
+
Roy Marples became a Gentoo/Linux developer in 2004 and maintained the modular network scripts for the Gentoo baselayout package. Towards the end of 2005, he became the primary maintainer for baselayout and the init scripts.
network scripts for the Gentoo baselayout package. Then towards the end of
+
2005, he became the the primary maintainer for baselayout and the initscripts.
+
  
At the start of 2007, Roy Marples announced the ongoing development of
+
At the start of 2007, Roy Marples announced the ongoing development of baselayout-2, containing a rewritten init script coded in C and allowing POSIX sh init scripts instead of forcing the use of bash. By mid 2007, Roy Marples had re-implemented the Gentoo init script design created by Daniel Robbins, using an entirely new code base. Alpha and pre-release baselayout-2 snapshots were added to Gentoo's Portage tree as an optional component.
baselayout-2, containing a rewritten initscript code in C and allowing POSIX sh
+
init scripts instead of forcing the use of bash. By Mid 2007 Roy Marples had
+
re-implemented the Gentoo init script design created by Daniel Robbins, using an
+
entirely new code base. Alpha and pre-release baselayout-2 snapshots were
+
added to Gentoo's Portage tree as an optional component.
+
  
Towards the end of 2007, Roy Marples retired as a Gentoo developer. Baselayout-2
+
Towards the end of 2007, Roy Marples retired as a Gentoo developer. Baselayout-2 was still in the pre stage, and aside from the gentoo-fbsd users, it was masked. However, Roy Marples desired to keep the baselayout-2 project moving forward as an independent project. The Gentoo Council permitted Roy Marples to release OpenRC under the 2-clause BSD license, managed by him as an external project.  
was still in the pre stage, and aside from the gentoo-fbsd users, it was masked.
+
However, Roy Marples desired to keep the baselayout-2 project
+
moving forward as an independent project. The Gentoo Council permitted Roy Marples to release OpenRC under the 2
+
clause BSD license, managed by him as an external project.  
+
  
Around mid-2010, Roy
+
Around mid-2010, Roy Marples decided to no longer maintain OpenRC. At this point, he transferred development back to Gentoo. However, Daniel Robbins continues to maintain an independent, forked version of OpenRC for Funtoo Linux, which includes a Funtoo-specific network configuration
Marples decided to no longer maintain OpenRC. At this point, he transferred
+
development back to Gentoo. However, Daniel Robbins continues to maintain an independent, forked version OpenRC
+
for Funtoo Linux, which includes a Funtoo-specific network configuration
+
 
system.
 
system.
 +
 +
= References =
 +
<references/>
  
 
[[Category:Projects]]
 
[[Category:Projects]]

Latest revision as of 16:50, 25 July 2012

Funtoo OpenRC is the current implementation of the system startup and init script framework for Funtoo Linux. Official development sources can be found on GitHub.

Funtoo OpenRC is an independently-maintained, forked version of the OpenRC init scripts (now maintained by Gentoo). Funtoo Linux-specific changes generally relate to Funtoo network configuration.

Contents

[edit] Commands

rc-update
add or remove a service from a particular runlevel, or implement Stacked Runlevels
rc-status
show current status of system services
rc
manage runlevel changes

[edit] FAQ

[edit] How to I tell one startup script to depend on another?

The easiest way to do this is to modify the /etc/conf.d script that corresponds to the service that needs to depend on something else, so let's call this service this_service. Add the following to its conf.d file:

rc_need="other_service"

Now, this_service will depend on other_service.

[edit] OpenRC is ignoring dependencies and not reacting to dependency changes

This can happen when your system's time changes suddenly (maybe due to realizing your system clock is wrong and resetting it) and OpenRC dependency cache files are created with future dates. To clear the OpenRC cache, type:

# rc-update -u

Alternatively, you can perform this step manually:

# rm /libexec/rc/cache/*
# rm /libexec/rc/init.d/deptree

Now regenerate the cache by typing:

# /libexec/rc/bin/rc-depend

The OpenRC dependency cache should now be up-to-date and OpenRC should behave properly again.

[edit] History

The Gentoo modular init scripts were developed by Daniel Robbins for Gentoo Linux 1.0_rc6 during most of 2001 and released in September 2001 (TODO: add refs). After their development, the dependency-based init script system was maintained by a number of senior developers, starting with Azarah (Martin Schlemmer), with migration to the new init system assisted by Woodchip (Donnie Davies) who converted all ebuild init scripts to work with the new system. As Grant Goodyear notes:

My recollection is that one of woodchip's more impressive early feats was the complete replacement of all of the init scripts in Portage for Gentoo Linux 1.0_rc6. Through 1.0_rc5 Gentoo had used fairly standard rc scripts modified from Stampede Linux, but for 1.0_rc6 Daniel Robbins (drobbins) and Martin Schlemmer (azarah) had created a new dependency-based init script system that is still used today. Within a span of days Donny rewrote every single init script in the Portage tree and committed new masked packages to await the release of 1.0_rc6. Thanks to woodchip (and drobbins and azarah, of course) the transition to the new init scripts was nearly painless. [1]

Roy Marples became a Gentoo/Linux developer in 2004 and maintained the modular network scripts for the Gentoo baselayout package. Towards the end of 2005, he became the primary maintainer for baselayout and the init scripts.

At the start of 2007, Roy Marples announced the ongoing development of baselayout-2, containing a rewritten init script coded in C and allowing POSIX sh init scripts instead of forcing the use of bash. By mid 2007, Roy Marples had re-implemented the Gentoo init script design created by Daniel Robbins, using an entirely new code base. Alpha and pre-release baselayout-2 snapshots were added to Gentoo's Portage tree as an optional component.

Towards the end of 2007, Roy Marples retired as a Gentoo developer. Baselayout-2 was still in the pre stage, and aside from the gentoo-fbsd users, it was masked. However, Roy Marples desired to keep the baselayout-2 project moving forward as an independent project. The Gentoo Council permitted Roy Marples to release OpenRC under the 2-clause BSD license, managed by him as an external project.

Around mid-2010, Roy Marples decided to no longer maintain OpenRC. At this point, he transferred development back to Gentoo. However, Daniel Robbins continues to maintain an independent, forked version of OpenRC for Funtoo Linux, which includes a Funtoo-specific network configuration system.

[edit] References

  1. http://www.gentoo.org/news/en/gwn/20040426-newsletter.xml
Personal tools
Namespaces

Variants
Actions
Categories
Toolbox
Stuff