Hi,

as I am also beaten by #424772 I tried to find out what's going wrong:

It is the way su determines which shell to run.

su uses 1) shell specified with -s
        2) if -p is given: $SHELL
        3) shell from /etc/passwd
        4) /bin/sh

what happens in the "initscript run by init" case is:
- $SHELL is not set
- /etc/passwd gives: clamav:x:109:114::/var/lib/clamav:/bin/false
and /bin/false is used.

in the "initscript run by root" case $SHELL is set by login or some PAM
mechanism and then used by su (because -p).

I modified /etc/init.d/clamav-[daemon|freshclam] a bit:

-daemon:
-    su "$User" -p -c ". /lib/lsb/init-functions && start_daemon -p $THEPIDFILE 
$DAEMON"
+    su "$User" -p -s /bin/sh -c ". /lib/lsb/init-functions && start_daemon -p 
$THEPIDFILE $DAEMON"

-freshclam:
-  su clamav -p -c ". /lib/lsb/init-functions && start_daemon $DAEMON -d 
--quiet"
+  su clamav -p -s /bin/sh -c ". /lib/lsb/init-functions && start_daemon 
$DAEMON -d --quiet"

and clamav starts again at system boot.

with kind regards
Björn


Reply via email to