tags 531220 + patch pending
thanks

Dear maintainer,

I've prepared an NMU for nut (versioned as 2.4.1-3.2) and uploaded it to
DELAYED/2, according to devref §5.11.1. The patch is based on
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531220#35 , but is a
bit more permissive about placement of "MODE=" in nut.conf (still avoid
acting on "MODE" reported in the descriptive comment).

Hope this helps,
Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime
diff -u nut-2.4.1/debian/changelog nut-2.4.1/debian/changelog
--- nut-2.4.1/debian/changelog
+++ nut-2.4.1/debian/changelog
@@ -1,3 +1,11 @@
+nut (2.4.1-3.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * nut.postinst: fix post-processing of nut.conf to avoid overriding
+    user settings (Closes: #531220)
+
+ -- Stefano Zacchiroli <z...@debian.org>  Thu, 26 Nov 2009 09:30:45 +0100
+
 nut (2.4.1-3.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u nut-2.4.1/debian/nut.postinst nut-2.4.1/debian/nut.postinst
--- nut-2.4.1/debian/nut.postinst
+++ nut-2.4.1/debian/nut.postinst
@@ -93,8 +93,8 @@
 		fi
 	else
 		# re process nut.conf MODE so that it can be sourced
-		NUT_MODE=`sed -ne 's#^ *MODE = *\(.*\)$#\1#p' /etc/nut/nut.conf`
-		sed "s/^MODE\(.*\)/MODE=$NUT_MODE/" /etc/nut/nut.conf  > /etc/nut/nut.conf.new
+		NUT_MODE=`grep -e '^ *MODE' /etc/nut/nut.conf | tr -d " "`
+		sed "s/^ *MODE.*/$NUT_MODE/" /etc/nut/nut.conf > /etc/nut/nut.conf.new
 		mv /etc/nut/nut.conf.new /etc/nut/nut.conf
 	fi
     ;;

Reply via email to