From dc9e22331e1a1be39bde6078f86a7b813504f143 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 7 Mar 2023 12:21:30 +0100 Subject: [PATCH] system: expannd to array if not an array Allows command line use: # pluginctl route_reload [wan] --- src/etc/inc/plugins.inc.d/core.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/plugins.inc.d/core.inc b/src/etc/inc/plugins.inc.d/core.inc index 58a125603..809a9b6e1 100644 --- a/src/etc/inc/plugins.inc.d/core.inc +++ b/src/etc/inc/plugins.inc.d/core.inc @@ -489,8 +489,12 @@ function core_run() ]; } -function core_routing_batch($verbose, $interfaces = []) +function core_routing_batch($verbose, $interfaces = [null]) { + if (!is_array($interfaces)) { + $interfaces = [$interfaces]; + } + foreach ($interfaces as $interface) { system_routing_configure($verbose, $interface); }