zzz_main.sh: do more checks arround module list
This commit is contained in:
@@ -296,10 +296,16 @@ process_commandline_and_vars()
|
|||||||
|
|
||||||
# Check for module list existance and basic syntax
|
# Check for module list existance and basic syntax
|
||||||
if [[ -n $MODULE_LIST ]]; then
|
if [[ -n $MODULE_LIST ]]; then
|
||||||
if [[ $(echo $MODULE_LIST | grep '-') ]]; then
|
for $mod in $MODULE_LIST; do
|
||||||
prnt E "Dash is forbidden in module name."
|
if [[ $mod =~ ['\"\'\ \\-!@#$%&*=+'] ]]; then
|
||||||
die 5
|
prnt E "The module \"$mod\" contains a forbidden character in its name."
|
||||||
fi
|
die 5
|
||||||
|
fi
|
||||||
|
if [[ ! -s "modules/$mod.sh" ]]; then
|
||||||
|
prnt E "The asked module \"$mod\", doesn't have any module file or module file is empty."
|
||||||
|
die 18
|
||||||
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
prnt E "No module to execute!"
|
prnt E "No module to execute!"
|
||||||
die 5
|
die 5
|
||||||
|
|||||||
Reference in New Issue
Block a user