diff options
author | Ermal <eri@pfsense.org> | 2010-04-14 12:39:10 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-04-14 12:40:10 +0000 |
commit | 5ac2f583757d632ffe99404f0027e362685ef7bb (patch) | |
tree | a9731406f7fa99b5f56955ca1ab5680dce67b032 /etc/inc/services.inc | |
parent | c74804cd45599f85d1c70d499a2e3fecea3e2fff (diff) | |
download | pfsense-5ac2f583757d632ffe99404f0027e362685ef7bb.zip pfsense-5ac2f583757d632ffe99404f0027e362685ef7bb.tar.gz |
Ticket #499. Create custom options propperly for each interface. This solution binds the option name to the interface name so it is even easier to distinguish.
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r-- | etc/inc/services.inc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 8e16e72..013351b 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -120,13 +120,11 @@ function services_dhcpd_configure() { return 1; } - $optcounter = 0; $custoptions = ""; foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) { if(is_array($dhcpifconf['numberoptions']) && is_array($dhcpifconf['numberoptions']['item'])) { - foreach($dhcpifconf['numberoptions']['item'] as $item) { - $custoptions .= "option custom-opt-$optcounter code {$item['number']} = text;\n"; - $optcounter++; + foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) { + $custoptions .= "option custom-{$dhcpif}-{$itemidx} code {$item['number']} = text;\n"; } } } @@ -315,12 +313,10 @@ EOD; $dhcpdconf .= " option tftp-server-name \"{$dhcpifconf['tftp']}\";\n"; // Handle option, number rowhelper values - $optcounter = 0; $dhcpdconf .= "\n"; if($dhcpifconf['numberoptions']['item']) { - foreach($dhcpifconf['numberoptions']['item'] as $item) { - $dhcpdconf .= " option custom-opt-$optcounter \"{$item['value']}\";\n"; - $optcounter++; + foreach($dhcpifconf['numberoptions']['item'] as $itemidx => $item) { + $dhcpdconf .= " option custom-{$dhcpif}-{$itemidx} \"{$item['value']}\";\n"; } } |