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.
This commit is contained in:
parent
c75e8aed2f
commit
e55e4b748c
|
@ -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");
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
|
|
Reference in New Issue