#!/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 . # # # ############################################################################### # Enable colors by default COLOURS="auto" BASE_DIR=/lib/network CONFIG_DIR=/etc/network HOOKS_DIR=${BASE_DIR}/hooks LOG_DIR=/var/log/network RUN_DIR=/var/run/network ZONE_DIR=${CONFIG_DIR} RED_RUN=${RUN_DIR}/red PPP_SECRETS=/etc/ppp/secrets CONFIG_FILE=${CONFIG_DIR}/network_config CONFIG_FILE_PARAMS="COLOURS DEBUG SHELL TIMEOUT_RESTART" RED_DB_DIR=${RUN_DIR}/red DB_CONNECTION_FILE="${LOG_DIR}/connections.db" # Proper error codes EXIT_OK=0 EXIT_ERROR=1 EXIT_CONF_ERROR=2 EXIT_ERROR_ASSERT=3 # XXX needs check STATUS_UP=0 STATUS_DOWN=1 STATUS_NOCARRIER=2 STATUS_TEXT[${STATUS_UP}]="UP" STATUS_TEXT[${STATUS_DOWN}]="DOWN" STATUS_TEXT[${STATUS_NOCARRIER}]="NO CARRIER" STATUS_COLOUR[${STATUS_UP}]=${COLOUR_GREEN} STATUS_COLOUR[${STATUS_DOWN}]=${COLOUR_RED} STATUS_COLOUR[${STATUS_NOCARRIER}]=${COLOUR_YELLOW} DISCOVER_OK=0 DISCOVER_ERROR=1 DISCOVER_NOT_SUPPORTED=2 # The user is able to create zones that begin with these names VALID_ZONES="green orange red grey" SYS_CLASS_NET="/sys/class/net" # Timeout values TIMEOUT_RESTART=2 DEVICE_PRINT_LINE1=" %-20s %s\n"