From owner-freebsd-ports@FreeBSD.ORG Wed Jan 11 17:58:21 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DF39106564A; Wed, 11 Jan 2012 17:58:21 +0000 (UTC) (envelope-from feld@feld.me) Received: from mwi1.coffeenet.org (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id DF26F8FC0C; Wed, 11 Jan 2012 17:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=Message-Id:From:Mime-Version:Cc:Subject:Date:To:Content-Type; bh=dMVuzb/Y8uzLwlILsc5HO5OEb1dQmldA0KsPZ4AnoHg=; b=FqaaWgqkVcdQs3oluKONfZ+0PI5EHhiwnNW5HqMiTSsWSdUG3Mi1BoENZ6VwUqnJuCEnttTkmod8KjmwUCgt1k5PmcbvxByIbNbZWh3mPJuMjN9UFjtgsoM2Sk5j36JS; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by mwi1.coffeenet.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Rl2RH-000KGC-Ne; Wed, 11 Jan 2012 11:58:20 -0600 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpsa id 1326304692-88972-88971/5/14; Wed, 11 Jan 2012 17:58:12 +0000 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-ports@freebsd.org Date: Wed, 11 Jan 2012 11:58:12 -0600 Mime-Version: 1.0 From: Mark Felder Message-Id: User-Agent: Opera Mail/11.61 (FreeBSD) X-SA-Score: -1.0 Cc: bsam@freebsd.org Subject: multimedia/zoneminder: rc script runs mysql commands? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 17:58:21 -0000 Hi all, The zoneminder port has this in its rc script which really should go away: zm_prestart() { local _count=0 while : ; do echo "USE zm; SELECT Username from Users where Id=1;" | \ /usr/local/bin/mysqltest -u root zm > /dev/null 2>&1 && return _count=$(( $_count + 1 )) if [ $_count -gt 10 ]; then err 1 "${name}: mysqltest command failed" fi sleep 1 done } If you have your mysql install on a different server (which you should if you have tons of cameras and events) the startup fails to work. I can't see a reason why this should be kept, but perhaps someone else has an idea? This isn't a common practice in any other program that requires a database.... Thanks, Mark