]> git.ipfire.org Git - people/jschlag/network.git/blobdiff - src/network
reset: Trigger udev to re-add all network interfaces
[people/jschlag/network.git] / src / network
index f26c0dc0ecf5ae7cb056e40e4b78ee9d868993f5..cee7a7e1c1419da501a09e192c83ec47d11bbdd4 100644 (file)
@@ -1181,8 +1181,8 @@ cli_reset() {
        # Flush all DNS servers.
        dns_server_flush
 
-       # Re-run the initialization functions
-       init_run
+       # Trigger udev to re-add all physical network devices
+       cmd_quiet udevadm trigger --action=add --subsystem-match=net
 
        exit ${EXIT_OK}
 }
@@ -1367,7 +1367,11 @@ cli_raw() {
 # 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)