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.inc13
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index 11e1ec3..586d687 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -301,13 +301,16 @@ EOD;
* null
******/
/* mount flash card read/write */
-function conf_mount_rw() {
+function conf_mount_rw($nobootcheck = false) {
global $g;
/* do not mount on cdrom platform */
if($g['platform'] == "cdrom" or $g['platform'] == "pfSense")
return;
+ if($g['booting'] && !$nobootcheck)
+ return;
+
if (refcount_reference(1000) > 1)
return;
@@ -321,7 +324,7 @@ function conf_mount_rw() {
/* if the platform is soekris or wrap or pfSense, lets mount the
* compact flash cards root.
- */
+ */
$status = mwexec("/sbin/mount -u -w -o sync,noatime /");
/* we could not mount this correctly. kick off fsck */
if($status <> 0) {
@@ -339,14 +342,14 @@ function conf_mount_rw() {
* RESULT
* null
******/
-function conf_mount_ro() {
+function conf_mount_ro($nobootcheck = false) {
global $g;
/* do not umount on cdrom or pfSense platforms */
if($g['platform'] == "cdrom" or $g['platform'] == "pfSense")
return;
- if($g['booting'])
+ if($g['booting'] && !$nobootcheck)
return;
if (refcount_unreference(1000) > 0)
@@ -852,4 +855,4 @@ function set_device_perms() {
}
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud