Only one function used this and it was slow since it got initialised
every time the functions were loaded.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
radvd_update
}
-# Update resolv.conf(5) when initializing the network.
-init_register dns_generate_resolvconf
-
dns_generate_resolvconf() {
local file=${RESOLV_CONF}
# PATH variable.
export PATH="@utildir@:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:${PATH}"
-INIT_FUNCTIONS=""
-
-init_register() {
- INIT_FUNCTIONS="${INIT_FUNCTIONS} $@"
-}
-
-init_run() {
- local init
- for init in ${INIT_FUNCTIONS}; do
- ${init}
- done
-
- # Also execute all triggers
- triggers_execute_all "init"
-}
-
VERSION="@PACKAGE_VERSION@"
NETWORK_VERSION="${VERSION}"
# Flush all DNS servers.
dns_server_flush
- # Re-run the initialization functions
- init_run
-
exit ${EXIT_OK}
}
# Process the given action
case "${action}" in
init)
- init_run
+ # Update resolv.conf(5) when initializing the network
+ dns_generate_resolvconf
+
+ # Also execute all triggers
+ triggers_execute_all "init"
;;
settings|hostname|port|device|zone|start|stop|restart|status|reset|route|vpn|wireless)