author | Olivier Brunel
<jjk@jjacky.com> 2015-02-27 17:38:52 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2015-04-04 12:47:35 UTC |
parent | b75c62116e78538021c70efe8b1a304d74ad16b9 |
doc/aa-echo.pod | +3 | -3 |
doc/aa-enable.pod | +18 | -18 |
doc/anopa.pod | +11 | -11 |
diff --git a/doc/aa-echo.pod b/doc/aa-echo.pod index 8f76893..ec4f00a 100644 --- a/doc/aa-echo.pod +++ b/doc/aa-echo.pod @@ -32,9 +32,9 @@ Show help screen and exit. =item B<-n, --normal> -Show I<MESSAGE...> as reglar text, i.e. without any prefix or color. This can be -used for simple echo, but make sure to see how arguments making up I<MESSAGE...> -are processed. +Show I<MESSAGE...> as regular text, i.e. without any prefix or color. This can +be used for simple echo, but make sure to see how arguments making up +I<MESSAGE...> are processed. =item B<-T, --title> diff --git a/doc/aa-enable.pod b/doc/aa-enable.pod index df7407b..2caa8c1 100644 --- a/doc/aa-enable.pod +++ b/doc/aa-enable.pod @@ -4,8 +4,8 @@ aa-enable - Enable services, i.e. copy servicedirs to repodir =head1 SYNOPSIS -B<aa-enable> [B<-D>] [B<-r> I<repodir>] [B<-k> I<service>] [B<-S> I<sourcedir>] -[B<-s> I<sourcedir>] [B<-l> I<listdir>] [B<-n>] [B<-w>] [I<service...>] +B<aa-enable> [B<-D>] [B<-r> I<REPODIR>] [B<-k> I<SERVICE>] [B<-S> I<SOURCEDIR>] +[B<-s> I<SOURCEDIR>] [B<-l> I<LISTDIR>] [B<-n>] [B<-w>] [I<SERVICE...>] =head1 OPTIONS @@ -22,17 +22,17 @@ shown on console and logged. Show help screen and exit. -=item B<-k, --skip-down> I<service> +=item B<-k, --skip-down> I<SERVICE> -When (if) enabling I<service> do not create a file I<down> even it there's none +When (if) enabling I<SERVICE> do not create a file I<down> even it there's none and it is a longrun service. This is intended to be used during stage 1, for the catch-all logger service, which needs to be started automatically by B<s6-svscan> (to unblock & trigger stage 2). -=item B<-l, --listdir> I<dir> +=item B<-l, --listdir> I<LISTDIR> -Use I<dir> to list services to enable. Only one can be set, if specified more -than once the last one will be used. +Use I<LISTDIR> to list services to enable. Only one can be set, if specified +more than once the last one will be used. The directory will be read, and names of files/directories within be used as service name to enable. For directories, their content will be merged/copied @@ -43,20 +43,20 @@ into the servicedir; See below for more. Don't auto-enable any services listed under directory I<needs> of a service being (auto-)enabled. -=item B<-r, --repodir> I<dir> +=item B<-r, --repodir> I<REPODIR> -Use I<dir> as repository directory. This is where all servicedirs will be +Use I<REPODIR> as repository directory. This is where all servicedirs will be created/copied to. -=item B<-S, --reset-source> I<dir> +=item B<-S, --reset-source> I<SOURCEDIR> -Reset the list of source directories to I<dir>. You can add more with +Reset the list of source directories to I<SOURCEDIR>. You can add more with B<--source>. This is useful to unset the defaults. -=item B<-s, --source> I<dir> +=item B<-s, --source> I<SOURCEDIR> -Add I<dir> as new source. Can be specified multiple times; Source directories -will be processed in the order they were added. +Add I<SOURCEDIR> as new source. Can be specified multiple times; Source +directories will be processed in the order they were added. =item B<-V, --version> @@ -88,22 +88,22 @@ can be turned off via B<--no-needs> and/or B<--no-wants> if needed. Instead of simply creating the repository ahead of time, and copying it all on boot, the copying process is done through B<aa-enable>(1) which works as such: -- The given I<listdir> is read. It contains either empty regular files, or +- The given I<LISTDIR> is read. It contains either empty regular files, or directories, whose name is the name of a service to enable. - Source directories are tried, in order, to find the corresponding servicedir, -which is then copied over to the runtime repository (I<repodir>). During this +which is then copied over to the runtime repository (I<REPODIR>). During this copy, B<aa-enable>(1) notes whether or not a file I<run> exists, i.e. whether this is a long-run or one-shot service. -- If the service name came from a directory in I<listdir>, its content is then +- If the service name came from a directory in I<LISTDIR>, its content is then merged/copied over into the servicedir. This allows to specify service-specific configuration, or could possibly be used to overwrite an actual script. - If the service is a long-run, an empty regular file I<down> is created (unless it already existed, or the service was specified to B<--skip-down>) to ensure the service won't be auto-started by B<s6-svscan>, and a symlink is added to the -servicedir into the I<.scandir> sub-directory of I<repodir> (even if the service +servicedir into the I<.scandir> sub-directory of I<REPODIR> (even if the service was specified to B<--skip-down>). =head2 Special case: Instances diff --git a/doc/anopa.pod b/doc/anopa.pod index 25ead84..f492f50 100644 --- a/doc/anopa.pod +++ b/doc/anopa.pod @@ -29,7 +29,7 @@ the init process of a Unix system : Stage 1 starts when the kernel launches the first userland process, traditionally called B<init>. The goal is to prepare the system: mounting -filesystems, setting system clock, configuring the network, and other similar +file systems, setting system clock, configuring the network, and other similar tasks are to be performed, to be ready to start long-running processes, that will be expected to stay running for as long as the system is up. @@ -40,7 +40,7 @@ job here also includes reaping any orphaned zombies. Stage 3 starts when a shutdown (or reboot) is initiated. init then needs to "undo" what was done prior: stop all long-running processes, clean up, unmount -filesystems, etc +file systems, etc B<s6-svscan> is perfectly suited to be in charge of stage 2, supervising long-running processes. B<anopa> provides tools to take care of the other @@ -48,7 +48,7 @@ stages. Because the init process launched by the kernel, also known as PID 1, cannot die and has to be the one process to exist from start to finish, lots of init system -include all functionnalities into a single binary. Instead, since PID 1 is +include all functionalities into a single binary. Instead, since PID 1 is allowed to execute I<into> another binary, this is what B<anopa> makes uses of. =head1 NOTION OF SERVICES @@ -84,9 +84,10 @@ script containing the command setting up the services, before executing into it. =item An optional executable file named I<finish> -Like I<run>, it can be any executable file. If present, it is executed everytime -the I<run> script dies. Generally, its main purpose is to clean up non-volatile -data such as the filesystem after the supervised process has been killed. +Like I<run>, it can be any executable file. If present, it is executed every +time the I<run> script dies. Generally, its main purpose is to clean up +non-volatile data such as the file system after the supervised process has been +killed. Note that it must do its work and exit in less than 5 seconds, else it'll be killed. @@ -155,7 +156,7 @@ If no such file exists, the service will be considered stopped instantly. If present and the service fails to be started, when it exits B<aa-start> will return 1. It will only return 0 if no essential services failed to be started. This can be used by I<init>, e.g. to launch an emergency shell if B<aa-start> -end succesfully (return non-zero). +end successfully (return non-zero). You would usually use such a file for the service mounting the root filesystem in initramfs, or launching getty. @@ -198,7 +199,7 @@ service to be marked as dependency of the current service. Such services will be auto-started by B<aa-start>(1) and the current service will automatically be marked to be started after it. -Additionally, should the depedency service fail to start, the current service +Additionally, should the dependency service fail to start, the current service will not be started, but placed into a failed state (for dependency error). B<aa-stop>(1) will process those as if they were in directory I<after>. @@ -312,9 +313,8 @@ Then, B<aa-start>(1) is used to start all services in order, getting the system up & ready. Refer to B<aa-start>(1) for more on how it works. Note that this is of course only a possible solution to set up your system, you -are of couse free to organize things differently, only the the tool(s) you need -fro B<anopa> however you want. - +are of course free to organize things differently, only the tool(s) you need +from B<anopa> however you want.