Commit fb74578a authored by Franco Fichtner's avatar Franco Fichtner

platform: the story of a historic mess

The platform information should be used to identify a platform
type, not the product name.  Not sure why pfSense came up with
this, but now it's so deeply tied into the system that we can't
just take it out.  The platform type is also steered by the
installer or build tools at the moment.  We will change that,
but it'll take more testing.

Discussed with: Jos
parent e140af0f
......@@ -311,7 +311,7 @@ function conf_mount_rw() {
global $g, $config;
/* do not mount on cdrom platform */
if($g['platform'] == "cdrom" or $g['platform'] == "OPNsense")
if($g['platform'] == "cdrom" or $g['platform'] == "pfSense")
return;
if ((refcount_reference(1000) > 1) && is_writable("/"))
......@@ -351,7 +351,7 @@ function conf_mount_ro() {
/* Do not trust $g['platform'] since this can be clobbered during factory reset. */
$platform = trim(file_get_contents("/usr/local/etc/platform"));
/* do not umount on cdrom or pfSense platforms */
if($platform == "cdrom" or $platform == "OPNsense")
if($platform == "cdrom" or $platform == "pfSense")
return;
if (refcount_unreference(1000) > 0)
......
......@@ -138,7 +138,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<td width="25%" class="vncellt"><?=gettext("Platform");?></td>
<td width="75%" class="listr">
<?=htmlspecialchars($g['platform']);?>
<?=htmlspecialchars($g['platform'] === 'pfSense' ? 'OPNsense' : $['platform'] /* XXX */);?>
<?php if (($g['platform'] == "nanobsd") && (file_exists("/etc/nanosize.txt"))) {
echo " (" . htmlspecialchars(trim(file_get_contents("/etc/nanosize.txt"))) . ")";
} ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment