summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-11-16 13:47:14 +0000
committerErmal Luçi <eri@pfsense.org>2009-11-16 13:47:14 +0000
commitad30055f6e376a1e0aa5e81d70d46ba27bc85a91 (patch)
tree238633ba9b04ff0016723c293994772ea4cd8200 /etc
parentcf21c8ad798872b757c375301f910ab6d4c81356 (diff)
downloadpfsense-ad30055f6e376a1e0aa5e81d70d46ba27bc85a91.zip
pfsense-ad30055f6e376a1e0aa5e81d70d46ba27bc85a91.tar.gz
Resolves #155. Replace space characters with underscore ones.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 2fadd68..decaf03 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -340,8 +340,10 @@ EOD;
if ($sm['ipaddr'])
$dhcpdconf .= " fixed-address {$sm['ipaddr']};\n";
- if ($sm['hostname'])
- $dhcpdconf .= " option host-name {$sm['hostname']};\n";
+ if ($sm['hostname']) {
+ $dhhostname = str_replace(" ", "_", $sm['hostname']);
+ $dhcpdconf .= " option host-name {$dhhostname};\n";
+ }
$dhcpdconf .= "}\n";
$i++;
OpenPOWER on IntegriCloud