diff options
author | jim-p <jimp@pfsense.org> | 2011-06-16 16:26:00 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-06-16 16:26:00 -0400 |
commit | 2de8d7457116753709fdb8030b6a9623d328cc52 (patch) | |
tree | ebb9b39b10aa30ca325dded530b7eec6f5ef081e /etc/inc/config.lib.inc | |
parent | 62905808cbdf86088a637da92f7cb2946e28d527 (diff) | |
download | pfsense-2de8d7457116753709fdb8030b6a9623d328cc52.zip pfsense-2de8d7457116753709fdb8030b6a9623d328cc52.tar.gz |
Do a more thorough check for platform on the ro call, or factory reset blows up.
Diffstat (limited to 'etc/inc/config.lib.inc')
-rw-r--r-- | etc/inc/config.lib.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index 859eb8e..575a661 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']) |