]> git.ipfire.org Git - people/arne_f/network.git/commitdiff
network: Cleanup colour namespace.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Jun 2010 17:40:19 +0000 (19:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 18 Jun 2010 17:52:16 +0000 (19:52 +0200)
functions.cli
functions.colors
functions.util

index 4defee8f6ddc30956b3aa0a207c7724d762b4ce4..b5112dfd6ddce04e8fbe527a5409a472d5ea8a18 100644 (file)
@@ -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 <zone> <type> <options>${NORMAL}"
+                       echo -e "    ${COLOUR_BOLD}create <zone> <type> <options>${COLOUR_NORMAL}"
                        echo    "    Create a new zone of type <type> where <zone> is an allowed"
                        echo    "    zone name."
                        echo
-                       echo -e "    ${BOLD}remove <zone>${NORMAL}"
+                       echo -e "    ${COLOUR_BOLD}remove <zone>${COLOUR_NORMAL}"
                        echo    "    Remove the zone <zone>."
                        echo
                        echo    "  You may also edit the configuration of the zones."
                        echo
-                       echo -e "    ${BOLD}<zone> ...${NORMAL}"
+                       echo -e "    ${COLOUR_BOLD}<zone> ...${COLOUR_NORMAL}"
                        echo    "    Edit the zone <zone>."
                        echo
                        ;;
index b3c019fb9f6d4263a144f50c1b5d60fbdd5b3877..fa7e77d1f3b28eb25bf9a9464c302f00ff1a67c7 100644 (file)
@@ -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}
index 3f24b08949a648a4609861dc0112f7e4a39cc17b..a953a27e0a472f398394f91e4c43e5bb616e070d 100644 (file)
@@ -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() {