]> git.ipfire.org Git - people/ms/network.git/blob - functions
Introduce new versioning schema.
[people/ms/network.git] / functions
1 #!/bin/bash
2
3 INIT_FUNCTIONS=""
4
5 function init_register() {
6 INIT_FUNCTIONS="${INIT_FUNCTIONS} $@"
7 }
8
9 function init_run() {
10 local init
11 for init in ${INIT_FUNCTIONS}; do
12 ${init}
13 done
14 }
15
16 # Include version information.
17 . /lib/network/version
18
19 for file in /lib/network/functions.*; do
20 . ${file}
21 done
22
23 # Reading in network tool configuration
24 network_config_read
25
26 # Create run dir
27 if ! [ -d "${RUN_DIR}" ]; then
28 mkdir ${RUN_DIR}
29 fi
30
31 # Set colour mode
32 case "${COLOURS}" in
33 auto)
34 colours_auto_disable
35 ;;
36 off|0)
37 colours_disable
38 ;;
39 on|1)
40 # Do nothing
41 ;;
42 *)
43 warning_log "Unknown parameter given for COLOURS: ${COLOURS}"
44 ;;
45 esac
46