[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/lenny-volatile, updated. debian/0.95+dfsg-1-6254-g3733304
Stephen Gran
steve at lobefin.net
Wed May 12 22:06:23 UTC 2010
The following commit has been merged in the debian/lenny-volatile branch:
commit fc5fedc7d533af80c1fcb67fea39758421d2eaa8
Author: Stephen Gran <steve at lobefin.net>
Date: Wed May 12 22:58:47 2010 +0100
update slurp_config to case statement; add RejectMsg to special handling (closes: #581410)
Signed-off-by: Stephen Gran <steve at lobefin.net>
diff --git a/debian/common_functions b/debian/common_functions
index c7c583a..2ee73c7 100644
--- a/debian/common_functions
+++ b/debian/common_functions
@@ -97,7 +97,8 @@ slurp_config()
if [ -e "$CLAMAVCONF" ]; then
for variable in `egrep -v '^[[:space:]]*(#|$)' "$CLAMAVCONF" | awk '{print $1}'`; do
- if [ "$variable" = 'DatabaseMirror' ]; then
+ case "$variable" in
+ DatabaseMirror)
if [ -z "$DatabaseMirror" ]; then
for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
value="$i $value"
@@ -105,7 +106,8 @@ slurp_config()
else
continue
fi
- elif [ "$variable" = 'IncludePUA' ]; then
+ ;;
+ IncludePUA)
if [ -z "$IncludePUA" ]; then
for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
value="$i $value"
@@ -113,7 +115,8 @@ slurp_config()
else
continue
fi
- elif [ "$variable" = 'ExcludePUA' ]; then
+ ;;
+ ExcludePUA)
if [ -z "$ExcludePUA" ]; then
for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
value="$i $value"
@@ -121,11 +124,14 @@ slurp_config()
else
continue
fi
- elif [ "$variable" = 'VirusEvent' ] || [ "$variable" = 'OnUpdateExecute' ] || [ "$variable" = 'OnErrorExecute' ]; then
+ ;;
+ VirusEvent|OnUpdateExecute|OnErrorExecute|RejectMsg)
value=`grep ^$variable $CLAMAVCONF | head -n1 | sed -e s/$variable\ //`
- else
+ ;;
+ *)
value=`grep ^$variable $CLAMAVCONF | head -n1 | awk '{print $2}'`
- fi
+ ;;
+ esac
if [ -z "$value" ]; then
export "$variable"="true"
elif [ "$value" != "$variable" ]; then
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list