=head1 NAME
aa-stage1 - Stage 1: Preparing system
=head1 SYNOPSIS
B<aa-stage1>
=head1 DESCRIPTION
B<aa-stage1>(1) is an B<execline> script meant to be used as I<init> for the
system.
It loads the environment from I</etc/anopa/env> (via B<s6-envdir>), and first
checks if a file I</run/initramfs/boot.log> exists, and if so imports its
content into I</var/log/boot/current> (This is aimed to import log messages from
the initramfs, as e.g. B<aa-stage0>(1) generates them.)
It will log its own messages into file I</var/log/boot/current>, prefixing them
with a TAI timestamp via B<s6-tai64n>.
It doesn't do much in itself, the bulk of the work being done via services. It
will create the runtime repository I</run/services> using B<aa-hiercopy>(1) to
copy I</var/lib/repodir/onboot> (unless argument B<aa> was specified on kernel
command line, in which case I</var/lib/repodir/ARGVALUE> is used instead if it
exists.)
The repodir is intended to have been created ahead of time obviously, usually by
using B<aa-enable>(1).
A service I<uncaught-logs> must exist and be a logger that will be used to catch
all "uncaught logs" (i.e. anything not redirected to a service logger). A FIFO
must be created as I</run/services/.scandir/uncaught-logs/fifo> and will be
automatically started by B<s6-svscan>; It will also be used as trigger for
the "real" init, I</run/services/.anopa/init> (usually B<aa-stage2>(1)).