Mode dégradé plus souple

This commit is contained in:
Maniack Crudelis 2016-07-11 01:18:52 +02:00
parent 3cf513c358
commit 36779f88c5
3 changed files with 7 additions and 17 deletions

View file

@ -179,7 +179,7 @@ TEST_RESULTS () {
elif [ "$GLOBAL_LINTER" -eq -1 ]; then elif [ "$GLOBAL_LINTER" -eq -1 ]; then
ECHO_FORMAT "\t\t\tFAIL\n" "lred" ECHO_FORMAT "\t\t\tFAIL\n" "lred"
else else
ECHO_FORMAT "\t\t\t\tNot evaluated.\n" "white" ECHO_FORMAT "\t\t\tNot evaluated.\n" "white"
fi fi
ECHO_FORMAT "Installation: " ECHO_FORMAT "Installation: "
if [ "$GLOBAL_CHECK_SETUP" -eq 1 ]; then if [ "$GLOBAL_CHECK_SETUP" -eq 1 ]; then
@ -655,13 +655,10 @@ else # Si le fichier check_process n'a pas été trouvé, fonctionne en mode dé
ECHO_FORMAT "La clé de manifest du domaine n'a pas été trouvée.\n" "lyellow" ECHO_FORMAT "La clé de manifest du domaine n'a pas été trouvée.\n" "lyellow"
setup_sub_dir=0 setup_sub_dir=0
setup_root=0 setup_root=0
upgrade=0
backup_restore=0
multi_instance=0 multi_instance=0
wrong_user=0 wrong_user=0
wrong_path=0
incorrect_path=0 incorrect_path=0
all_test=$((all_test-8)) all_test=$((all_test-5))
fi fi
if [ "$MANIFEST_PATH" == "null" ] if [ "$MANIFEST_PATH" == "null" ]
then then
@ -674,15 +671,8 @@ else # Si le fichier check_process n'a pas été trouvé, fonctionne en mode dé
if [ "$MANIFEST_USER" == "null" ] if [ "$MANIFEST_USER" == "null" ]
then then
ECHO_FORMAT "La clé de manifest de l'user admin n'a pas été trouvée.\n" "lyellow" ECHO_FORMAT "La clé de manifest de l'user admin n'a pas été trouvée.\n" "lyellow"
setup_sub_dir=0
setup_root=0
upgrade=0
backup_restore=0
multi_instance=0
wrong_user=0 wrong_user=0
wrong_path=0 all_test=$((all_test-1))
incorrect_path=0
all_test=$((all_test-8))
fi fi
fi fi

View file

@ -31,14 +31,14 @@ def argument_for_question(question, all_choices=False):
if not all_choices: if not all_choices:
if isinstance(question["default"], bool): if isinstance(question["default"], bool):
if question["default"]: if question["default"]:
question["default"] = "Yes" question["default"] = "1"
else: else:
question["default"] = "No" question["default"] = "0"
return (question["name"], question["default"]) return (question["name"], question["default"])
else: else:
if isinstance(question["default"], bool) : if isinstance(question["default"], bool) :
return (question["name"], "Yes", "No") return (question["name"], "1", "0")
if question.get("choices"): if question.get("choices"):
return (question["name"],) + tuple(question["choices"]) return (question["name"],) + tuple(question["choices"])

View file

@ -70,7 +70,7 @@ do
tasksell_exit=$? tasksell_exit=$?
done done
echo "> Renseigne /etc/hosts sur l'invité" | tee -a "$LOG_BUILD_LXC" echo "> Renseigne /etc/hosts sur l'invité" | tee -a "$LOG_BUILD_LXC"
sudo lxc-attach -n $LXC_NAME -- echo "127.0.0.1 $LXC_NAME" | sudo tee -a /var/lib/lxc/$LXC_NAME/rootfs/etc/hosts >> "$LOG_BUILD_LXC" 2>&1 echo "127.0.0.1 $LXC_NAME" | sudo tee -a /var/lib/lxc/$LXC_NAME/rootfs/etc/hosts >> "$LOG_BUILD_LXC" 2>&1
echo "> Ajoute l'user pchecker" | tee -a "$LOG_BUILD_LXC" echo "> Ajoute l'user pchecker" | tee -a "$LOG_BUILD_LXC"
sudo lxc-attach -n $LXC_NAME -- useradd -m -p pchecker pchecker >> "$LOG_BUILD_LXC" 2>&1 sudo lxc-attach -n $LXC_NAME -- useradd -m -p pchecker pchecker >> "$LOG_BUILD_LXC" 2>&1