aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-13 23:12:45 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-13 23:12:45 +0000
commita9786671ec16879debfda748c9a9bba497846d2c (patch)
tree3f70e9e4640614253080743f91557d8a4756d7a3
parent302053445c0c75c670643bbd7b9aa78e164f02bd (diff)
downloadpfsense-packages-a9786671ec16879debfda748c9a9bba497846d2c.tar.gz
pfsense-packages-a9786671ec16879debfda748c9a9bba497846d2c.tar.bz2
pfsense-packages-a9786671ec16879debfda748c9a9bba497846d2c.zip
* Delete rule 10 if it exists
* Run file after creation
-rw-r--r--packages/per-user-bandwidth-distribution.xml4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/per-user-bandwidth-distribution.xml b/packages/per-user-bandwidth-distribution.xml
index 18b28f18..eda583f7 100644
--- a/packages/per-user-bandwidth-distribution.xml
+++ b/packages/per-user-bandwidth-distribution.xml
@@ -44,12 +44,14 @@
<custom_add_php_command>
$fd = fopen("/usr/local/etc/rc.d/per_user_bandwidth_distribution.sh","w");
fwrite($fd, "/sbin/kldload dummynet");
+ fwrite($fd, "/sbin/ipfw delete 10");
fwrite($fd, "/sbin/ipfw pipe 1 config mask src-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}");
fwrite($fd, "/sbin/ipfw pipe 2 config mask dst-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}");
fwrite($fd, "/sbin/ipfw add 10 pipe 1 ip from any to any out via {$wanif}");
fwrite($fd, "/sbin/ipfw add 10 pipe 2 ip from any to any in via {$wanif}");
- fwrite($fd, "/sbin/ipfw add allow all from any to any");
+ fwrite($fd, "/sbin/ipfw add 10 allow all from any to any");
fclose($fd);
mwexec("chmod a+rx /usr/local/etc/rc.d/per_user_bandwidth_distribution.sh");
+ mwexec_bg("/usr/local/etc/rc.d/per_user_bandwidth_distribution.sh");
</custom_add_php_command>
</packagegui>