improved doc, added missing headers, file manipulation error management improved
This commit is contained in:
53
README.md
53
README.md
@@ -39,14 +39,14 @@ module name. If that option is provided, the module list is mandatory.
|
||||
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).
|
||||
\--checkonly option).
|
||||
- **-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
|
||||
Thus some unrecoverable errors might stop the script anyway if it's not allowing
|
||||
it to work. Please use with care as it might leads to unexpected results.
|
||||
- **-r, --resume**: Restart an interrupted process with the last executed module
|
||||
that failed.
|
||||
- **-R, --no-root-check**: Désactive la vérification des droits root (ou UID 0).
|
||||
- **-h, --help**: Affiche des informations sur l'usage de la ligne de commande.
|
||||
- **-R, --no-root-check**: Disable checks on root rights (or the 0 UID).
|
||||
- **-h, --help**: Display informations on command line usage.
|
||||
- **-l, --logfile**: Specify a custom name for the logfile. Standard logfile is
|
||||
named init-hostname-date-time.log in the log subdirectory. That file can also
|
||||
be customized using the LOGFILE environement variable.
|
||||
@@ -63,8 +63,8 @@ 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
|
||||
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 after that will require administrator rights and the
|
||||
script will exit with error at that point if not superuser.
|
||||
@@ -150,7 +150,8 @@ 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, 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), variable should not change.
|
||||
to increment), variable should not change unless this is the only way to fix a
|
||||
problem.
|
||||
|
||||
Unless only configuration files have been changed, any change in the code
|
||||
implies an increment of a version number in the code **and** a git commit.
|
||||
@@ -181,22 +182,30 @@ export -f precheck_@template@
|
||||
|
||||
The following table is giving a list of error code with explanation:
|
||||
|
||||
| Code | Meaning |
|
||||
|:----------|:----------------------------------------|
|
||||
| 0 | No error |
|
||||
| 1 | Command line syntax error |
|
||||
| 2 | Unable to find configuration |
|
||||
| 3 | Missing library file or function |
|
||||
| 4 | No root rights |
|
||||
| 5 | Malformed module list |
|
||||
| 10 | Function call error |
|
||||
| 11 | Bad function call |
|
||||
| 12 | Error copying files |
|
||||
| 13 | Bad target filesystem |
|
||||
| 50..100 | Error in module execution |
|
||||
| 128 | Abortion due to external cause |
|
||||
| 150..200 | Error in module checks |
|
||||
| Code | Meaning |
|
||||
|:----------|:------------------------------------|
|
||||
| 0 | No error |
|
||||
| 1 | Command line syntax error |
|
||||
| 2 | Misuse of Bash builtin |
|
||||
| 3 | Missing library file or function |
|
||||
| 4 | No root rights |
|
||||
| 5 | Malformed module list |
|
||||
| 6 | Unable to find configuration |
|
||||
| 7 | Misuse of script internal function |
|
||||
| 11 | Bad function call |
|
||||
| 12 | Error copying files |
|
||||
| 13 | Bad target filesystem |
|
||||
| 50..100 | Error in module execution |
|
||||
| 126 | Command exists but not executable |
|
||||
| 127 | Command not found |
|
||||
| 128 | Abortion due to external cause |
|
||||
| 150..200 | Error in module checks |
|
||||
| 255 | Exit status out of range |
|
||||
|
||||
Additionaly to exit codes, the script will try to produce a call stack to help
|
||||
you in the debugging process. If you find a bug outside modules or in the basic
|
||||
provided module, please contact the author. Of course, if you also have a patch,
|
||||
your mail will be even more welcomed!
|
||||
|
||||
## Contact and more information
|
||||
|
||||
|
||||
Reference in New Issue
Block a user