begining work on the chroot option

This commit is contained in:
levasseur
2021-10-15 18:39:16 +02:00
parent 5fd16fbd69
commit 53c546fe20
3 changed files with 19 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ read_commandline()
local want_module=false
local want_logfile=false
local want_conffile=false
local want_conffile=false
local opt=
for opt in $@; do
@@ -75,10 +76,14 @@ read_commandline()
"-s"|"--shell")
export RUN_SHELL=true
;;
"--chroot")
local want_chroot
;;
*)
if [[ $want_module == true ]]; then
[[ $want_logfile == true ]] && synthax_error
[[ $want_conffile == true ]] && synthax_error
[[ $want_chroot == true ]] && synthax_error
if [[ -z $MANUAL_MODULE_LIST ]]; then
export MANUAL_MODULE_LIST=$opt
want_module=false
@@ -90,6 +95,7 @@ read_commandline()
elif [[ $want_logfile == true ]]; then
[[ $want_module == true ]] && synthax_error
[[ $want_conffile == true ]] && synthax_error
[[ $want_chroot == true ]] && synthax_error
if [[ -z $NEW_LOGFILE ]]; then
export NEW_LOGFILE=$opt
want_logfile=false
@@ -100,8 +106,14 @@ read_commandline()
elif [[ $want_conffile == true ]]; then
[[ $want_module == true ]] && synthax_error
[[ $want_logfile == true ]] && synthax_error
[[ $want_chroot == true ]] && synthax_error
export CONFFILES="$CONFFILES $opt"
want_logfile=false
elif [[ $want_chroot == true ]]; then
[[ $want_module == true ]] && synthax_error
[[ $want_logfile == true ]] && synthax_error
[[ $want_conffile == true ]] && synthax_error
# To be finished
else
prnt E "Paramètre \"$opt\" non géré."
die 1 --force