tags 503913 +pending
thanks,

Hi,

the check is indeed pointless, but if munin-node-configure fails,
we shouldnt execute it's output.

So I rather propose the following code:

Index: debian/munin-node.postinst
===================================================================
--- debian/munin-node.postinst  (revision 1768)
+++ debian/munin-node.postinst  (working copy)
@@ -25,23 +25,23 @@
        TMPFILE=`mktemp /tmp/munin-node.configure.XXXXXXXXXX`
        if [ "$prevver" ]; then
                echo -n "Initializing new plugins.."
-               munin-node-configure --shell --newer "${prevver%-*}" > $TMPFILE 
|| true
-               if [ "$?" ] ; then 
+               munin-node-configure --shell --newer "${prevver%-*}" > $TMPFILE 
|| rm -f $TMPFILE
+               if [ -f $TMPFILE ] ; then 
                        sh < $TMPFILE  
                else
                        echo "failed."
                fi
        else
                echo -n "Initializing plugins.."
-               munin-node-configure --shell > $TMPFILE || true
-               if [ "$?" ] ; then
+               munin-node-configure --shell > $TMPFILE || rm -f $TMPFILE
+               if [ -f $TMPFILE ] ; then
                        sh < $TMPFILE
                else 
                        echo "failed."
                fi
        fi
        echo "done."
-       rm $TMPFILE
+       rm -f $TMPFILE
 }
 
 case "$1" in


Thanks for noticing!

regards,
        Holger

Attachment: pgpeSMz7JSdDL.pgp
Description: PGP signature

Reply via email to