summaryrefslogtreecommitdiffstats
path: root/etc/rc.carpbackup
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-12-06 19:16:34 +0000
committerErmal <eri@pfsense.org>2013-12-06 19:16:34 +0000
commit0c21eb70b6f830e2c1edc06597c2e0bd443ed855 (patch)
tree44ec1b7260627acf632391edb9814fb5eb5401f0 /etc/rc.carpbackup
parent86c135def224d010ac057f283b3a02f9699cb91a (diff)
downloadpfsense-0c21eb70b6f830e2c1edc06597c2e0bd443ed855.zip
pfsense-0c21eb70b6f830e2c1edc06597c2e0bd443ed855.tar.gz
Use _vip as identified for CARP vip IPs to allow easier upgrade code. This way only ipaliases on carp need to be upgraded.
Diffstat (limited to 'etc/rc.carpbackup')
-rwxr-xr-xetc/rc.carpbackup7
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/rc.carpbackup b/etc/rc.carpbackup
index 0068589..9e469c3 100755
--- a/etc/rc.carpbackup
+++ b/etc/rc.carpbackup
@@ -42,8 +42,9 @@ if (!strstr($argument, "@"))
list($vhid, $iface) = explode("@", $argument);
$friendly = convert_real_interface_to_friendly_interface_name($iface);
-$friendly_descr = convert_friendly_interface_to_friendly_descr($friendly);
-$notificationmsg = sprintf('Carp cluster member "%2$s (%1$s)" has resumed the state "BACKUP"', $argument, $friendly_descr);
+$carp_iface = "{$friendly}_vip{$vhid}";
+$friendly_descr = convert_friendly_interface_to_friendly_descr($carp_iface);
+$notificationmsg = sprintf('Carp cluster member "%2$s (%1$s)" has resumed the state "BACKUP" for vhid %s', $argument, $friendly_descr, $vhid);
notify_via_smtp($notificationmsg);
notify_via_growl($notificationmsg);
@@ -53,7 +54,7 @@ log_error($notificationmsg);
global $config;
if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client'])) {
foreach ($config['openvpn']['openvpn-client'] as $settings) {
- if ($settings['interface'] == $friendly) {
+ if ($settings['interface'] == $carp_iface) {
log_error("Stopping OpenVPN client instance on {$friendly_descr} because of transition to CARP backup.");
openvpn_restart('client', $settings);
}
OpenPOWER on IntegriCloud