~ubuntu-branches/ubuntu/dapper/clamav/dapper-security

« back to all changes in this revision

Viewing changes to debian/common_functions

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2009-04-29 17:17:14 UTC
  • mfrom: (1.1.8 upstream) (0.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090429171714-9rb08pcxwl02e0bq
Tags: 0.94.dfsg.2-1ubuntu0.3~dapper2
No change rebuild from backports

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
fi
8
8
}
9
9
 
 
10
to_lower()
 
11
{
 
12
  word="$1"
 
13
  lcword=$(echo "$word" | tr A-Z a-z)
 
14
  echo "$lcword"
 
15
}
 
16
 
 
17
is_true()
 
18
{
 
19
  var="$1"
 
20
  lcvar=$(to_lower "$var")
 
21
  [ 'true' = "$lcvar" ] || [ 'yes' = "$lcvar" ] || [ 1 = "$lcvar" ]
 
22
  return $?
 
23
}
 
24
 
10
25
ucf_cleanup()
11
26
{
12
27
  # This only does something if I've fucked up before
66
81
        else
67
82
          continue
68
83
        fi
 
84
      elif [ "$variable" = 'IncludePUA' ]; then
 
85
        if [ -z "$IncludePUA" ]; then
 
86
          for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
 
87
            value="$i $value"
 
88
          done
 
89
        else
 
90
          continue
 
91
        fi
 
92
      elif [ "$variable" = 'ExcludePUA' ]; then
 
93
        if [ -z "$ExcludePUA" ]; then
 
94
          for i in `grep ^$variable $CLAMAVCONF | awk '{print $2}'`; do
 
95
            value="$i $value"
 
96
          done
 
97
        else
 
98
          continue
 
99
        fi
69
100
      elif [ "$variable" = 'VirusEvent' ] || [ "$variable" = 'OnUpdateExecute' ] || [ "$variable" = 'OnErrorExecute' ]; then
70
101
        value=`grep ^$variable $CLAMAVCONF | head -n1 | sed -e s/$variable\ //`
71
102
      else