summaryrefslogtreecommitdiffstats
path: root/usr/local/pkg
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-07-31 10:03:34 -0300
committerRenato Botelho <renato@netgate.com>2015-07-31 10:03:34 -0300
commit5779ade6707ba530517da239d9ec3fc751d17d83 (patch)
tree9295a06ae80c1dd54611e7c279c42e3e242a6790 /usr/local/pkg
parent6fed300c6ae8c5bcac03f867daf737e2676dcc30 (diff)
downloadpfsense-5779ade6707ba530517da239d9ec3fc751d17d83.zip
pfsense-5779ade6707ba530517da239d9ec3fc751d17d83.tar.gz
Introduce a new item to $g global, 'product_version' and stop reading /etc/version all around
Diffstat (limited to 'usr/local/pkg')
-rw-r--r--usr/local/pkg/miniupnpd.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/pkg/miniupnpd.inc b/usr/local/pkg/miniupnpd.inc
index a545744..4ea768c 100644
--- a/usr/local/pkg/miniupnpd.inc
+++ b/usr/local/pkg/miniupnpd.inc
@@ -145,7 +145,7 @@
}
function sync_package_miniupnpd() {
- global $config;
+ global $g, $config;
global $input_errors;
$upnp_config = $config['installedpackages']['miniupnpd']['config'][0];
@@ -238,7 +238,7 @@
$config_text .= "serial=".strtoupper(substr(upnp_uuid(), 0, 8))."\n";
/* set model number */
- $config_text .= "model_number=".file_get_contents("/etc/version")."\n";
+ $config_text .= "model_number=" . $g['product_version'] . "\n";
/* upnp access restrictions */
foreach ($upnp_config['row'] as $row) {
OpenPOWER on IntegriCloud