doc improvements, small esthetic changes, mk_archive created

This commit is contained in:
levasseur
2021-07-23 14:18:21 +02:00
parent 3696a720da
commit 47d21ad829
7 changed files with 50 additions and 21 deletions

View File

@@ -5,7 +5,7 @@ it's requirements turns it naturally to Linux systems. It have long been tested
using Debian GNU/Linux, Devuan and different flavor of Ubuntu.
## Getting started
You should consider reading the [Beginner's guide](./doc/user.md). If you need
You should consider reading that document entirely before use. If you need
to create additional modules to meet your needs, consider reading the
[Developer's guide](./doc/dev.md).
@@ -40,31 +40,33 @@ In that situation, no change should be done to the system.
- **-j, --jump**: Jump the checks and goes directly to system transformation.
That option should only be run after successfull checks (eg. after using the
**--checkonly** option).
- **-k, --keep-going**: The scripts will continue even if errors occurs. Thus
some unrecoverable errors might stop the script anyway if it not allowing it to
work. Please use with care as it might leads to unexpected results.
- **-k, --keep-going**: The scripts will try to continue even if errors occurs.
Thus some unrecoverable errors might stop the script anyway if it not allowing
it to work. Please use with care as it might leads to unexpected results.
### Loading order and process
The first things the script do is loading its libraries contained in the "lib"
The first thing the script do is loading its libraries contained in the "lib"
directory. Any file situated in that directory ending with the .sh extention
will be loaded in alphabetical order. For that reason, error management
functions are place in a file called aaa_error.sh, so it can be loaded first and
catch errors that could occurs while loading library files.
functions are placed in a file called aaa_error.sh, so it can be loaded first
and catch errors that could occurs while loading library files. In the opposite
the zzz_main_fct.sh file have to be loaded last, because it's widely using
previously declared libraries.
After that a basic command line parameter treatment is done. That allows the use
of --version and --help options in user space. Those options just display
informations and don't require any superuser rights and exit at that point of
execution. Everything that follows will do and the script will exit with error
at that point if not superuser.
execution. Everything after that will require administrator rights and the
script will exit with error at that point if not superuser.
Next will be the log file creation and the loading of configuration files. At
this point a deeper analysis of command line option will be done, triggering
errors in case of unconsistency or incompatible options.
Finally checking processes are launched in their declaration order (cf.
configuration file) and if not error and after a confirmation prompt, final
configuration process, those that actually makes changes, are launched.
configuration file). If no error occurs and after a confirmation prompt, final
treatment processes, those that actually makes changes, are launched.
Without the --keep-going option any error will imediatelly stop execution. Some
errors that could make the script impossible to execute will stop execution,
@@ -80,9 +82,13 @@ the execution of init.sh. If one of your module change the hostname, the new
name can only be took into account after a new execution of init.sh.
Most of the variable you can declare to configure your host depends on the
module you will use. Please refer to module header to see hat's available for
module you will use. Please refer to module header to see what's available for
your use case.
After a module version upgrade you should check again headers as variable name
or stucture might change. A variable ca also be deleted, new variables could
appears, and so on.
It is heavily recommended to use includes technique to shorten your
configuration file and make a file for your organisation and an other one
for the Linux distribution you use. Remember that the declaration order matters,
@@ -131,14 +137,14 @@ Versionning modules is up to you but the recommended behavior follows somme
standard rules. Considering a numbering as x.y.z:
- x might be incremented in case of major change, rewriting or deferent approach
on the way to have the job done
on the way to have the job done, used variable could massively change ;
- y might be incremented in case simple functionnality addition or basic
improvements
improvements, existing variable might not change but new ones could appears ;
- z might be incremented only when correcting problems and/or bugs (+n fix => +n
to increment)
to increment), variable should not change.
Unless only configuration files have been changed, any change in the code
implies any increment of a version number in the code **and** a git commit.
implies an increment of a version number in the code **and** a git commit.
```shell
# Description @template@ module
@@ -183,3 +189,10 @@ The following table is giving a list of error code with explanation:
| 150..200 | Error in module checks |
## Contact and more information
Everything except configuration files are licensed under BSD-3 license. Please
check licence file.
Please check https://www.geoffray-levasseur.org/init
You can mail author to fatalerrors <at> geoffray-levasseur <dot> org