summaryrefslogtreecommitdiff
path: root/community/ucarp/02-fix-downscript-on-error.c
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/ucarp/02-fix-downscript-on-error.c
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/ucarp/02-fix-downscript-on-error.c')
-rw-r--r--community/ucarp/02-fix-downscript-on-error.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/community/ucarp/02-fix-downscript-on-error.c b/community/ucarp/02-fix-downscript-on-error.c
new file mode 100644
index 000000000..08af568b4
--- /dev/null
+++ b/community/ucarp/02-fix-downscript-on-error.c
@@ -0,0 +1,12 @@
+--- ucarp-1.5.1.orig/src/carp.c
++++ ucarp-1.5.1/src/carp.c
+@@ -843,6 +843,9 @@
+ if ((pfds[0].revents & (POLLERR | POLLHUP)) != 0) {
+ logfile(LOG_ERR, _("exiting: pfds[0].revents = %d"),
+ pfds[0].revents);
++ if ((sc.sc_state != BACKUP) && (shutdown_at_exit != 0)) {
++ (void) spawn_handler(dev_desc_fd, downscript);
++ }
+ break;
+ }
+ if (gettimeofday(&now, NULL) != 0) {