#!/bin/bash ############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2010 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### # Regular colours CLR_BLACK_R='\e[0;30m' CLR_RED_R='\e[0;31m' CLR_GREEN_R='\e[0;32m' CLR_YELLOW_R='\e[0;33m' CLR_BLUE_R='\e[0;34m' CLR_PURPLE_R='\e[0;35m' CLR_CYAN_R='\e[0;36m' CLR_WHITE_R='\e[0;37m' # Bold colours CLR_BLACK_B='\e[1;30m' CLR_RED_B='\e[1;31m' CLR_GREEN_B='\e[1;32m' CLR_YELLOW_B='\e[1;33m' CLR_BLUE_B='\e[1;34m' CLR_PURPLE_B='\e[1;35m' CLR_CYAN_B='\e[1;36m' CLR_WHITE_B='\e[1;37m' # Background colors CLR_BLACK_BG='\e[40m' CLR_RED_BG='\e[41m' CLR_GREEN_BG='\e[42m' CLR_YELLOW_BG='\e[43m' CLR_BLUE_BG='\e[44m' CLR_PURPLE_BG='\e[45m' CLR_CYAN_BG='\e[46m' CLR_WHITE_BG='\e[47m' # Reset everything. CLR_RESET="\e[0m" # Predefined messages MSG_HOOK_UP="${CLR_GREEN_BG}${CLR_WHITE_B} UP ${CLR_RESET}" MSG_HOOK_DOWN="${CLR_RED_BG}${CLR_WHITE_B} DOWN ${CLR_RESET}" MSG_DEVICE_STATUS_UNKNOWN="${CLR_GREY_BG}${CLR_BLACK_B} UNKNOWN ${CLR_RESET}" MSG_DEVICE_STATUS_UP="${CLR_GREEN_BG}${CLR_WHITE_B} UP ${CLR_RESET}" MSG_DEVICE_STATUS_DOWN="${CLR_RED_BG}${CLR_WHITE_B} DOWN ${CLR_RESET}" MSG_DEVICE_STATUS_NOCARRIER="${CLR_YELLOW_BG}${CLR_WHITE_B} NO-CARRIER ${CLR_RESET}" MSG_STP_FORWARDING="${CLR_GREEN_BG}${CLR_WHITE_B} FORWARDING ${CLR_RESET}" MSG_STP_DISCARDING="${CLR_RED_BG}${CLR_WHITE_B} DISCARDING ${CLR_RESET}" MSG_STP_LEARNING="${CLR_YELLOW_BG}${CLR_WHITE_B} LEARNING ${CLR_RESET}" MSG_STP_LISTENING="${CLR_YELLOW_BG}${CLR_WHITE_B} LISTENING ${CLR_RESET}" MSG_STP_BLOCKING="${CLR_RED_BG}${CLR_WHITE_B} BLOCKING ${CLR_RESET}"