diff options
author | Daniel Stefan Haischt <dsh@pfsense.org> | 2006-08-05 02:30:13 +0000 |
---|---|---|
committer | Daniel Stefan Haischt <dsh@pfsense.org> | 2006-08-05 02:30:13 +0000 |
commit | 549128be2c77b8abcea2ba854e25ecef7b663452 (patch) | |
tree | 26005ea46512719a65ca8007a5c7030ea9060b2e /packages | |
parent | a64e3c7c1c13212aa788035400c69231faf2f579 (diff) | |
download | pfsense-packages-549128be2c77b8abcea2ba854e25ecef7b663452.tar.gz pfsense-packages-549128be2c77b8abcea2ba854e25ecef7b663452.tar.bz2 pfsense-packages-549128be2c77b8abcea2ba854e25ecef7b663452.zip |
- check whether rc file already exists
- removed config_lock, that already hapens in sync_package_p3scan()
Diffstat (limited to 'packages')
-rw-r--r-- | packages/p3scan-pf/p3scan-pf.inc | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/packages/p3scan-pf/p3scan-pf.inc b/packages/p3scan-pf/p3scan-pf.inc index 2d680b67..ede4b7b4 100644 --- a/packages/p3scan-pf/p3scan-pf.inc +++ b/packages/p3scan-pf/p3scan-pf.inc @@ -242,12 +242,14 @@ EOD; $stop = "/usr/bin/killall p3scan\n" . "sleep 2"; - write_rcfile(array( - "file" => "030.p3scan.sh", - "start" => $start, - "stop" => $stop - ) - ); + if (! file_exists("/usr/local/etc/rc.d/030.p3scan.sh")) { + write_rcfile(array( + "file" => "030.p3scan.sh", + "start" => $start, + "stop" => $stop + ) + ); + } conf_mount_ro(); config_unlock(); @@ -329,9 +331,7 @@ function custom_php_deinstall_command() { function add_trans_table(){ global $config; - conf_mount_rw(); - config_lock(); - + /* Flush all entries first, and then add them. */ $p3scan_pf_result = mwexec ('pfctl -a "rdr-package/p3scan" -t p3scan -T flush'); if($p3scan_pf_result <> 0) { @@ -345,9 +345,6 @@ function add_trans_table(){ } } } - /* signal a reload of all files */ - conf_mount_ro(); - config_unlock(); } function remove_transparency() { |