summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-03-29 02:42:25 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-03-29 02:42:25 +0000
commit74285e13bd7465106c4eecf451c77dd65adfa7bb (patch)
tree9a75a32150063a9e32a898f4e02e1b9fdf9c136b
parentfbe94068a84cb0c9f5ab1f63b5768fcc37df6f74 (diff)
downloadpfsense-74285e13bd7465106c4eecf451c77dd65adfa7bb.zip
pfsense-74285e13bd7465106c4eecf451c77dd65adfa7bb.tar.gz
Be a nice script for ro environments by mounting the flash rw and then ro before and after the save.
-rwxr-xr-xusr/local/www/edit.php8
-rwxr-xr-xusr/local/www/exec.php8
2 files changed, 16 insertions, 0 deletions
diff --git a/usr/local/www/edit.php b/usr/local/www/edit.php
index 359ea92..daa4443 100755
--- a/usr/local/www/edit.php
+++ b/usr/local/www/edit.php
@@ -30,6 +30,8 @@
require("guiconfig.inc");
+conf_mount_rw();
+
if (($_POST['submit'] == "Load") && file_exists($_POST['savetopath'])) {
$fd = fopen($_POST['savetopath'], "r");
$content = fread($fd, filesize($_POST['savetopath']));
@@ -166,3 +168,9 @@ function sf() { document.forms[0].savetopath.focus(); }
<script language="Javascript">
sf();
</script>
+
+<?php
+
+conf_mount_ro();
+
+?> \ No newline at end of file
diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php
index de21437..925cd84 100755
--- a/usr/local/www/exec.php
+++ b/usr/local/www/exec.php
@@ -26,6 +26,8 @@ if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) {
require("guiconfig.inc");
+conf_mount_rw();
+
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
@@ -248,3 +250,9 @@ document.forms[0].txtCommand.focus();
</script>
</body>
</html>
+
+<?php
+
+conf_mount_ro();
+
+?> \ No newline at end of file
OpenPOWER on IntegriCloud