From a18a851ebff0d1038852a68da101e3199104f12d Mon Sep 17 00:00:00 2001 From: levasseur Date: Thu, 21 Oct 2021 17:18:02 +0200 Subject: [PATCH] completed chroot parameter management --- lib/zzz_main_fct.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/zzz_main_fct.sh b/lib/zzz_main_fct.sh index dc3db93..3b4154d 100644 --- a/lib/zzz_main_fct.sh +++ b/lib/zzz_main_fct.sh @@ -117,7 +117,13 @@ read_commandline() [[ $want_module == true ]] && synthax_error [[ $want_logfile == true ]] && synthax_error [[ $want_conffile == true ]] && synthax_error - # To be finished + if [[ -z $CHROOT_PATH ]]; then + export CHROOT_PATH=$opt + want_chroot=false + else + prnt E "Un chemin pour chroot à déjà été fournis." + die 1 --force + fi else prnt E "Paramètre \"$opt\" non géré." die 1 --force @@ -129,7 +135,7 @@ read_commandline() # If those var are true at that point, something is wrong if [[ $want_logfile == true ]] || [[ $want_module == true ]] || - [[ $want_conffile == true ]]; then + [[ $want_conffile == true ]] || [[ $want_chroot == true ]]; then syntax_error fi