squid: fix obsolete "-D" cli option warning for squid version 3
authorRoman I Khimov <khimov@altell.ru>
Wed, 28 Jul 2010 09:13:24 +0000 (13:13 +0400)
committerRoman I Khimov <khimov@altell.ru>
Thu, 29 Jul 2010 17:24:59 +0000 (21:24 +0400)
Signed-off-by: Roman I Khimov <khimov@altell.ru>
recipes/squid/squid.inc
recipes/squid/squid/squid.init

index 3355c28..477335b 100644 (file)
@@ -1,6 +1,6 @@
 DESCRIPTION = "Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more"
 LICENSE = "GPLv2"
-INC_PR = "r9"
+INC_PR = "r10"
 DEPENDS = "openssl openssl-native openldap"
 
 SQ_MAJ = "${@bb.data.getVar('PV',d,1).split('.')[0]}"
index 4364f48..21ccf22 100644 (file)
@@ -3,7 +3,13 @@ DAEMON=/usr/sbin/squid
 NAME=squid
 DESC="Squid HTTP proxy"
 PIDFILE=/var/run/squid.pid
-SQUID_ARGS="-D -sY"
+
+# -D option is obsolete in squid version 3, so avoid warning
+if $DAEMON -v | grep -q Version\ 3; then
+       SQUID_ARGS="-sY"
+else
+       SQUID_ARGS="-D -sY"
+fi
 
 test -f $DAEMON || exit 0