From 6615eb4b689d7aa1d047bd9ed75eca80beac9767 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sat, 2 May 2009 12:26:45 +0100 Subject: Add runlevel stacking, #88 This implementation has the limitation that you cannot have a stacked runlevel and service of the same name in a runlevel. --- man/rc-update.8 | 14 +++++++++++--- man/rc.8 | 9 +++++---- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'man') diff --git a/man/rc-update.8 b/man/rc-update.8 index 6cad29e..6fad02c 100644 --- a/man/rc-update.8 +++ b/man/rc-update.8 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007-2009 Roy Marples +4.\" Copyright (c) 2007-2009 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Jan 10, 2009 +.Dd May 2, 2009 .Dt RC-UPDATE 8 SMM .Os OpenRC .Sh NAME @@ -30,10 +30,12 @@ .Nd add and remove services to and from a runlevel .Sh SYNOPSIS .Nm +.Op Fl s , -stack .Ar add .Ar service .Op Ar runlevel ... .Nm +.Op Fl s , -stack .Ar delete .Ar service .Op Ar runlevel ... @@ -51,7 +53,8 @@ All services must reside in the .Pa /etc/init.d or .Pa /usr/local/etc/init.d -directories. They must also conform to the OpenRC runscript standard. +directories. +They must also conform to the OpenRC runscript standard. .Pp .Bl -tag -width "Fl a , -delete service" .It Ar add Ar service @@ -78,6 +81,11 @@ Forces an update of the dependency tree cache. This may be needed in the event of clock skew (a file in /etc is newer than the system clock). .El +.Pp +If the +.Fl s , -stack +option is given then we either add or remove the runlevel from the runlevel. +This allows inheritance of runlevels. .Sh SEE ALSO .Xr rc 8 , .Xr rc-status 8 diff --git a/man/rc.8 b/man/rc.8 index 1e97762..ab161fe 100644 --- a/man/rc.8 +++ b/man/rc.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 13, 2009 +.Dd May 2, 2009 .Dt RC 8 SMM .Os OpenRC .Sh NAME @@ -35,10 +35,11 @@ .Sh DESCRIPTION .Nm first stops any services that are not for the runlevel and then starts any -services added by +services in the runlevel and from stacked runlevels added by .Nm rc-update -that are not currently started. If no runlevel is specified then we use the -current runlevel the system is currently in. +that are not currently started. +If no runlevel is specified then we use the current runlevel the system +is currently in. .Pp There are some special runlevels that you should be aware of: .Bl -tag -width "shutdown" -- cgit v1.2.3