summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-07 18:11:10 +0200
committersmos <seth.mos@dds.nl>2012-06-07 18:12:28 +0200
commit6afeb202680332ce1daf96d3999d4e26422bdd7b (patch)
tree0079b1d6fe4c58735e96ff37b786d1a59aad1d7a /etc
parentb3cb233ff656c0a5cb1695154ecf5a0aa51e3e34 (diff)
downloadpfsense-6afeb202680332ce1daf96d3999d4e26422bdd7b.zip
pfsense-6afeb202680332ce1daf96d3999d4e26422bdd7b.tar.gz
If radvd is already running, reload, otherwise start one.
Shut down when there are no prefixes to announce
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc20
1 files changed, 12 insertions, 8 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index 37d4026..5b3a8f7 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -52,13 +52,6 @@ function services_radvd_configure() {
echo "services_radvd_configure() being called $mt\n";
}
- /* we need to shut down the radvd cleanly, it will send out the prefix
- * information with a lifetime of 0 to notify clients of a (possible) new prefix */
- if(is_process_running("radvd")) {
- log_error("Shutting down Router Advertisment daemon cleanly");
- mwexec("killall radvd");
- }
-
if (!is_array($config['dhcpdv6']))
$config['dhcpdv6'] = array();
@@ -282,7 +275,18 @@ function services_radvd_configure() {
fclose($fd);
if(count($radvdifs) > 0) {
- mwexec("/usr/local/sbin/radvd -C {$g['varetc_path']}/radvd.conf -m syslog");
+ if(is_process_running("radvd")) {
+ mwexec("killall -1 radvd");
+ } else {
+ mwexec("/usr/local/sbin/radvd -C {$g['varetc_path']}/radvd.conf -m syslog");
+ }
+ } else {
+ /* we need to shut down the radvd cleanly, it will send out the prefix
+ * information with a lifetime of 0 to notify clients of a (possible) new prefix */
+ if(is_process_running("radvd")) {
+ log_error("Shutting down Router Advertisment daemon cleanly");
+ mwexec("killall radvd");
+ }
}
return 0;
}
OpenPOWER on IntegriCloud