From b6f0d82f6bbfac5e175757e303ff10048446cf3a Mon Sep 17 00:00:00 2001 From: nemo Date: Wed, 1 May 2019 17:16:58 +0200 Subject: [PATCH] File forget in last commit (add common_functions) --- recipe_gentoo.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/recipe_gentoo.sh b/recipe_gentoo.sh index f6161c7..19c8054 100755 --- a/recipe_gentoo.sh +++ b/recipe_gentoo.sh @@ -36,7 +36,7 @@ do if [ ${RC} -ne 0 ] then - echo "ERROR : ${requirement} ($(eval echo "\$${requirement}")) is required to use this script. Requirements are : ${REQUIREMENTS}." + echo "ERROR : ${requirement} ($(eval echo "\$${requirement}")) is required to use this script. Requirements are : ${REQUIREMENTS}." exit 1 fi done @@ -53,6 +53,9 @@ export PING_FAILED="" # Get ALL locales IPs except loopback export LOCALES_IP_WITHOUT_LOOPBACK=$(ip addr show scope global | awk '/inet/ { sub(/\/.*$/, "", $2); print $2 }' | sort | uniq) +export IPV6_ADMIN_LAN_IP=$(echo ${LOCALES_IP_WITHOUT_LOOPBACK} | tr " " "\n" | grep ^${IPV6_ADMIN_NETWORK}) +export IPV4_ADMIN_LAN_IP=$(echo ${LOCALES_IP_WITHOUT_LOOPBACK} | tr " " "\n" | grep ^${IPV4_ADMIN_NETWORK}) + export BOOL_ADMIN_IPV4_NOT_CONFIGURED=0 export BOOL_ADMIN_IPV6_NOT_CONFIGURED=0 @@ -98,15 +101,15 @@ if [ $1 ]; then fi fi -echo "-------------------------------------------------" -echo -e "------- ${BLUE}RECIPE GENTOO - CHECK BASIC CONFIG${NC} ------" -echo -e "-------------------------------------------------\n" +. recipes/common_functions.sh + +print_config_title 'RECIPE GENTOO - CHECK BASIC CONFIG' # Voir pour mettre ./ à la place de . #. recipes/recipe_check_packages.sh -#. recipes/recipe_check_hostname.sh +. recipes/recipe_check_hostname.sh #. recipes/recipe_check_dns_config.sh @@ -116,7 +119,7 @@ echo -e "-------------------------------------------------\n" #. recipes/recipe_check_services.sh -#. recipes/recipe_check_ssh_config.sh +. recipes/recipe_check_ssh_config.sh #. recipes/recipe_check_nrpe_config.sh @@ -124,11 +127,11 @@ echo -e "-------------------------------------------------\n" #. recipes/recipe_check_snmp_config.sh -. recipes/recipe_check_mail_alias_config.sh +#. recipes/recipe_check_mail_alias_config.sh -. recipes/recipe_check_postfix_protocol_config.sh +#. recipes/recipe_check_postfix_protocol_config.sh -. recipes/recipe_check_ipam_config.sh +#. recipes/recipe_check_ipam_config.sh . recipes/recipe_final_summary.sh