retitle 619936 dlint fails when output of dig is changed via .digrc
thanks

Hello Patrik!


On Mon, 28 Mar 2011 20:24:35 +0200
Patrik Schindler <p...@pocnet.net> wrote:

> Since dlint is a shell script, I will add debugging output here:

Thanks. Might have been the next step.  

> How to cope with that properly?

I am not sure yet. A first try is this:

--- dlint.dist  2011-03-29 08:32:35.000000000 +0200
+++ dlint       2011-03-29 08:58:14.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/dash
 #
 #      program:        dlint
 #      usage:          dlint [-n] zone
@@ -106,7 +106,7 @@
 # Check if dig is installed and get the version number.
 # If version < 2.1, fail.  If version 9 or greater, set special settings.
 #
-ver=`dig localhost any | grep DiG | head -1 | sed -e 's/.*DiG 
\([0-9.]*\).*/\1/'`
+ver=`dig -v 2>&1 | grep DiG | head -1 | sed -e 's/.*DiG \([0-9.]*\).*/\1/'`
 
 ans=`echo $ver | awk '$1 >= 2.1 {print "ok"; exit}'`           # floating 
point math
 if test x"$ans" != x"ok"; then


Replacing sh is needed as the redirection via "2>&1" might not 
be supported by all shells. Using dash seems a good choice at
it is the default shell within Debian and a required package.

I'd better like a solution which works within every shell and
not change the shell used by dlint.

Again, I will look into this later, my time does not allow 
anything more for the moment.


> Thanks for taking time and sorry for not debugging in the first place  
> myself.

You are welcome - and no problem at all. Thank you for 
debugging it now.


 Regards
 Florian

-- 
  Florian Hinzmann                         private: m...@fhinzmann.de
                                            Debian: f...@debian.org
PGP Key / ID: 1024D/B4071A65
Fingerprint : F9AB 00C1 3E3A 8125 DD3F  DF1C DF79 A374 B407 1A65



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to