#!/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 . # # # ############################################################################### # Set gettext text domain. TEXTDOMAIN="network" LOG_DIR=/var/log/network RUN_DIR=/run/network LOCK_DIR=/var/lock RED_RUN=${RUN_DIR}/red PPP_SECRETS=/etc/ppp/secrets # Network directory configuration. NETWORK_CONFIG_DIR="/etc/network" NETWORK_DB_DIR="${RUN_DIR}/db" NETWORK_HOOKS_DIR=/usr/lib/network/hooks NETWORK_HELPERS_DIR=/usr/lib/network/helpers NETWORK_PORTS_DIR="${NETWORK_CONFIG_DIR}/ports" NETWORK_TRIGGERS_DIR=/usr/lib/network/triggers NETWORK_ZONES_DIR="${NETWORK_CONFIG_DIR}/zones" NETWORK_SHARE_DIR=/usr/share/network NETWORK_CACHE_DIR=/var/cache/network NETWORK_IPSEC_CONNS_DIR="${NETWORK_CONFIG_DIR}/vpn/ipsec/connections" NETWORK_IPSEC_POOLS_DIR="${NETWORK_CONFIG_DIR}/vpn/ipsec/pools" NETWORK_IPSEC_SWANCTL_CONNECTIONS_DIR="/etc/swanctl/connections" NETWORK_IPSEC_SWANCTL_POOLS_DIR="/etc/swanctl/pools" # WPA supplicant WPA_SUPPLICANT_CONF_DIR="/etc/wpa_supplicant" # Network file configuration. NETWORK_SETTINGS_FILE=${NETWORK_CONFIG_DIR}/config NETWORK_SETTINGS_FILE_PARAMS="DEBUG" NETWORK_WIRELESS_NETWORKS_DIR="${NETWORK_CONFIG_DIR}/wireless/networks" CONFIG_HOSTNAME="/etc/hostname" RED_DB_DIR=${RUN_DIR}/red ROUTING_DB_DIR=${RUN_DIR}/routing DB_CONNECTION_FILE="${LOG_DIR}/connections.db" # (Static) route settings. NETWORK_CONFIG_ROUTES="${NETWORK_CONFIG_DIR}/routes" NETWORK_CONFIG_ROUTES_PARAMS="network gateway unreachable prohibit blackhole mtu" # Proper error codes EXIT_OK=0 EXIT_ERROR=1 EXIT_CONF_ERROR=2 EXIT_NOT_SUPPORTED=3 EXIT_NOT_HANDLED=4 EXIT_COMMAND_NOT_FOUND=127 EXIT_ERROR_ASSERT=128 EXIT_TRUE=0 EXIT_FALSE=1 EXIT_UNKNOWN=2 # Exit codes for IPv6 duplicate address detection (DAD) EXIT_DAD_OK=0 EXIT_DAD_FAILED=8 EXIT_DAD_TENTATIVE=8 STATUS_UP=0 STATUS_DOWN=1 STATUS_NOCARRIER=2 DISCOVER_OK=0 DISCOVER_ERROR=1 DISCOVER_NOT_SUPPORTED=2 # The user is able to create zones that begin # with these names followed by a number. ZONE_LOCAL="net" ZONE_NONLOCAL="upl" VALID_ZONES="${ZONE_LOCAL} ${ZONE_NONLOCAL}" SYS_CLASS_NET="/sys/class/net" # Timeout values TIMEOUT_RESTART=2 DEVICE_PRINT_LINE1=" %-24s %s\n" PORT_PATTERN="pN" PORT_PATTERN_ACCESSPOINT="apN" PORT_PATTERN_BATMAN_ADV="batN" PORT_PATTERN_MESH="mN" PORT_PATTERN_WIRELESS="wN" PORT_PATTERN_WIRELESS_ADHOC="adhocN" PORT_PATTERN_WIRELESS_MONITOR="wmonN"