]> git.ipfire.org Git - people/stevee/network.git/blame - functions.colors
headers: Add missing function and rename existing ones.
[people/stevee/network.git] / functions.colors
CommitLineData
1848564d
MT
1#!/bin/bash
2###############################################################################
3# #
4# IPFire.org - A linux based firewall #
5# Copyright (C) 2010 Michael Tremer & Christian Schmidt #
6# #
7# This program is free software: you can redistribute it and/or modify #
8# it under the terms of the GNU General Public License as published by #
9# the Free Software Foundation, either version 3 of the License, or #
10# (at your option) any later version. #
11# #
12# This program is distributed in the hope that it will be useful, #
13# but WITHOUT ANY WARRANTY; without even the implied warranty of #
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15# GNU General Public License for more details. #
16# #
17# You should have received a copy of the GNU General Public License #
18# along with this program. If not, see <http://www.gnu.org/licenses/>. #
19# #
20###############################################################################
21
e2112169
MT
22# Regular colours
23CLR_BLACK_R='\e[0;30m'
24CLR_RED_R='\e[0;31m'
25CLR_GREEN_R='\e[0;32m'
26CLR_YELLOW_R='\e[0;33m'
27CLR_BLUE_R='\e[0;34m'
28CLR_PURPLE_R='\e[0;35m'
29CLR_CYAN_R='\e[0;36m'
30CLR_WHITE_R='\e[0;37m'
e2112169
MT
31
32# Bold colours
33CLR_BLACK_B='\e[1;30m'
34CLR_RED_B='\e[1;31m'
35CLR_GREEN_B='\e[1;32m'
36CLR_YELLOW_B='\e[1;33m'
37CLR_BLUE_B='\e[1;34m'
38CLR_PURPLE_B='\e[1;35m'
39CLR_CYAN_B='\e[1;36m'
40CLR_WHITE_B='\e[1;37m'
e2112169
MT
41
42# Background colors
43CLR_BLACK_BG='\e[40m'
44CLR_RED_BG='\e[41m'
45CLR_GREEN_BG='\e[42m'
46CLR_YELLOW_BG='\e[43m'
47CLR_BLUE_BG='\e[44m'
48CLR_PURPLE_BG='\e[45m'
49CLR_CYAN_BG='\e[46m'
50CLR_WHITE_BG='\e[47m'
e2112169
MT
51
52# Reset everything.
4665dc30 53CLR_RESET="\e[0m"
e2112169 54
e2112169 55# Predefined messages
4665dc30
MT
56MSG_HOOK_UP="${CLR_GREEN_BG}${CLR_WHITE_B} UP ${CLR_RESET}"
57MSG_HOOK_DOWN="${CLR_RED_BG}${CLR_WHITE_B} DOWN ${CLR_RESET}"
e2112169 58
4665dc30
MT
59MSG_DEVICE_STATUS_UNKNOWN="${CLR_GREY_BG}${CLR_BLACK_B} UNKNOWN ${CLR_RESET}"
60MSG_DEVICE_STATUS_UP="${CLR_GREEN_BG}${CLR_WHITE_B} UP ${CLR_RESET}"
61MSG_DEVICE_STATUS_DOWN="${CLR_RED_BG}${CLR_WHITE_B} DOWN ${CLR_RESET}"
62MSG_DEVICE_STATUS_NOCARRIER="${CLR_YELLOW_BG}${CLR_WHITE_B} NO-CARRIER ${CLR_RESET}"
e2112169 63
4665dc30
MT
64MSG_STP_FORWARDING="${CLR_GREEN_BG}${CLR_WHITE_B} FORWARDING ${CLR_RESET}"
65MSG_STP_DISCARDING="${CLR_RED_BG}${CLR_WHITE_B} DISCARDING ${CLR_RESET}"
66MSG_STP_LEARNING="${CLR_YELLOW_BG}${CLR_WHITE_B} LEARNING ${CLR_RESET}"
67MSG_STP_LISTENING="${CLR_YELLOW_BG}${CLR_WHITE_B} LISTENING ${CLR_RESET}"
68MSG_STP_BLOCKING="${CLR_RED_BG}${CLR_WHITE_B} BLOCKING ${CLR_RESET}"