author | Olivier Brunel
<jjk@jjacky.com> 2015-07-15 16:46:55 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2015-07-15 16:46:55 UTC |
parent | c93faa87f86679c7aaa9cd19aaea4978e9b3b297 |
doc/aa-stage0.pod | +6 | -2 |
doc/aa-stage2.pod | +2 | -2 |
doc/anopa.pod | +1 | -1 |
src/scripts/aa-stage0 | +1 | -1 |
src/scripts/aa-stage2 | +2 | -2 |
diff --git a/doc/aa-stage0.pod b/doc/aa-stage0.pod index 9420883..8aded55 100644 --- a/doc/aa-stage0.pod +++ b/doc/aa-stage0.pod @@ -17,8 +17,12 @@ B<s6-tai64n>. It doesn't do much in itself, the bulk of the work being done via services, much like during system init (stage 1/2). It will simply call B<aa-start>(1) using -I</servives> as repodir, and I</etc/anopa/onboot> as listdir for services to -start. +I</services> as repodir, and I</etc/anopa/listdirs/onboot> as listdir for +services to start. + +Note that this refer to the initramfs itself, so the content of +I</etc/anopa/listdirs/onboot> would differ on that from the system, or more +likely be the same as I</etc/anopa/initramfs/listdirs/onboot> from the root fs. Services are meant to mount the root file system on to I</root-fs> and mount all API file systems in there as well: I</root-fs/dev>, I</root-fs/proc>, diff --git a/doc/aa-stage2.pod b/doc/aa-stage2.pod index 98f37ce..2aff53a 100644 --- a/doc/aa-stage2.pod +++ b/doc/aa-stage2.pod @@ -15,9 +15,9 @@ perform all initialization tasks. It will log messages into file I</run/initramfs/boot.log>, prefixing them with a TAI timestamp via B<s6-tai64n>. -It starts all services via B<aa-start>(1) using I</etc/anopa/onboot/default> as +It starts all services via B<aa-start>(1) using I</etc/anopa/listdirs/onboot> as listdir, unless argument B<aa> was specified on kernel command line, in which -case I</etc/anopa/onboot/ARGVALUE> is used as listdir intead. +case I</etc/anopa/listdirs/ARGVALUE> is used as listdir intead. If B<aa-start>(1) exits non-zero, it assumes there might not even be a getty running, and will try to open a shell (I<sh -i>). diff --git a/doc/anopa.pod b/doc/anopa.pod index d267ac2..014eaff 100644 --- a/doc/anopa.pod +++ b/doc/anopa.pod @@ -304,7 +304,7 @@ into the servicedir. Used by B<aa-enable>(1) from B<aa-stage1>(1). -=item I</etc/anopa/onboot/default> +=item I</etc/anopa/listdirs/onboot> List directory containing empty regular files, whose name is the name of a service to start on boot. Used by B<aa-start>(1) from B<aa-stage2>(1). diff --git a/src/scripts/aa-stage0 b/src/scripts/aa-stage0 index 41dd10e..951249e 100755 --- a/src/scripts/aa-stage0 +++ b/src/scripts/aa-stage0 @@ -45,7 +45,7 @@ umask 022 # Start services foreground { if -n { - if { emptyenv -c s6-setsid aa-ctty -s aa-start -D -r /services -l /etc/anopa/onboot } + if { emptyenv -c s6-setsid aa-ctty -s aa-start -D -r /services -l /etc/anopa/listdirs/onboot } foreground { # if "break" was specified on kernel cmdline, let's open a shell if -t { aa-incmdline -qf /root-fs/proc/cmdline break } diff --git a/src/scripts/aa-stage2 b/src/scripts/aa-stage2 index 577101d..f970662 100755 --- a/src/scripts/aa-stage2 +++ b/src/scripts/aa-stage2 @@ -43,12 +43,12 @@ if -n -t redirfd -w 1 /dev/console # And start everything foreground { aa-echo -DB "Stage 2: Initializing system..." } - backtick -n -D default LISTDIR { aa-incmdline -rs aa } + backtick -n -D onboot LISTDIR { aa-incmdline -rs aa } import -u LISTDIR # We have a tty in stdin, become session leader and set controlling terminal. # This is so Ctrl+C will trigger a SIGINT to aa-start, so one can manually # timeout a service. - if { emptyenv -c s6-setsid aa-ctty aa-start -D -l /etc/anopa/onboot/${LISTDIR} } + if { emptyenv -c s6-setsid aa-ctty aa-start -D -l /etc/anopa/listdirs/${LISTDIR} } foreground { aa-echo -DB "System ready." } # close logger fdmove -c 2 1