]> git.ipfire.org Git - people/stevee/network.git/blob - functions
Add header to functions file.
[people/stevee/network.git] / functions
1 #!/bin/bash
2 ###############################################################################
3 # #
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2012 IPFire Network Development Team #
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 INIT_FUNCTIONS=""
23
24 function init_register() {
25 INIT_FUNCTIONS="${INIT_FUNCTIONS} $@"
26 }
27
28 function init_run() {
29 local init
30 for init in ${INIT_FUNCTIONS}; do
31 ${init}
32 done
33 }
34
35 # Include version information.
36 . /usr/lib/network/version
37
38 for file in /usr/lib/network/functions.*; do
39 . ${file}
40 done
41
42 # Reading in global configuration files
43 config_read_globals
44
45 # Set colour mode
46 case "${COLOURS}" in
47 auto)
48 colours_auto_disable
49 ;;
50 off|0)
51 colours_disable
52 ;;
53 on|1)
54 # Do nothing
55 ;;
56 *)
57 warning_log "Unknown parameter given for COLOURS: ${COLOURS}"
58 ;;
59 esac