Commit 0fdbe407 authored by Ad Schellevis's avatar Ad Schellevis

some more fixes for config handling

parent 8972c57e
......@@ -5250,7 +5250,7 @@ function interfaces_staticarp_configure($if)
}
} else {
mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " -staticarp " );
mwexec("/usr/sbin/arp -d -i " . escapeshellarg($ifcfg['if']) . " -a > /dev/null 2>&1 ");
mwexec("/usr/sbin/arp -d -i " . escapeshellarg($ifcfg['if']) . " -a ");
if (isset($config['dhcpd'][$if]['staticmap'])) {
foreach ($config['dhcpd'][$if]['staticmap'] as $arpent) {
if (isset($arpent['arp_table_static_entry'])) {
......
......@@ -112,7 +112,9 @@ class Config extends Singleton
// single content item
if (is_array($forceList) && array_key_exists($xmlNode->getName(), $forceList)) {
$result[$xmlNode->getName()] = array();
$result[$xmlNode->getName()][] = $xmlNode->__toString();
if ($xmlNode->__toString() != null && trim($xmlNode->__toString()) !== "" ){
$result[$xmlNode->getName()][] = $xmlNode->__toString();
}
} else {
$result[$xmlNode->getName()] = $xmlNode->__toString();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment