]> git.ipfire.org Git - network.git/blame - functions.constants
Tidy up coloured logging code.
[network.git] / functions.constants
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
e9ea243e
MT
22# Set gettext text domain.
23TEXTDOMAIN="network"
24
1848564d 25# Enable colors by default
6dbd51ba 26COLOURS="auto"
1848564d 27
059469a8 28LOG_DIR=/var/log/network
65c75fad 29RUN_DIR=/run/network
1848564d 30
059469a8 31RED_RUN=${RUN_DIR}/red
1848564d
MT
32PPP_SECRETS=/etc/ppp/secrets
33
d2a21d01
MT
34# Network directory configuration.
35NETWORK_CONFIG_DIR="/etc/network"
36NETWORK_ZONE_DIR="${NETWORK_CONFIG_DIR}"
37NETWORK_HOOKS_DIR=/usr/lib/network/hooks
38
39# Network file configuration.
40NETWORK_CONFIG_FILE=${NETWORK_CONFIG_DIR}/config
41NETWORK_CONFIG_FILE_PARAMS="COLOURS DEBUG"
31e59f2b 42CONFIG_HOSTNAME="/etc/hostname"
ff8ec5ef
MT
43
44RED_DB_DIR=${RUN_DIR}/red
b816e04b 45ROUTING_DB_DIR=${RUN_DIR}/routing
1848564d 46
059469a8
MT
47DB_CONNECTION_FILE="${LOG_DIR}/connections.db"
48
1848564d
MT
49# Proper error codes
50EXIT_OK=0
51EXIT_ERROR=1
52EXIT_CONF_ERROR=2
1578dae9 53EXIT_ERROR_ASSERT=3
1848564d 54
2eaf16f3
MT
55EXIT_TRUE=0
56EXIT_FALSE=1
57
1848564d
MT
58STATUS_UP=0
59STATUS_DOWN=1
711ffac1
MT
60STATUS_NOCARRIER=2
61
62STATUS_TEXT[${STATUS_UP}]="UP"
63STATUS_TEXT[${STATUS_DOWN}]="DOWN"
64STATUS_TEXT[${STATUS_NOCARRIER}]="NO CARRIER"
65
66STATUS_COLOUR[${STATUS_UP}]=${COLOUR_GREEN}
67STATUS_COLOUR[${STATUS_DOWN}]=${COLOUR_RED}
68STATUS_COLOUR[${STATUS_NOCARRIER}]=${COLOUR_YELLOW}
1848564d
MT
69
70DISCOVER_OK=0
71DISCOVER_ERROR=1
72DISCOVER_NOT_SUPPORTED=2
73
7de0637a
MT
74# The user is able to create zones that begin
75# with these names followed by a number.
76ZONE_LOCAL="lan"
77ZONE_NONLOCAL="upl"
78VALID_ZONES="${ZONE_LOCAL} ${ZONE_NONLOCAL}"
1848564d
MT
79
80SYS_CLASS_NET="/sys/class/net"
2ae4f579
MT
81
82# Timeout values
83TIMEOUT_RESTART=2
711ffac1 84
feb76eaf 85DEVICE_PRINT_LINE1=" %-24s %s\n"
a1a8f0f4 86
8c63fa13 87PORT_PATTERN="pN"
8ee92277
MT
88PORT_PATTERN_ACCESSPOINT="apN"
89PORT_PATTERN_WIRELESS="wN"
98146c00
MT
90
91# This variable is used to point to a directory
92# in which the iptables ruleset will be generated.
93IPTABLES_TMPDIR=
94
3647b19f 95FIREWALL_CONFIG_DIR="/etc/firewall"
de28a630 96FIREWALL_ZONES_DIR="${FIREWALL_CONFIG_DIR}/zones"
d2a21d01 97FIREWALL_CONFIG_FILE="${FIREWALL_CONFIG_DIR}/config"
3647b19f
MT
98FIREWALL_CONFIG_PORTFW="${FIREWALL_CONFIG_DIR}/portfw"
99
100FIREWALL_CONFIG_PARAMS=""
101
98146c00 102FIREWALL_LOG_FACILITY="syslog"