> Attached patch adds similar functionality to keepalived.
> Alternatively, one could use a simpler "modprobe -q ip_vs || true" if
> preferred.

Would help if I actually attached the patch. :)
--- /etc/init.d/keepalived.orig	2011-04-04 16:45:43.000000000 +1200
+++ /etc/init.d/keepalived	2011-04-04 16:45:51.000000000 +1200
@@ -26,6 +26,13 @@
 test -f $CONFIG || exit 0 
 test -f $DAEMON || exit 0
 
+do_modprobe() {
+    if [ -x /sbin/modprobe -a -f /proc/modules ]
+    then
+        modprobe -q "$1" || true
+    fi
+}
+
 case "$1" in
   start)
        	log_daemon_msg "Starting $DESC" "$NAME"
@@ -33,6 +40,7 @@
 	do 
        		test -e $file && test ! -L $file && rm $file
 	done
+	do_modprobe ip_vs
 	if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON; then
 		log_end_msg 0
@@ -64,6 +72,7 @@
        	start-stop-daemon --stop --quiet --pidfile \
 		/var/run/$NAME.pid --exec $DAEMON || true 
        sleep 1
+       do_modprobe ip_vs
        if start-stop-daemon --start --quiet --pidfile \
                /var/run/$NAME.pid --exec $DAEMON; then
 	       log_end_msg 0

Reply via email to