Commit 829e0aa2 authored by Franco Fichtner's avatar Franco Fichtner

services: always restart radvd on configure for #1551

parent de1e979f
...@@ -100,11 +100,12 @@ function get_pppoes_child_interfaces($ifpattern) ...@@ -100,11 +100,12 @@ function get_pppoes_child_interfaces($ifpattern)
return $if_arr; return $if_arr;
} }
/* implement ipv6 route advertising deamon */
function services_radvd_configure($blacklist = array()) function services_radvd_configure($blacklist = array())
{ {
global $config; global $config;
killbypid('/var/run/radvd.pid', 'TERM', true);
if (!isset($config['dhcpdv6']) || !is_array($config['dhcpdv6'])) { if (!isset($config['dhcpdv6']) || !is_array($config['dhcpdv6'])) {
$config['dhcpdv6'] = array(); $config['dhcpdv6'] = array();
} }
...@@ -309,14 +310,8 @@ function services_radvd_configure($blacklist = array()) ...@@ -309,14 +310,8 @@ function services_radvd_configure($blacklist = array())
file_put_contents('/var/etc/radvd.conf', $radvdconf); file_put_contents('/var/etc/radvd.conf', $radvdconf);
if (count($radvdifs) > 0) { if (count($radvdifs)) {
if (isvalidpid('/var/run/radvd.pid')) { mwexec('/usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog');
killbypid('/var/run/radvd.pid', 'HUP');
} else {
mwexec('/usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog');
}
} else {
killbypid('/var/run/radvd.pid', 'TERM', true);
} }
} }
......
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