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