]> git.ipfire.org Git - people/stevee/network.git/blame - functions
Add systemd unit files for networking.
[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
MT
28
29# Create run dir
30if ! [ -d "${RUN_DIR}" ]; then
31 mkdir ${RUN_DIR}
32fi
6dbd51ba
MT
33
34# Set colour mode
35case "${COLOURS}" in
36 auto)
37 colours_auto_disable
38 ;;
39 off|0)
40 colours_disable
41 ;;
42 on|1)
43 # Do nothing
44 ;;
45 *)
46 warning_log "Unknown parameter given for COLOURS: ${COLOURS}"
47 ;;
48esac
0d632ad4 49