From e8fa9843b591565630e4233b1ae9f305d3e29224 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 5 Nov 2014 20:45:13 -0600 Subject: [PATCH] Pass friendlyifname to handle_argument_group, not realifname. Fixes #3984. clean up some text while here. --- etc/rc.linkup | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/rc.linkup b/etc/rc.linkup index bff0c552b..5efa725ce 100755 --- a/etc/rc.linkup +++ b/etc/rc.linkup @@ -39,8 +39,10 @@ require_once("interfaces.inc"); function handle_argument_group($iface, $argument2) { global $config; - if (!is_array($config['interfaces'][$iface])) + if (!is_array($config['interfaces'][$iface])) { + log_error("Cannot find interface configuration for {$iface}"); return; + } $ipaddr = $config['interfaces'][$iface]['ipaddr']; $ip6addr = $config['interfaces'][$iface]['ipaddrv6']; @@ -87,10 +89,10 @@ global $g; if (!file_exists("{$g['varrun_path']}/booting") && empty($g['booting'])) { if (isset($_GET['interface'])) { if (!empty($_GET['interface'])) - handle_argument_group($_GET['interface'], $_GET['action']); + handle_argument_group(convert_real_interface_to_friendly_interface_name($_GET['interface']), $_GET['action']); } else { if ($argc < 3) { - log_error("HOTPLUG event: The number of required parameters not passed!"); + log_error("HOTPLUG event: The required number of parameters not passed!"); exit; } $action = $argv[1]; @@ -99,7 +101,7 @@ if (isset($_GET['interface'])) { case "stop": break; default: - log_error("HOTPLUG event: The action parameter passed is wrong($action) only start/stop/up/down are allowed!"); + log_error("HOTPLUG event: Action parameter ($action) passed is wrong - only start/stop/up/down are allowed!"); exit; /* NOTREACHED */ break;