Bug#483874: clamav-daemon: initscript in 0.93 breaks daemon start in supervised mode

2008-05-31 Thread Stephen Gran
This one time, at band camp, Tomas Hoger said:
> After installing clamav-daemon-0.93~dfsg-volatile1 running
> /etc/init.d/clamav-daemon start fails to finish as clamd is now started in
> the foreground.
> 
> Further investigations shows that initscript in 0.93 changed the way
> clamd.conf file is scanned for important config options.  'Foreground' is
> exported to environment by slurp_config() with the value read from
> clamd.conf.
> 
> Later, it's compared to 'true' to check, if supervised mode should be used:
>   if [ "$Foreground" = 'true' ]; then
> 
> However, clamd.conf(5) says:
> 
>   Foreground BOOL
>   Don’t fork into background.
>   Default: no
> 
>   BOOL   Boolean value (yes/no or true/false or 1/0).
> 
> My config had: Forground yes, which was not expected.
> 
> So probably something like this should be used instead:
> 
> --- clamav-daemon   2008-05-03 14:55:00.0 +0200
> +++ /etc/init.d/clamav-daemon   2008-05-31 21:09:26.0 +0200
> @@ -145,7 +145,7 @@
>exit 0
>  fi
> 
> -if [ "$Foreground" = 'true' ]; then
> +if [ "$Foreground" = 'true' -o "$Foreground" = 'yes' -o "$Foreground" = '1' 
> ]; then
>if [ ! -x "$SUPERVISOR" ] ; then
>   log_failure_msg "Foreground specified, but $SUPERVISORNAME not found"
>   exit 0

Fair enough - I will probably use 
[ "$Foreground" = 'true' ] || [ "$Foreground" = 'yes' ] || "$Foreground" ='1' ]

or something (and I suppose I need to handle uppercase variants, since
they're valid, sigh). 

thanks for the report,
-- 
 -
|   ,''`.Stephen Gran |
|  : :' :[EMAIL PROTECTED] |
|  `. `'Debian user, admin, and developer |
|`- http://www.debian.org |
 -


signature.asc
Description: Digital signature


Bug#483874: clamav-daemon: initscript in 0.93 breaks daemon start in supervised mode

2008-05-31 Thread Tomas Hoger
Package: clamav-daemon
Version: 0.93~dfsg-volatile1
Severity: normal
Tags: patch

After installing clamav-daemon-0.93~dfsg-volatile1 running
/etc/init.d/clamav-daemon start fails to finish as clamd is now started in
the foreground.

Further investigations shows that initscript in 0.93 changed the way
clamd.conf file is scanned for important config options.  'Foreground' is
exported to environment by slurp_config() with the value read from
clamd.conf.

Later, it's compared to 'true' to check, if supervised mode should be used:
  if [ "$Foreground" = 'true' ]; then

However, clamd.conf(5) says:

  Foreground BOOL
Don’t fork into background.
Default: no

  BOOL   Boolean value (yes/no or true/false or 1/0).

My config had: Forground yes, which was not expected.

So probably something like this should be used instead:

--- clamav-daemon   2008-05-03 14:55:00.0 +0200
+++ /etc/init.d/clamav-daemon   2008-05-31 21:09:26.0 +0200
@@ -145,7 +145,7 @@
   exit 0
 fi

-if [ "$Foreground" = 'true' ]; then
+if [ "$Foreground" = 'true' -o "$Foreground" = 'yes' -o "$Foreground" = '1' ]; 
then
   if [ ! -x "$SUPERVISOR" ] ; then
  log_failure_msg "Foreground specified, but $SUPERVISORNAME not found"
  exit 0


th.


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-amd64
Locale: LANG=sk_SK.UTF-8, LC_CTYPE=sk_SK.UTF-8 (charmap=UTF-8)

Versions of packages clamav-daemon depends on:
ii  clamav-base  0.93~dfsg-volatile1 anti-virus utility for Unix - base
ii  clamav-freshclam [cl 0.93~dfsg-volatile1 anti-virus utility for Unix - viru
ii  libc62.3.6.ds1-13etch5   GNU C Library: Shared libraries
ii  libclamav4   0.93~dfsg-volatile1 anti-virus utility for Unix - libr
ii  lsb-base 3.1-23.2etch1   Linux Standard Base 3.1 init scrip
ii  ucf  2.0020  Update Configuration File: preserv

clamav-daemon recommends no packages.

-- no debconf information



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]