[Resolvconf-devel] Bug#459566: resolvconf: dnscache script uses == bash-ism

Jeff King peff at peff.net
Mon Jan 7 11:05:51 UTC 2008


Package: resolvconf
Version: 1.37
Severity: normal
Tags: patch

Line 107 uses '==', which is a bash-ism, breaking the script for dash
users. It can be replaced with the POSIX '='. Patch is below.

--- dnscache.orig	2008-01-07 06:05:12.000000000 -0500
+++ dnscache	2008-01-07 05:56:02.000000000 -0500
@@ -104,7 +104,7 @@
 for CACHE in $CACHES ; do
 	cp "$TMPFILE" "$CACHE/root/servers/@"
 	# Restart the cache if it's already running:
-	if [ `dirname "$CACHE"`x == '/var/servicex' ]; then
+	if [ `dirname "$CACHE"`x = '/var/servicex' ]; then
 	    # this is managed by runit
 	    [ "$SV_CMD" ] && "$SV_CMD" t "$CACHE"
 	else





More information about the Resolvconf-devel mailing list