summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-08 18:34:25 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-08 18:34:25 +0000
commit3339fac0c4d8536aca2b1199a064197e3ef3d329 (patch)
treee7f8b3fc25570bf826b8dc3a86e286a07b1f5b7b /etc/inc
parentdc7c57acdaee86384b810939c7b895f327f95a89 (diff)
downloadpfsense-3339fac0c4d8536aca2b1199a064197e3ef3d329.zip
pfsense-3339fac0c4d8536aca2b1199a064197e3ef3d329.tar.gz
Place conf_mount_ro() calls where supposed too.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pkg-utils.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 0c30967..b206959 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -68,6 +68,7 @@ if(!is_dir("/usr/local/pkg") or !is_dir("/usr/local/pkg/pf")) {
safe_mkdir("/usr/local/pkg");
safe_mkdir("/usr/local/pkg/pf");
}
+conf_mount_ro();
$version = split("-", trim(file_get_contents("/etc/version")));
$ver = split("\.", $version[0]);
@@ -435,12 +436,14 @@ function install_package($package, $pkg_info = "") {
if(!file_exists('/usr/local/pkg/' . $fetchto)) {
@fwrite($fd_log, "ERROR! Unable to fetch package configuration file. Aborting installation.\n");
if($pkg_interface == "console") {
+ conf_mount_ro();
print "\nERROR! Unable to fetch package configuration file. Aborting package installation.\n";
return;
} else {
$static_output .= "failed!\n\nInstallation aborted.";
update_output_window($static_output);
echo "<br>Show <a href=\"pkg_mgr_install.php?showlog=true\">install log</a></center>";
+ conf_mount_ro();
return -1;
}
}
@@ -461,6 +464,7 @@ function install_package($package, $pkg_info = "") {
$to_output = "overwrite!\n";
}
/* XXX: Fix inclusion of config.inc that causes data loss! */
+ conf_mount_ro();
write_config();
$static_output .= $to_output;
update_output_window($static_output);
@@ -792,6 +796,7 @@ function delete_package_xml($pkg) {
}
ob_flush();
sleep(1);
+ conf_mount_ro();
return;
}
/* set up logging if needed */
@@ -934,6 +939,7 @@ function delete_package_xml($pkg) {
update_output_window($static_output);
}
/* remove config.xml entries */
+ conf_mount_ro();
$static_output .= "\tConfiguration... ";
update_output_window($static_output);
unset($config['installedpackages']['package'][$pkgid]);
OpenPOWER on IntegriCloud