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
ECHO_FORMAT "\t\t\tFAIL\n" "lred"
else
ECHO_FORMAT "\t\t\t\tNot evaluated.\n" "white"
ECHO_FORMAT "\t\t\tNot evaluated.\n" "white"
fi
ECHO_FORMAT "Installation: "
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"
setup_sub_dir=0
setup_root=0
upgrade=0
backup_restore=0
multi_instance=0
wrong_user=0
wrong_path=0
incorrect_path=0
all_test=$((all_test-8))
all_test=$((all_test-5))
fi
if [ "$MANIFEST_PATH" == "null" ]
then
@ -674,15 +671,8 @@ else # Si le fichier check_process n'a pas été trouvé, fonctionne en mode dé
if [ "$MANIFEST_USER" == "null" ]
then
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_path=0
incorrect_path=0
all_test=$((all_test-8))
all_test=$((all_test-1))
fi
fi

View file

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

View file

@ -70,7 +70,7 @@ do
tasksell_exit=$?
done
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"
sudo lxc-attach -n $LXC_NAME -- useradd -m -p pchecker pchecker >> "$LOG_BUILD_LXC" 2>&1