diff options
author | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-03-25 08:59:29 -0300 |
---|---|---|
committer | Vinicius Coque <vinicius.coque@bluepex.com> | 2011-03-25 08:59:29 -0300 |
commit | 152ab4d0c036889d5d983cef0f612c2dcf211e7b (patch) | |
tree | 2120aa2834d2b0218a8bede4629aaac4acfbd5ec /etc/inc/config.lib.inc | |
parent | 54bdff758f68e2e1b1ebd42b8b0b629b68ed1a3d (diff) | |
parent | d93ee937f2305f06148d972be92224a2a52ba9e5 (diff) | |
download | pfsense-152ab4d0c036889d5d983cef0f612c2dcf211e7b.zip pfsense-152ab4d0c036889d5d983cef0f612c2dcf211e7b.tar.gz |
Merge remote-tracking branch 'mainline/master' into inc
Conflicts:
etc/inc/interfaces.inc
etc/inc/priv.defs.inc
etc/inc/shaper.inc
etc/inc/system.inc
Diffstat (limited to 'etc/inc/config.lib.inc')
-rw-r--r-- | etc/inc/config.lib.inc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index c0b568d..b319ef8 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) @@ -397,12 +400,17 @@ function convert_config() { include_once('auth.inc'); include_once('upgrade_config.inc'); + if (file_exists("/etc/inc/upgrade_config_custom.inc")) + include_once("upgrade_config_custom.inc"); /* Loop and run upgrade_VER_to_VER() until we're at current version */ while ($config['version'] < $g['latest_config']) { $cur = $config['version'] * 10; $next = $cur + 1; $migration_function = sprintf('upgrade_%03d_to_%03d', $cur, $next); $migration_function(); + $migration_function = "{$migration_function}_custom"; + if (function_exists($migration_function)) + $migration_function(); $config['version'] = sprintf('%.1f', $next / 10); if($g['booting']) echo "."; |