From e55e4b748c7396ab74e93e14fe8d8887fdb43784 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 5 Nov 2014 19:47:22 -0600 Subject: [PATCH] isset($_GET) seems to always evaluate to true, use something more specific. Fixes use of rc.linkup when run from CLI. Others likely fix similar circumstances, though maybe not ones that are used anywhere. --- etc/rc.dyndns.update | 2 +- etc/rc.interfaces_wan_configure | 2 +- etc/rc.linkup | 2 +- etc/rc.openvpn | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/rc.dyndns.update b/etc/rc.dyndns.update index ac56f3562..b350c224b 100755 --- a/etc/rc.dyndns.update +++ b/etc/rc.dyndns.update @@ -37,7 +37,7 @@ require_once("shaper.inc"); /* Interface IP address has changed */ -if (isset($_GET)) +if (isset($_GET['dyndns'])) $argument = $_GET['dyndns']; else $argument = trim($argv[1], " \n"); diff --git a/etc/rc.interfaces_wan_configure b/etc/rc.interfaces_wan_configure index fbdc5e437..c291ee8ad 100755 --- a/etc/rc.interfaces_wan_configure +++ b/etc/rc.interfaces_wan_configure @@ -34,7 +34,7 @@ require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); -if (isset($_GET)) +if (isset($_GET['interface'])) $argument = $_GET['interface']; else $argument = str_replace("\n", "", $argv[1]); diff --git a/etc/rc.linkup b/etc/rc.linkup index 6f7d1589a..bff0c552b 100755 --- a/etc/rc.linkup +++ b/etc/rc.linkup @@ -85,7 +85,7 @@ function handle_argument_group($iface, $argument2) { global $g; if (!file_exists("{$g['varrun_path']}/booting") && empty($g['booting'])) { -if (isset($_GET)) { +if (isset($_GET['interface'])) { if (!empty($_GET['interface'])) handle_argument_group($_GET['interface'], $_GET['action']); } else { diff --git a/etc/rc.openvpn b/etc/rc.openvpn index 3148e4f22..086aa490b 100755 --- a/etc/rc.openvpn +++ b/etc/rc.openvpn @@ -71,7 +71,7 @@ if (file_exists("{$g['varrun_path']}/booting")) return; /* Input argument is a comma-separated list of gateway names, blank or "all". */ -if (isset($_GET)) +if (isset($_GET['interface'])) $argument = $_GET['interface']; else $argument = trim($argv[1], " \n");