doc improvements, small esthetic changes, mk_archive created
This commit is contained in:
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright 20221 Geoffray Levasseur <geoffray.levasseur@obs-mip.fr>
|
||||
Copyright 2019-2021 Geoffray Levasseur <geoffray.levasseur@obs-mip.fr>
|
||||
|
||||
This is distributed with BSD-3-Clause license with the following terms and
|
||||
condition:
|
||||
|
||||
45
README.md
45
README.md
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This is ubuntu deployment scripts for LEGOS git repository
|
||||
created on 2021-05-31-11:31:04
|
||||
This is deployment scripts for LEGOS git repository created on 2021-05-31-11:31:04
|
||||
An english version for general purpose is available at https://www.geoffray-levasseur.org/init
|
||||
|
||||
Check README.md for details.
|
||||
|
||||
1
doc/dev.md
Normal file
1
doc/dev.md
Normal file
@@ -0,0 +1 @@
|
||||
A faire.
|
||||
2
init.sh
2
init.sh
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Init: initialise a computer and conform it
|
||||
# Copyright (c) 2021 Geoffray Levasseur <geoffray.levasseur@obs-mip.fr>
|
||||
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
|
||||
|
||||
# trace ERR through pipes
|
||||
set -o pipefail
|
||||
|
||||
15
mk_archive.sh
Executable file
15
mk_archive.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# That script is used to create an archive for init deployment
|
||||
|
||||
VERSION=$(grep "VERSION=" init.sh | cut -d'=' -f 2 | sed s/\"//g)
|
||||
TMPDIR="/tmp/init-$VERSION"
|
||||
|
||||
mkdir $TMPDIR
|
||||
|
||||
cp -av conf lib modules doc init.sh README.* LICENSE $TMPDIR
|
||||
|
||||
tar --gzip -cvf ~/init.sh-$VERSION.tar.gz $TMPDIR
|
||||
|
||||
rm -rfv $TMPDIR
|
||||
|
||||
echo "L'archive ~/init.sh-$VERSION.tar.gz a été créé avec succès dans votre home directory."
|
||||
@@ -6,7 +6,7 @@
|
||||
# * MK_PORT: Port check_mk agent will use to communicate with server
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
export VER_install_mkagent="0.0.1"
|
||||
export VER_install_mkagent="0.0.2"
|
||||
|
||||
install_mkagent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user