]> git.ipfire.org Git - people/stevee/network.git/blob - functions
Move config functions into seperate file.
[people/stevee/network.git] / functions
1 #!/bin/bash
2
3 # Make sure, that sbins are in PATH.
4 export PATH="/usr/local/sbin:/usr/sbin:/sbin:/bin:/usr/bin"
5
6 INIT_FUNCTIONS=""
7
8 function init_register() {
9 INIT_FUNCTIONS="${INIT_FUNCTIONS} $@"
10 }
11
12 function init_run() {
13 local init
14 for init in ${INIT_FUNCTIONS}; do
15 ${init}
16 done
17 }
18
19 # Include version information.
20 . /usr/lib/network/version
21
22 for file in /usr/lib/network/functions.*; do
23 . ${file}
24 done
25
26 # Reading in global configuration files
27 config_read_globals
28
29 # Set colour mode
30 case "${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 ;;
43 esac