]>
Commit | Line | Data |
---|---|---|
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 | ||
22 | # Set gettext text domain. | |
23 | TEXTDOMAIN="network" | |
24 | ||
25 | LOG_DIR=/var/log/network | |
26 | RUN_DIR=/run/network | |
27 | ||
28 | RED_RUN=${RUN_DIR}/red | |
29 | PPP_SECRETS=/etc/ppp/secrets | |
30 | ||
31 | # Network directory configuration. | |
32 | NETWORK_CONFIG_DIR="/etc/network" | |
33 | NETWORK_ZONE_DIR="${NETWORK_CONFIG_DIR}" | |
34 | NETWORK_HOOKS_DIR=/usr/lib/network/hooks | |
35 | ||
36 | # Network file configuration. | |
37 | NETWORK_CONFIG_FILE=${NETWORK_CONFIG_DIR}/config | |
38 | NETWORK_CONFIG_FILE_PARAMS="DEBUG" | |
39 | CONFIG_HOSTNAME="/etc/hostname" | |
40 | ||
41 | RED_DB_DIR=${RUN_DIR}/red | |
42 | ROUTING_DB_DIR=${RUN_DIR}/routing | |
43 | ||
44 | DB_CONNECTION_FILE="${LOG_DIR}/connections.db" | |
45 | ||
46 | # (Static) route settings. | |
47 | NETWORK_CONFIG_ROUTES="${NETWORK_CONFIG_DIR}/routes" | |
48 | NETWORK_CONFIG_ROUTES_PARAMS="network gateway unreachable prohibit blackhole" | |
49 | ||
50 | # Proper error codes | |
51 | EXIT_OK=0 | |
52 | EXIT_ERROR=1 | |
53 | EXIT_CONF_ERROR=2 | |
54 | EXIT_ERROR_ASSERT=128 | |
55 | ||
56 | EXIT_TRUE=0 | |
57 | EXIT_FALSE=1 | |
58 | EXIT_UNKNOWN=2 | |
59 | ||
60 | STATUS_UP=0 | |
61 | STATUS_DOWN=1 | |
62 | STATUS_NOCARRIER=2 | |
63 | ||
64 | DISCOVER_OK=0 | |
65 | DISCOVER_ERROR=1 | |
66 | DISCOVER_NOT_SUPPORTED=2 | |
67 | ||
68 | # The user is able to create zones that begin | |
69 | # with these names followed by a number. | |
70 | ZONE_LOCAL="lan" | |
71 | ZONE_NONLOCAL="upl" | |
72 | VALID_ZONES="${ZONE_LOCAL} ${ZONE_NONLOCAL}" | |
73 | ||
74 | SYS_CLASS_NET="/sys/class/net" | |
75 | ||
76 | # Timeout values | |
77 | TIMEOUT_RESTART=2 | |
78 | ||
79 | DEVICE_PRINT_LINE1=" %-24s %s\n" | |
80 | ||
81 | PORT_PATTERN="pN" | |
82 | PORT_PATTERN_ACCESSPOINT="apN" | |
83 | PORT_PATTERN_WIRELESS="wN" |