summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-11-24 07:31:32 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-11-24 07:31:32 -0500
commita1402bb6e28daaf57d3b4984beab38d49525c0c3 (patch)
tree8031d7d8661f5afe63e9963428c33c65fa3e2882
parent1c72e99f58fe901a4c2664aac1955927ebce58f1 (diff)
parent2ed5fb610146526c6c320820f282464ec9e8db35 (diff)
downloadpfsense-a1402bb6e28daaf57d3b4984beab38d49525c0c3.zip
pfsense-a1402bb6e28daaf57d3b4984beab38d49525c0c3.tar.gz
Merge pull request #2109 from phil-davis/patch-3
-rwxr-xr-xsrc/etc/rc2
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade5
-rw-r--r--src/usr/local/www/interfaces.php2
-rw-r--r--src/usr/local/www/pkg_mgr_install.php4
-rw-r--r--src/usr/local/www/services_dnsmasq.php41
-rw-r--r--src/usr/local/www/shortcuts.inc6
-rw-r--r--src/usr/local/www/widgets/widgets/installed_packages.widget.php30
7 files changed, 42 insertions, 48 deletions
diff --git a/src/etc/rc b/src/etc/rc
index 1e2ca6f..88e3578 100755
--- a/src/etc/rc
+++ b/src/etc/rc
@@ -120,7 +120,7 @@ if [ "${PLATFORM}" != "cdrom" ]; then
/etc/rc.embedded
fi
- if [ -n "${MOVE_PKG_DATA}" ]; then
+ if [ -n "${MOVE_PKG_DATA}" -o "${USE_MFS_TMPVAR}" = "true" ]; then
/bin/mkdir -p /var/db /var/cache
ln -sf ../../root/var/db/pkg /var/db/pkg
ln -sf ../../root/var/cache/pkg /var/cache/pkg
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index 1a60d65..19240cb 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -430,8 +430,9 @@ pkg_upgrade() {
# Repository URL is not mandatory
if [ -n "${branch}" ]; then
- /usr/local/sbin/pfSsh.php playback gitsync \
- ${repositoryurl} ${branch} --upgrading
+ _exec "/usr/local/sbin/pfSsh.php playback gitsync \
+ ${repositoryurl} ${branch} --upgrading" \
+ "Running gitsync" mute ignore_result
fi
fi
}
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index a0aa609..11b6132 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -3186,7 +3186,7 @@ events.push(function(){
break;
}
case "staticv4": {
- $('.dhcpadvanced, .none, dhcp').hide();
+ $('.dhcpadvanced, .none, .dhcp').hide();
$('.pppoe, .pptp, .ppp').hide();
break;
}
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php
index ba4dc2e..08a6f7f 100644
--- a/src/usr/local/www/pkg_mgr_install.php
+++ b/src/usr/local/www/pkg_mgr_install.php
@@ -389,8 +389,8 @@ if (!empty($_POST['id']) || $_POST['mode'] == "reinstallall"):
$start_polling = true;
}
?>
- <input type="hidden" name="id" value="<?=$_POST['id']?>" />
- <input type="hidden" name="mode" value="<?=$_POST['mode']?>" />
+ <input type="hidden" name="id" value="<?=htmlspecialchars($_POST['id'])?>" />
+ <input type="hidden" name="mode" value="<?=htmlspecialchars($_POST['mode'])?>" />
<input type="hidden" name="completed" value="true" />
<div id="countdown" style="text-align: center;"></div>
diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php
index 9c11d4a..56c4294 100644
--- a/src/usr/local/www/services_dnsmasq.php
+++ b/src/usr/local/www/services_dnsmasq.php
@@ -102,16 +102,21 @@ $a_hosts = &$config['dnsmasq']['hosts'];
$a_domainOverrides = &$config['dnsmasq']['domainoverrides'];
if ($_POST) {
- if($_POST['apply']) {
- // Reload filter (we might need to sync to CARP hosts)
- $retval = filter_configure();
- /* Update resolv.conf in case the interface bindings exclude localhost. */
- system_resolvconf_generate();
- /* Start or restart dhcpleases when it's necessary */
- system_dhcpleases_configure();
- if ($retval == 0) {
- clear_subsystem_dirty('hosts');
- }
+ if ($_POST['apply']) {
+ $retval = 0;
+ $retval = services_dnsmasq_configure();
+ $savemsg = get_std_save_message($retval);
+
+ // Reload filter (we might need to sync to CARP hosts)
+ filter_configure();
+ /* Update resolv.conf in case the interface bindings exclude localhost. */
+ system_resolvconf_generate();
+ /* Start or restart dhcpleases when it's necessary */
+ system_dhcpleases_configure();
+
+ if ($retval == 0) {
+ clear_subsystem_dirty('hosts');
+ }
} else {
$pconfig = $_POST;
unset($input_errors);
@@ -161,21 +166,7 @@ if ($_POST) {
if (!$input_errors) {
write_config();
-
- $retval = 0;
- $retval = services_dnsmasq_configure();
- $savemsg = get_std_save_message($retval);
-
- // Reload filter (we might need to sync to CARP hosts)
- filter_configure();
- /* Update resolv.conf in case the interface bindings exclude localhost. */
- system_resolvconf_generate();
- /* Start or restart dhcpleases when it's necessary */
- system_dhcpleases_configure();
-
- if ($retval == 0) {
- clear_subsystem_dirty('hosts');
- }
+ mark_subsystem_dirty('hosts');
}
}
}
diff --git a/src/usr/local/www/shortcuts.inc b/src/usr/local/www/shortcuts.inc
index b2d021c..350733d 100644
--- a/src/usr/local/www/shortcuts.inc
+++ b/src/usr/local/www/shortcuts.inc
@@ -124,7 +124,7 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
break;
}
if (!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}")) {
- return "{$space}<a href=\"{$link}\" title=\"" . gettext("Main page for this section") . "\"><i class=\"fa fa-plus-circle\"></i></a>";
+ return "{$space}<a href=\"{$link}\" title=\"" . gettext("Related settings") . "\"><i class=\"fa fa-sliders\"></i></a>";
}
}
@@ -152,7 +152,7 @@ function get_shortcut_status_link($shortcut_section, $addspace = true, $service
break;
}
if (!empty($link)) {
- return "{$space}<a href=\"{$link}\" title=\"" . gettext("Status of items on this page") . "\"><i class=\"fa fa-cog\"></i></a>";
+ return "{$space}<a href=\"{$link}\" title=\"" . gettext("Related status") . "\"><i class=\"fa fa-cog\"></i></a>";
}
}
@@ -160,7 +160,7 @@ function get_shortcut_log_link($shortcut_section, $addspace = true) {
global $g, $shortcuts;
$space = ($addspace) ? "&nbsp;" : "" ;
if (!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) {
- return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Log entries for items on this page") . "\"><i class=\"fa fa-list-alt\"></i></a>";
+ return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Related log entries") . "\"><i class=\"fa fa-list-alt\"></i></a>";
}
}
diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php
index 17e9439..5f7e29a 100644
--- a/src/usr/local/www/widgets/widgets/installed_packages.widget.php
+++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php
@@ -66,12 +66,20 @@ require_once("functions.inc");
require_once("/usr/local/www/widgets/include/installed_packages.inc");
require_once("pkg-utils.inc");
-$package_list = get_pkg_info();
-$installed_packages = array_filter($package_list, function($v) {
- return (isset($v['installed']) || isset($v['broken']));
-});
-
if($_REQUEST && $_REQUEST['ajax']) {
+ $package_list = get_pkg_info();
+ $installed_packages = array_filter($package_list, function($v) {
+ return (isset($v['installed']) || isset($v['broken']));
+ });
+
+ if (empty($installed_packages)) {
+ print("<div class=\"alert alert-warning\" role=\"alert\">\n");
+ print(" <strong>No packages installed.</strong>\n");
+ print(" You can install packages <a href=\"pkg_mgr.php\" class=\"alert-link\">here</a>.\n");
+ print("</div>\n");
+ exit;
+ }
+
print("<thead>\n");
print( "<tr>\n");
print( "<th>" . gettext("Name") . "</th>\n");
@@ -163,19 +171,13 @@ if($_REQUEST && $_REQUEST['ajax']) {
exit;
}
+?>
-if (empty($installed_packages)): ?>
-<div class="alert alert-warning" role="alert">
- <strong>No packages installed.</strong>
- You can install packages <a href="pkg_mgr.php" class="alert-link">here</a>.
-</div>
-<?php else: ?>
<div class="table-responsive">
<table id="pkgtbl" class="table table-striped table-hover table-condensed">
- <tr><td><?=gettext("Retrieving package data")?></td></tr>
+ <tr><td><?=gettext("Retrieving package data")?>&nbsp;<i class="fa fa-cog fa-spin"</i></td></tr>
</table>
</div>
-<?php endif; ?>
<div style="text-align: center;">
<?=gettext("Packages may be added/managed here: ")?> <a href="pkg_mgr_installed.php">System -&gt;Packages</a>
@@ -206,4 +208,4 @@ if (empty($installed_packages)): ?>
get_pkg_stats();
});
//]]>
-</script> \ No newline at end of file
+</script>
OpenPOWER on IntegriCloud