From: Michael Tremer Date: Fri, 18 Jun 2010 17:40:19 +0000 (+0200) Subject: network: Cleanup colour namespace. X-Git-Tag: 001~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab7f50f8c46899493ff7b11b2137eba753cedbe;p=network.git network: Cleanup colour namespace. --- diff --git a/functions.cli b/functions.cli index 4defee8f..b5112dfd 100644 --- a/functions.cli +++ b/functions.cli @@ -296,13 +296,13 @@ function cli_usage() { echo " One can pass several parameters to only process a subset of all" echo " available zones:" echo - echo -e " ${BOLD}--local-only${NORMAL}" + echo -e " ${COLOUR_BOLD}--local-only${COLOUR_NORMAL}" echo " Process all local zones which includes every zone without red." echo - echo -e " ${BOLD}--remote-only${NORMAL}" + echo -e " ${COLOUR_BOLD}--remote-only${COLOUR_NORMAL}" echo " Process all remote zones which means only the red ones." echo - echo -e " ${BOLD}--all${NORMAL}" + echo -e " ${COLOUR_BOLD}--all${COLOUR_NORMAL}" echo " Process all zones. This is the default parameter." echo echo " Additionally, you can pass one or more zone names which will" @@ -316,13 +316,13 @@ function cli_usage() { echo " One can pass several parameters to only process a subset of all" echo " available zones:" echo - echo -e " ${BOLD}--local-only${NORMAL}" + echo -e " ${COLOUR_BOLD}--local-only${COLOUR_NORMAL}" echo " Process all local zones which includes every zone without red." echo - echo -e " ${BOLD}--remote-only${NORMAL}" + echo -e " ${COLOUR_BOLD}--remote-only${COLOUR_NORMAL}" echo " Process all remote zones which means only the red ones." echo - echo -e " ${BOLD}--all${NORMAL}" + echo -e " ${COLOUR_BOLD}--all${COLOUR_NORMAL}" echo " Process all zones. This is the default parameter." echo echo " Additionally, you can pass one or more zone names which will" @@ -334,16 +334,16 @@ function cli_usage() { echo echo " Create or remove a zone." echo - echo -e " ${BOLD}create ${NORMAL}" + echo -e " ${COLOUR_BOLD}create ${COLOUR_NORMAL}" echo " Create a new zone of type where is an allowed" echo " zone name." echo - echo -e " ${BOLD}remove ${NORMAL}" + echo -e " ${COLOUR_BOLD}remove ${COLOUR_NORMAL}" echo " Remove the zone ." echo echo " You may also edit the configuration of the zones." echo - echo -e " ${BOLD} ...${NORMAL}" + echo -e " ${COLOUR_BOLD} ...${COLOUR_NORMAL}" echo " Edit the zone ." echo ;; diff --git a/functions.colors b/functions.colors index b3c019fb..fa7e77d1 100644 --- a/functions.colors +++ b/functions.colors @@ -24,19 +24,12 @@ COLOUR_RED="\\033[1;31m" COLOUR_NORMAL="\\033[0;39m" COLOUR_YELLOW="\\033[1;35m" -# Define color for messages -BOLD="\\033[1;39m" -DONE="\\033[1;32m" -SKIP="\\033[1;34m" -WARN="\\033[1;35m" -FAIL="\\033[1;31m" -NORMAL="\\033[0;39m" - COLOUR_BOLD="\\033[1;39m" COLOUR_DOWN=${COLOUR_RED} COLOUR_ERROR=${COLOUR_RED} COLOUR_OK=${COLOUR_GREEN} COLOUR_UP=${COLOUR_GREEN} +COLOUR_WARN=${COLOUR_YELLOW} COLOUR_STP_FORWARDING=${COLOUR_GREEN} COLOUR_STP_DISCARDING=${COLOUR_RED} diff --git a/functions.util b/functions.util index 3f24b089..a953a27e 100644 --- a/functions.util +++ b/functions.util @@ -21,7 +21,7 @@ # Print a pretty error message function error() { - echo -e " ${FAIL}ERROR${NORMAL} : $@" >&2 + echo -e " ${COLOUR_ERROR}ERROR${COLOUR_NORMAL} : $@" >&2 } function error_log() { @@ -31,7 +31,7 @@ function error_log() { # Print a pretty warn message function warning() { - echo -e " ${WARN}WARNING${NORMAL}: $@" >&2 + echo -e " ${COLOUR_WARN}WARNING${COLOUR_NORMAL}: $@" >&2 } function warning_log() {