summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/rc.carpbackup16
-rwxr-xr-xsrc/etc/rc.carpmaster16
2 files changed, 32 insertions, 0 deletions
diff --git a/src/etc/rc.carpbackup b/src/etc/rc.carpbackup
index a65aff4..0faeaab 100755
--- a/src/etc/rc.carpbackup
+++ b/src/etc/rc.carpbackup
@@ -98,6 +98,22 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'
}
}
+/* Reconfigure radvd when necessary */
+if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) {
+ $rafound = false;
+ foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
+ foreach ($vips as $vip) {
+ if ($dhcpv6ifconf['rainterface'] == "_vip{$vip['uniqid']}") {
+ log_error("Stopping radvd instance on {$friendly_descr} because of transition to CARP master.");
+ $rafound = true;
+ }
+ }
+ }
+ if ($rafound) {
+ services_radvd_configure();
+ }
+}
+
$pluginparams = array();
$pluginparams['type'] = 'carp';
$pluginparams['event'] = 'rc.carpbackup';
diff --git a/src/etc/rc.carpmaster b/src/etc/rc.carpmaster
index a9e779e..248b5bb 100755
--- a/src/etc/rc.carpmaster
+++ b/src/etc/rc.carpmaster
@@ -97,6 +97,22 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'
}
}
+/* Reconfigure radvd when necessary */
+if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) {
+ $rafound = false;
+ foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
+ foreach ($vips as $vip) {
+ if ($dhcpv6ifconf['rainterface'] == "_vip{$vip['uniqid']}") {
+ log_error("Starting radvd instance on {$friendly_descr} because of transition to CARP master.");
+ $rafound = true;
+ }
+ }
+ }
+ if ($rafound) {
+ services_radvd_configure();
+ }
+}
+
$pluginparams = array();
$pluginparams['type'] = 'carp';
$pluginparams['event'] = 'rc.carpmaster';
OpenPOWER on IntegriCloud