tags 698577 + patch
tags 698577 + pending
thanks

Dear maintainer,

I've prepared an NMU for varnish (versioned as 3.0.2-2.1).
Please find the patch attached.

Regards,
Jérémy.
diff -Nru varnish-3.0.2/debian/changelog varnish-3.0.2/debian/changelog
--- varnish-3.0.2/debian/changelog	2012-05-01 16:22:42.000000000 +0200
+++ varnish-3.0.2/debian/changelog	2013-01-27 16:21:22.000000000 +0100
@@ -1,3 +1,11 @@
+varnish (3.0.2-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * ucf validation for /etc/default/varnish modified by postinst script.
+    (Closes: #698577)
+
+ -- Jérémy Lal <kapo...@melix.org>  Sun, 27 Jan 2013 16:21:19 +0100
+
 varnish (3.0.2-2) unstable; urgency=low
 
   [ Knut Arne Bjørndal ]
diff -Nru varnish-3.0.2/debian/varnish.postinst varnish-3.0.2/debian/varnish.postinst
--- varnish-3.0.2/debian/varnish.postinst	2012-05-01 16:22:42.000000000 +0200
+++ varnish-3.0.2/debian/varnish.postinst	2013-01-27 18:12:45.000000000 +0100
@@ -52,7 +52,12 @@
 # varnish version 2.1.3-1 and older started varnishd at boot, we keep
 # this default for upgrading clients
 upgrade_enable_varnishd() {
-    sed -i '/^START=/s/no/yes/g' /etc/default/varnish
+    tmpFile=$(tempfile)
+    sed '/^START=/s/no/yes/g' /etc/default/varnish > "${tmpFile}"
+    if which ucf >/dev/null; then
+        ucf --debconf-ok "${tmpFile}" /etc/default/varnish
+    fi
+    rm -f "${tmpFile}"
 }
 
 case ${1:-} in

Reply via email to