summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-10-12 16:29:07 -0300
committerRenato Botelho <renato@netgate.com>2016-10-12 16:29:49 -0300
commitdc61252ae4dbfcfe5d75f40c86b5cf955242b788 (patch)
tree8db639550cb248216a10b6b9d5ec10ab6384c32f /src/usr
parent9ed7f8f635c6b8d8074c2abe754aadb965aa47c4 (diff)
downloadpfsense-dc61252ae4dbfcfe5d75f40c86b5cf955242b788.zip
pfsense-dc61252ae4dbfcfe5d75f40c86b5cf955242b788.tar.gz
Deprecate nanobsd platform and remove all conditionals that uses it
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/head.inc10
-rw-r--r--src/usr/local/www/index.php14
-rw-r--r--src/usr/local/www/status_logs_settings.php2
-rw-r--r--src/usr/local/www/system_advanced_misc.php28
-rw-r--r--src/usr/local/www/system_update_settings.php2
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php19
6 files changed, 23 insertions, 52 deletions
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index 43c9375..9a3df33 100644
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -212,9 +212,7 @@ $system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php");
$system_menu[] = array(gettext("Update"), "/pkg_mgr_install.php?id=firmware");
$system_menu[] = array(gettext("General Setup"), "/system.php");
$system_menu[] = array(gettext("High Avail. Sync"), "/system_hasync.php");
-if ($g['platform'] == $g['product_name'] or $g['platform'] == "nanobsd") {
- $system_menu[] = array(gettext("Package Manager"), "/pkg_mgr_installed.php");
-}
+$system_menu[] = array(gettext("Package Manager"), "/pkg_mgr_installed.php");
$system_menu[] = array(gettext("Setup Wizard"), "/wizard.php?xml=setup_wizard.xml");
$system_menu[] = array(gettext("Routing"), "/system_gateways.php");
$system_menu[] = array(gettext("Cert. Manager"), "/system_camanager.php");
@@ -305,11 +303,7 @@ $status_menu[] = array(gettext("IPsec"), "/status_ipsec.php");
$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php");
$status_menu[] = array(gettext("NTP"), "/status_ntpd.php");
$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php");
-
-if ($g['platform'] == $g['product_name']) {
- $status_menu[] = array(gettext("Package Logs"), "/status_pkglogs.php");
-}
-
+$status_menu[] = array(gettext("Package Logs"), "/status_pkglogs.php");
$status_menu[] = array(gettext("Queues"), "/status_queues.php");
$status_menu[] = array(gettext("Services"), "/status_services.php");
$status_menu[] = array(gettext("System Logs"), "/status_logs.php");
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index 460ddbd..2995ad8 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -155,14 +155,12 @@ if (file_exists("/usr/sbin/swapinfo")) {
## If packages are installed lets resync
if (file_exists('/conf/needs_package_sync')) {
if ($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) {
- if ($g['platform'] == $g['product_name'] || $g['platform'] == "nanobsd") {
- ## If the user has logged into webGUI quickly while the system is booting then do not redirect them to
- ## the package reinstall page. That is about to be done by the boot script anyway.
- ## The code in head.inc will put up a notice to the user.
- if (!platform_booting()) {
- header('Location: pkg_mgr_install.php?mode=reinstallall');
- exit;
- }
+ ## If the user has logged into webGUI quickly while the system is booting then do not redirect them to
+ ## the package reinstall page. That is about to be done by the boot script anyway.
+ ## The code in head.inc will put up a notice to the user.
+ if (!platform_booting()) {
+ header('Location: pkg_mgr_install.php?mode=reinstallall');
+ exit;
}
} else {
@unlink('/conf/needs_package_sync');
diff --git a/src/usr/local/www/status_logs_settings.php b/src/usr/local/www/status_logs_settings.php
index 62acf2b..33881ed 100644
--- a/src/usr/local/www/status_logs_settings.php
+++ b/src/usr/local/www/status_logs_settings.php
@@ -313,7 +313,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Checkbox(
'disablelocallogging',
'Local Logging',
- $g['platform'] == $g['product_name'] ? "Disable writing log files to the local disk" : "Disable writing log files to the local RAM disk",
+ "Disable writing log files to the local disk",
$pconfig['disablelocallogging']
));
diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php
index aae6b8f..817b745 100644
--- a/src/usr/local/www/system_advanced_misc.php
+++ b/src/usr/local/www/system_advanced_misc.php
@@ -255,7 +255,7 @@ if ($_POST) {
// Add/Remove RAM disk periodic backup cron jobs according to settings and installation type.
// Remove the cron jobs on full install if not using RAM disk.
// Add the cron jobs on all others if the periodic backup option is set. Otherwise the cron job is removed.
- if (($g['platform'] == $g['product_name']) && !isset($config['system']['use_mfs_tmpvar'])) {
+ if (!isset($config['system']['use_mfs_tmpvar'])) {
install_cron_job("/etc/rc.backup_rrd.sh", false);
install_cron_job("/etc/rc.backup_dhcpleases.sh", false);
} else {
@@ -497,7 +497,7 @@ $section->addInput(new Form_Checkbox(
'use_mfs_tmpvar',
'Use RAM Disks',
'Use memory file system for /tmp and /var',
- ($pconfig['use_mfs_tmpvar'] || $g['platform'] != $g['product_name'])
+ $pconfig['use_mfs_tmpvar']
))->setHelp('Set this to use /tmp and /var as RAM disks (memory file '.
'system disks) on a full install rather than use the hard disk. Setting this will '.
'cause the data in /tmp and /var to be lost, including log data. RRD '.
@@ -543,22 +543,20 @@ $section->addInput(new Form_Input(
$form->add($section);
-if ($g['platform'] == "pfSense") {
- $section = new Form_Section('Hardware Settings');
+$section = new Form_Section('Hardware Settings');
- $opts = array(0.5, 1, 2, 3, 4, 5, 7.5, 10, 15, 20, 30, 60);
- $vals = array( 6, 12, 24, 36, 48, 60, 90, 120, 180, 240, 241, 242);
+$opts = array(0.5, 1, 2, 3, 4, 5, 7.5, 10, 15, 20, 30, 60);
+$vals = array( 6, 12, 24, 36, 48, 60, 90, 120, 180, 240, 241, 242);
- $section->addInput(new Form_Select(
- 'harddiskstandby',
- 'Hard disk standby time',
- $pconfig['harddiskstandby'],
- ['' => gettext("Always on")] + array_combine($opts, $vals)
- ))->setHelp("Puts the hard disk into standby mode when the selected number of minutes has elapsed since the last access." . "<br />" .
- "<strong> Do not set this for CF cards.</strong>");
+$section->addInput(new Form_Select(
+ 'harddiskstandby',
+ 'Hard disk standby time',
+ $pconfig['harddiskstandby'],
+ ['' => gettext("Always on")] + array_combine($opts, $vals)
+))->setHelp("Puts the hard disk into standby mode when the selected number of minutes has elapsed since the last access." . "<br />" .
+ "<strong> Do not set this for CF cards.</strong>");
- $form->add($section);
-}
+$form->add($section);
$section = new Form_Section('Installation Feedback');
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php
index c22c48b..7b3d5bc 100644
--- a/src/usr/local/www/system_update_settings.php
+++ b/src/usr/local/www/system_update_settings.php
@@ -142,7 +142,7 @@ $section->addInput(new Form_Checkbox(
$form->add($section);
-if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) {
+if (file_exists("/usr/local/bin/git")) {
$section = new Form_Section('GitSync');
$section->addInput(new Form_Checkbox(
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index 7055688..1cae8f0 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -125,25 +125,6 @@ $filesystems = get_mounted_filesystems();
<?php endif; ?>
</td>
</tr>
- <?php if ($g['platform'] == "nanobsd"): ?>
- <?php
- global $SLICE, $OLDSLICE, $TOFLASH, $COMPLETE_PATH, $COMPLETE_BOOT_PATH;
- global $GLABEL_SLICE, $UFS_ID, $OLD_UFS_ID, $BOOTFLASH;
- global $BOOT_DEVICE, $REAL_BOOT_DEVICE, $BOOT_DRIVE, $ACTIVE_SLICE;
- nanobsd_detect_slice_info();
- $rw = is_writable("/") ? "(rw)" : "(ro)";
- ?>
- <tr>
- <th><?=gettext("NanoBSD Boot Slice");?></th>
- <td>
- <?=htmlspecialchars(nanobsd_friendly_slice_name($BOOT_DEVICE));?> / <?=htmlspecialchars($BOOTFLASH);?><?=$rw;?>
- <?php if ($BOOTFLASH != $ACTIVE_SLICE): ?>
- <br /><br /><?=gettext('Next Boot')?>:<br />
- <?=htmlspecialchars(nanobsd_friendly_slice_name($GLABEL_SLICE));?> / <?=htmlspecialchars($ACTIVE_SLICE);?>
- <?php endif; ?>
- </td>
- </tr>
- <?php endif; ?>
<tr>
<th><?=gettext("CPU Type");?></th>
<td><?=htmlspecialchars(get_single_sysctl("hw.model"))?>
OpenPOWER on IntegriCloud