aboutsummaryrefslogtreecommitdiffstats
path: root/config/rate/rate.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-07-08 16:32:50 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-07-08 16:32:57 -0400
commitff6d3ae1d52c13b77ab2d73e79e6e2046e3c534d (patch)
tree3e200f91458e4f40fa7fa8877f83350bea4de3c5 /config/rate/rate.inc
parent468fb95fa0d35afb892d5129842ebaee18a74bdf (diff)
downloadpfsense-packages-ff6d3ae1d52c13b77ab2d73e79e6e2046e3c534d.tar.gz
pfsense-packages-ff6d3ae1d52c13b77ab2d73e79e6e2046e3c534d.tar.bz2
pfsense-packages-ff6d3ae1d52c13b77ab2d73e79e6e2046e3c534d.zip
Make package work on embedded installations
Diffstat (limited to 'config/rate/rate.inc')
-rw-r--r--config/rate/rate.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/rate/rate.inc b/config/rate/rate.inc
index a00ee736..0b3ad769 100644
--- a/config/rate/rate.inc
+++ b/config/rate/rate.inc
@@ -2,7 +2,7 @@
function rate_install() {
global $g, $config;
-
+ conf_mount_rw();
/* Copy files for backup. */
mwexec("cp /usr/local/www/status_graph.php /usr/local/www/status_graph.php.orig");
unlink("/usr/local/www/status_graph.php");
@@ -12,18 +12,23 @@ function rate_install() {
rate_assign_privs();
/* Clear the APC cache so that the updates to installed files will work. */
apc_clear_cache();
+ conf_mount_ro();
}
function rate_deinstall() {
+ conf_mount_rw();
unlink("/usr/local/www/status_graph.php");
unlink("/usr/local/www/bandwidth_by_ip.php");
mwexec("cp /usr/local/www/status_graph.php.orig /usr/local/www/status_graph.php");
+ conf_mount_ro();
}
function rate_assign_privs() {
+ conf_mount_rw();
/* Fix permissions on replaced files */
mwexec("chown root:wheel /usr/local/www/bandwidth_by_ip.php");
mwexec("chown root:wheel /usr/local/www/status_graph.php");
+ conf_mount_ro();
}
?> \ No newline at end of file