dns: fix startup after refactor

Injecting `--' into the command line is rather funny as it stops
parsing of all following options and treats them as literals, which
dnsmasq then loudly complains about like `ain't nobody got time for
that'.
This commit is contained in:
Franco Fichtner 2015-07-20 09:50:22 +02:00
parent 5acbb69602
commit b426d2c615

View File

@ -1903,7 +1903,7 @@ function services_dnsmasq_configure()
$args .= " --domain-needed ";
}
if (isset($config['dnsmasq']['custom_options'])) {
if (isset($config['dnsmasq']['custom_options']) && !empty($config['dnsmasq']['custom_options'])) {
foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) {
$args .= " " . escapeshellarg("--{$c}");
$p = explode('=', $c);