diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-13 23:14:43 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-13 23:14:43 +0000 |
commit | 2417a6d231b53ae6e0f7f647c967a0aef1105479 (patch) | |
tree | e9f061a8f0817857e666323bb3110db79889b6a0 | |
parent | a9786671ec16879debfda748c9a9bba497846d2c (diff) | |
download | pfsense-packages-2417a6d231b53ae6e0f7f647c967a0aef1105479.tar.gz pfsense-packages-2417a6d231b53ae6e0f7f647c967a0aef1105479.tar.bz2 pfsense-packages-2417a6d231b53ae6e0f7f647c967a0aef1105479.zip |
* Add header
* Add \n's
-rw-r--r-- | packages/per-user-bandwidth-distribution.xml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/per-user-bandwidth-distribution.xml b/packages/per-user-bandwidth-distribution.xml index eda583f7..9c45ac0b 100644 --- a/packages/per-user-bandwidth-distribution.xml +++ b/packages/per-user-bandwidth-distribution.xml @@ -43,13 +43,15 @@ </fields> <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 10 allow all from any to any"); + fwrite($fd, "# This file was automatically generated by the pfSense\n"); + fwrite($fd, "# package manager system\n\n"); + fwrite($fd, "/sbin/kldload dummynet\n"); + fwrite($fd, "/sbin/ipfw delete 10\n"); + fwrite($fd, "/sbin/ipfw pipe 1 config mask src-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}\n"); + fwrite($fd, "/sbin/ipfw pipe 2 config mask dst-ip 0x000000ff bw {$_POST['bandwidth']}{$_POST['bandwidthtype']}\n"); + fwrite($fd, "/sbin/ipfw add 10 pipe 1 ip from any to any out via {$wanif}\n"); + fwrite($fd, "/sbin/ipfw add 10 pipe 2 ip from any to any in via {$wanif}\n"); + fwrite($fd, "/sbin/ipfw add 10 allow all from any to any\n"); 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"); |