]> git.ipfire.org Git - people/stevee/network.git/blame - functions
Initial import of a lot of firewall code.
[people/stevee/network.git] / functions
CommitLineData
1848564d 1#!/bin/bash
5b20e43a 2
7c8ed605
MT
3# Make sure, that sbins are in PATH.
4export PATH="/usr/local/sbin:/usr/sbin:/sbin:/bin:/usr/bin"
5
0d632ad4
MT
6INIT_FUNCTIONS=""
7
8function init_register() {
9 INIT_FUNCTIONS="${INIT_FUNCTIONS} $@"
10}
11
12function init_run() {
13 local init
14 for init in ${INIT_FUNCTIONS}; do
15 ${init}
16 done
17}
18
d9e4e1ab 19# Include version information.
e9ea243e 20. /usr/lib/network/version
d9e4e1ab 21
e9ea243e 22for file in /usr/lib/network/functions.*; do
1848564d 23 . ${file}
5b20e43a
MT
24done
25
1848564d
MT
26# Reading in network tool configuration
27network_config_read
1b7a1578 28
6dbd51ba
MT
29# Set colour mode
30case "${COLOURS}" in
31 auto)
32 colours_auto_disable
33 ;;
34 off|0)
35 colours_disable
36 ;;
37 on|1)
38 # Do nothing
39 ;;
40 *)
41 warning_log "Unknown parameter given for COLOURS: ${COLOURS}"
42 ;;
43esac