# proposed patch for 408245
tag 408245 + patch
thanks

-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org
diff -u ipvsadm-1.24+1.21/debian/ipvsadm.postinst ipvsadm-1.24+1.21/debian/ipvsadm.postinst
--- ipvsadm-1.24+1.21/debian/ipvsadm.postinst
+++ ipvsadm-1.24+1.21/debian/ipvsadm.postinst
@@ -12,6 +12,19 @@
 	db_get ipvsadm/daemon_method; DAEMON="$RET"
 	db_get ipvsadm/daemon_multicast_interface; IFACE="$RET"
 
+        if which ipvsadm &>/dev/null; then
+            # Regardless of if ipvs is built into the kernel or built as a module,
+            # if it is part of the kernel at all, it will be available after this
+            ipvsadm -L -n >& /dev/null || true
+        fi
+
+        if [ ! -f "/proc/net/ip_vs_conn" ]; then
+            db_fset ipvsadm/kernel_does_not_support_ipvs seen false
+            db_input high ipvsadm/kernel_does_not_support_ipvs || true
+            db_go
+            exit 0
+        fi
+
 	if [ "$DAEMON" = "none" ]; then
 	    cat > $IPVSADM_CONFIG <<EOF1
 # Do not edit! Use 'dpkg-reconfigure ipvsadm'.
diff -u ipvsadm-1.24+1.21/debian/ipvsadm.config ipvsadm-1.24+1.21/debian/ipvsadm.config
--- ipvsadm-1.24+1.21/debian/ipvsadm.config
+++ ipvsadm-1.24+1.21/debian/ipvsadm.config
@@ -8,17 +8,6 @@
 
 db_version 2.0
 
-# Regardless of if ipvs is built into the kernel or built as a module,
-# if it is part of the kernel at all, it will be available after this
-ipvsadm -L -n >& /dev/null # Regardless of if ipvs is built the kernel or
-
-if [ ! -f "/proc/net/ip_vs_conn" ]; then
-    db_fset ipvsadm/kernel_does_not_support_ipvs seen false
-    db_input high ipvsadm/kernel_does_not_support_ipvs || true
-    db_go
-    exit 0
-fi
-
 if [ -f $IPVSADM_CONFIG ]; then
     . $IPVSADM_CONFIG
 
diff -u ipvsadm-1.24+1.21/debian/changelog ipvsadm-1.24+1.21/debian/changelog
--- ipvsadm-1.24+1.21/debian/changelog
+++ ipvsadm-1.24+1.21/debian/changelog
@@ -1,3 +1,11 @@
+ipvsadm (1.24+1.21-1.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Move ipvs detection into the postinst, so that we can rely on the ipvsadm
+    tool, guard that call to avoid any problems. (Closes: #408245).
+
+ -- Pierre Habouzit <[EMAIL PROTECTED]>  Mon,  5 Feb 2007 10:46:35 +0100
+
 ipvsadm (1.24+1.21-1.3) unstable; urgency=low
 
   * Non-maintainer upload

Attachment: signature.asc
Description: Digital signature



Reply via email to