From owner-freebsd-ports@FreeBSD.ORG Mon Feb 23 13:53:03 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E34E16A4CE for ; Mon, 23 Feb 2004 13:53:03 -0800 (PST) Received: from smtp-out6.xs4all.nl (smtp-out6.xs4all.nl [194.109.24.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B69143D1F for ; Mon, 23 Feb 2004 13:53:02 -0800 (PST) (envelope-from mhellwig@xs4all.nl) Received: from xs4all.nl (xinagnet.xs4all.nl [80.126.243.229]) by smtp-out6.xs4all.nl (8.12.10/8.12.10) with ESMTP id i1NLr0iU031841 for ; Mon, 23 Feb 2004 22:53:01 +0100 (CET) Message-ID: <403A7649.20306@xs4all.nl> Date: Mon, 23 Feb 2004 22:53:13 +0100 From: "Martin P. Hellwig" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: security/antivir-milter won't start correctly X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2004 21:53:03 -0000 Hi all, I've installed the port on my test machine (5 current), configured sendmail, did a "/usr/local/etc/rc.d/antivir-milter.sh start" and a "/etc/rc.d/sendmail restart" and guess what , it all works :-) But because I always do extensive testing on my test machine, I reboot to see if things go up on there own again. And this isn't the case, sendmail started, "/usr/local/sbin/avmilter" is running but no "/usr/local/AntiVir/avmilter.sock" Wich causes sendmail to stop accepting e-mail delivering ("please retry later" message after "rcpt to:") the strange thing is that when I manually do a "/usr/local/etc/rc.d/antivir-milter.sh stop" and "/usr/local/etc/rc.d/antivir-milter.sh start" the avmilter.sock is created. Doing a "/usr/local/etc/rc.d/antivir-milter.sh restart" results in a "can't initialize scan engine", I tested this command to see if restart works that way "/usr/local/etc/rc.d/antivir-milter.sh stop && /usr/local/etc/rc.d/antivir-milter.sh start" but it fails the same as "/usr/local/etc/rc.d/antivir-milter.sh restart" however "/usr/local/etc/rc.d/antivir-milter.sh stop && sleep 1 && /usr/local/etc/rc.d/antivir-milter.sh start" does the expected. So I guess there something going wrong, I did a ugly script to test where it goes wrong. I did this by modifying the original startup script at this: " start) if [ -x /usr/local/sbin/avmilter ]; then umask 0077 echo "AntiVir milter starting" rm -f /usr/local/AntiVir/avmilter.sock /usr/local/AntiVir/start-avmilter.sh & umask 0022 fi and the file /usr/local/AntiVir/start-avmilter.sh is this: " #! /bin/sh /usr/local/sbin/avmilter -C /usr/local/etc/avmilter.conf -p \ local:/usr/local/AntiVir/avmilter.sock \ && echo "AntiVir-milter started" \ || echo "problem while starting AntiVir-milter" \ || test -S /usr/local/AntiVir/avmilter.sock && echo "Socket Created" \ || echo "Failure, no socket created I have absolutely no idea why it now starts correctly and creates a socket on boot time, I'm relativly new to unix and shell scripting and by closer examination of my script I'm even convinced that the test reports wouldn't work but since avmilter starts correctly now I can't verify it :-) So would somebody with more expirience take a closer look at it please? Martin P. Hellwig