summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.lib.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/config.lib.inc')
-rw-r--r--etc/inc/config.lib.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index 7232d14..d5e0f62 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -342,8 +342,10 @@ function conf_mount_rw() {
function conf_mount_ro() {
global $g;
+ /* Do not trust $g['platform'] since this can be clobbered during factory reset. */
+ $platform = trim(file_get_contents("/etc/platform"));
/* do not umount on cdrom or pfSense platforms */
- if($g['platform'] == "cdrom" or $g['platform'] == "pfSense")
+ if($platform == "cdrom" or $platform == "pfSense")
return;
if($g['booting'])
OpenPOWER on IntegriCloud