This new command just call route_apply.
It provide a nice way to take changes of the config file into affect.
Also it helps when the routes are not applied.
This should not happen, but when this command is better then network restart.
Fixes: 11367
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
_network_route() {
local words=( $@ )
- local commands="add list remove"
+ local commands="add list remove reload"
local cmd="$(_network_find_on_cmdline "${commands}")"
if [[ -z "${cmd}" ]]; then
COMPREPLY=( $(compgen -W "${commands}" -- "${cur}") )
route_list $@
return ${EXIT_OK}
;;
+ # Reload all routes.
+ reload)
+ route_apply $@
+ ;;
*)
error "Unrecognized action: ${action}"
cli_run_help network route