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