Package: debian-goodies
Version: 0.24
Severity: normal
File: /usr/bin/network-test
Tags: patch

network-test does not run with shells others than bash.

#v+
$ /usr/bin/network-test
-e is not available! (please install netstat net-tools)
$ grep -E '^#!|echo -e' /usr/bin/network-test
#!/bin/sh
( echo -e "netstat net-tools\nifconfig net-tools\nping netkit-ping\n\
                               echo -e "ERR: There is one nameserver configured for 
this system but it does not work properly"
       echo -e "HEAD / HTTP/1.0\n\n" |nc -w 20 $CHECK_WEB_HOST $CHECK_WEB_PORT 
>/dev/null 2>&1
#v-

Unfortunately, -e argument for echo is a bashism.

The attached patched fixes the problem.

-- System Information:
Debian Release: testing/unstable
 APT prefers testing
 APT policy: (900, 'testing'), (600, 'unstable'), (500, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-1-686
Locale: LANG=C, LC_CTYPE=pl_PL (charmap=ISO-8859-2)

Versions of packages debian-goodies depends on:
ii  curl                       7.15.5-1      Get a file from an HTTP, HTTPS, FT
ii grep-dctrl 2.9.1 Grep Debian package information - ii lsof 4.77.dfsg.1-3 List open files
ii  python                     2.4.3-11      An interactive high-level object-o

debian-goodies recommends no packages.

-- no debconf information

--
Jakub Wilk
92,93c92,93
< ( echo -e "netstat net-tools\nifconfig net-tools\nping netkit-ping\n\
< arp net-tools\nip iproute\nhost bind9-host\nmktemp debianutils\nnc netcat" |
---
> ( printf "netstat net-tools\nifconfig net-tools\nping netkit-ping\n\
> arp net-tools\nip iproute\nhost bind9-host\nmktemp debianutils\nnc netcat\n" |
303c303
<                               echo -e "ERR: There is one nameserver 
configured for this system but it does not work properly"
---
>                               echo "ERR: There is one nameserver configured 
> for this system but it does not work properly"
367c367
<       echo -e "HEAD / HTTP/1.0\n\n" |nc -w 20 $CHECK_WEB_HOST $CHECK_WEB_PORT 
>/dev/null 2>&1
---
>       printf "HEAD / HTTP/1.0\n\n" |nc -w 20 $CHECK_WEB_HOST $CHECK_WEB_PORT 
> >/dev/null 2>&1

Reply via email to