From 6d76590c938ceb623e21041af72add4fc77044c5 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 26 Aug 2005 16:22:37 +0000 Subject: Even if a user doesn't fill in a hostname we really should run dhclient-script. Doh! This is a bug on m0n0wall too. --- etc/inc/interfaces.inc | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'etc/inc/interfaces.inc') diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index af6214e..4b1bf08 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -617,18 +617,23 @@ function interfaces_opt_dhcp_configure($interface) { return 1; } + if ($optcfg['dhcphostname']) { + $dhclientconf_hostname = "send dhcp-client-identifier \"{$optcfg['dhcphostname']}\";\n"; + $dhclientconf_hostname = " send dhcp-client-identifier \"{$optcfg['dhcphostname']}\";\n"; + } else { + $dhclientconf_hostname = ""; + } + $dhclientconf = ""; - if ($optcfg['dhcphostname']) { - $dhclientconf .= << "") $realinterface = filter_translate_type_to_real_interface($interface); + $optcfg = $config['interfaces'][$interface]; /* generate dhclient_$interface.conf */ @@ -656,18 +662,22 @@ function interfaces_dhcp_configure($interface) { return 1; } + if ($optcfg['dhcphostname']) { + $dhclientconf_hostname = "send dhcp-client-identifier \"{$optcfg['dhcphostname']}\";\n"; + $dhclientconf_hostname = " send dhcp-client-identifier \"{$optcfg['dhcphostname']}\";\n"; + } else { + $dhclientconf_hostname = ""; + } + $dhclientconf = ""; - if ($optcfg['dhcphostname']) { - $dhclientconf .= <<