From: Jonatan Schlag Date: Sun, 4 Jun 2017 14:09:07 +0000 (+0200) Subject: route: add new cli command reload X-Git-Tag: 009~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86c225b895de7d19cecc513c5d30df5dbf016159;p=network.git route: add new cli command reload 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 Signed-off-by: Michael Tremer --- diff --git a/src/bash-completion/network b/src/bash-completion/network index 6f63f1b3..27272e9b 100644 --- a/src/bash-completion/network +++ b/src/bash-completion/network @@ -258,7 +258,7 @@ _network_port_subcommand() { _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}") ) diff --git a/src/network b/src/network index e65eb6bf..fbb7e9ab 100644 --- a/src/network +++ b/src/network @@ -765,6 +765,10 @@ cli_route() { route_list $@ return ${EXIT_OK} ;; + # Reload all routes. + reload) + route_apply $@ + ;; *) error "Unrecognized action: ${action}" cli_run_help network route