feat : repertorie bug(WIP)
This commit is contained in:
@@ -229,8 +229,8 @@ install_sudoers_if_allowed() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if ! sudo -n true >/dev/null 2>&1; then
|
||||
fail "AUTO_CONFIGURE_SUDOERS=yes mais sudo -n n'est pas disponible ; configuration initiale manuelle requise"
|
||||
if ! sudo true >/dev/null 2>&1; then
|
||||
fail "AUTO_CONFIGURE_SUDOERS=yes mais sudo n'est pas disponible ; configuration initiale manuelle requise"
|
||||
fi
|
||||
|
||||
require_cmd visudo
|
||||
@@ -260,10 +260,10 @@ EOF
|
||||
}
|
||||
|
||||
check_sudo_non_interactive() {
|
||||
sudo -n true >/dev/null 2>&1 || \
|
||||
fail "sudo non interactif indisponible pour ${USER}"
|
||||
sudo true >/dev/null 2>&1 || \
|
||||
fail "sudo indisponible pour ${USER}"
|
||||
|
||||
log "sudo non interactif validé."
|
||||
log "sudo validé."
|
||||
}
|
||||
|
||||
run_postgresql_check() {
|
||||
@@ -278,7 +278,7 @@ run_postgresql_check() {
|
||||
--non-interactive \
|
||||
>>"$LOG_FILE" 2>&1 || fail "échec de préparation PostgreSQL"
|
||||
|
||||
sudo -n -u postgres true >/dev/null 2>&1 || fail "sudo -n -u postgres indisponible après préparation PostgreSQL"
|
||||
sudo -u postgres true >/dev/null 2>&1 || fail "sudo -u postgres indisponible après préparation PostgreSQL"
|
||||
log "Préparation PostgreSQL validée."
|
||||
}
|
||||
|
||||
@@ -315,4 +315,4 @@ check_sudo_non_interactive
|
||||
run_postgresql_check
|
||||
|
||||
log "Machine cible prête pour le rebuild."
|
||||
print_json_and_exit "success" "machine cible prête" 0
|
||||
print_json_and_exit "success" "machine cible prête" 0
|
||||
|
||||
Reference in New Issue
Block a user