diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-26 04:19:06 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-26 04:19:06 +0000 |
commit | b92d8b7c6c4db0424e6fa702930284a7265c9538 (patch) | |
tree | b39b28cdbfe7ab8d5d5b17ae577845a329c0832b /packages/spamd.xml | |
parent | c8295d12fb611f8c9f63a703b2edc23ed790b570 (diff) | |
download | pfsense-packages-b92d8b7c6c4db0424e6fa702930284a7265c9538.tar.gz pfsense-packages-b92d8b7c6c4db0424e6fa702930284a7265c9538.tar.bz2 pfsense-packages-b92d8b7c6c4db0424e6fa702930284a7265c9538.zip |
Make sure sync_package will remount the media r/w and mount it r/o when its done updating the configuration :)
Diffstat (limited to 'packages/spamd.xml')
-rw-r--r-- | packages/spamd.xml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/spamd.xml b/packages/spamd.xml index 68d966d2..354ca909 100644 --- a/packages/spamd.xml +++ b/packages/spamd.xml @@ -79,6 +79,8 @@ </fields> <custom_php_command_before_form> function sync_package() { + conf_mount_rw(); + config_lock(); global $config; $fd = fopen("/usr/local/etc/spamd.conf","w"); /* all header */ @@ -106,6 +108,8 @@ fwrite($fd, $spamd['ip'] . "\n"); } fclose($fd); + conf_mount_ro(); + config_unlock(); } </custom_php_command_before_form> <custom_php_resync_config_command> @@ -119,6 +123,7 @@ mwexec("/usr/libexec/spamd-setup &"); mwexec("/usr/libexec/spamlogd &"); $fd = fopen("/usr/local/etc/rc.d/spamd","w"); + fwrite($fd, "#!/bin/sh\n\n"); fwrite($fd, "/usr/libexec/spamd-setup &\n"); fwrite($fd, "/usr/libexec/spamlogd &\n"); fclose($fd); |