diff --git a/functions/10_check-reboot-needed b/functions/10_check-reboot-needed index 5821b01..4234034 100644 --- a/functions/10_check-reboot-needed +++ b/functions/10_check-reboot-needed @@ -6,7 +6,7 @@ function checkRebootNeeded { if [ "$OS_FAMILY" == "Redhat" ] && [ -f "/usr/bin/needs-restarting" ];then # If following command does not return 0 then reboot is required - if ! /usr/bin/needs-restarting -r > /dev/null;then + if ! /usr/bin/needs-restarting -r 2> /dev/null;then REBOOT_REQUIRED="true" fi fi diff --git a/mods-available/agent/reposerver.agent b/mods-available/agent/reposerver.agent index 6e7eec3..5dbbf0e 100644 --- a/mods-available/agent/reposerver.agent +++ b/mods-available/agent/reposerver.agent @@ -74,20 +74,20 @@ function checkRestartNeeded # Sending general informations function send_general_status { - /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-general-status > /dev/null + /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-general-status 2> /dev/null if [ $? != "0" ];then echo -e "An error occured while sending data\n" else - echo -e "Data have been send\n" + echo -e "Data have been sent\n" fi } # Sending full events history function send_full_history { if [ "$MAX_HISTORY" -gt "0" ];then - /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history $MAX_HISTORY > /dev/null + /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history $MAX_HISTORY 2> /dev/null else - /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history > /dev/null + /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-history 2> /dev/null fi if [ $? != "0" ];then echo -e "An error occured while sending data\n" @@ -98,21 +98,21 @@ function send_full_history { # Sending packages status function send_packages_status { - /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-packages-status > /dev/null + /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-packages-status 2> /dev/null if [ $? != "0" ];then echo -e "An error occured while sending data\n" else - echo -e "Data have been send\n" + echo -e "Data have been sent\n" fi } # Sending full status function send_full_status { - /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-status > /dev/null + /opt/linupdate/linupdate --mod-exec reposerver --from-agent --send-full-status 2> /dev/null if [ $? != "0" ];then echo -e "An error occured while sending data\n" else - echo -e "Data have been send\n" + echo -e "Data have been sent\n" fi } diff --git a/mods-available/reposerver.mod b/mods-available/reposerver.mod index 310cb4a..a47edcd 100644 --- a/mods-available/reposerver.mod +++ b/mods-available/reposerver.mod @@ -141,7 +141,7 @@ function testConnection CURL_PARAMS="\"id\":\"$HOST_ID\", \"token\":\"$TOKEN\"" fi - if ! curl -L --post301 -s -q -H "Content-Type: application/json" -X GET -d "{$CURL_PARAMS}" "${REPOSERVER_URL}/api/v2/status" > /dev/null;then + if ! curl -L --post301 -s -q -H "Content-Type: application/json" -X GET -d "{$CURL_PARAMS}" "${REPOSERVER_URL}/api/v2/status" 2> /dev/null;then echo -e " [$YELLOW ERROR $RESET] Cannot reach reposerver from ${YELLOW}${REPOSERVER_URL}${RESET}" ERROR_STATUS=1 clean_exit @@ -794,12 +794,12 @@ function getProfileConf done if [ "$GET_PROFILE_PKG_CONF_FROM_REPOSERVER" == "null" ];then - echo -e "[$YELLOW ERROR $RESET] Server send ${YELLOW}null${RESET} data" + echo -e "[$YELLOW ERROR $RESET] Server sent ${YELLOW}null${RESET} data" return 2 fi if [ "$GET_PROFILE_REPOS_FROM_REPOSERVER" == "null" ];then - echo -e "[$YELLOW ERROR $RESET] Server send ${YELLOW}null${RESET} data" + echo -e "[$YELLOW ERROR $RESET] Server sent ${YELLOW}null${RESET} data" return 2 fi @@ -911,7 +911,7 @@ function getProfileRepos # On s'assure que le paramètre 'configuraiton' fait bien partie de la réponse JSON renvoyée par le serveur # Ce paramètre peut être vide toutefois si la configuration du profil côté serveur n'a aucun repo de configuré if ! echo "$CURL" | grep -q "results";then - echo -e "[$YELLOW ERROR $RESET] $PROFILE profile repos sources configuration have not been sended by reposerver." + echo -e "[$YELLOW ERROR $RESET] $PROFILE profile repos sources configuration have not been sent by reposerver." return 2 fi @@ -932,6 +932,7 @@ function getProfileRepos rm /etc/yum.repos.d/*.repo -f fi if [ "$OS_FAMILY" == "Debian" ];then + echo -n> /etc/apt/sources.list rm /etc/apt/sources.list.d/*.list -f fi diff --git a/service/linupdate-agent b/service/linupdate-agent index c5cc276..ee71c7f 100755 --- a/service/linupdate-agent +++ b/service/linupdate-agent @@ -7,7 +7,7 @@ AGENTS_ENABLED_DIR="/opt/linupdate/agents-enabled" sleep 60 # On vérifie qu'au moins 1 agent est activé -if ls -A $AGENTS_ENABLED_DIR/* > /dev/null;then +if ls -A $AGENTS_ENABLED_DIR/* 2> /dev/null;then # Inclusion de tous les 'modules agent' for AGENT in $(ls -A1 ${AGENTS_ENABLED_DIR}/);do source "${AGENTS_ENABLED_DIR}/${AGENT}" diff --git a/version b/version index 72d132f..565a0d4 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.2.9 \ No newline at end of file +2.2.10 \ No newline at end of file