From owner-svn-ports-head@FreeBSD.ORG Wed Apr 24 17:08:20 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 46853FD8; Wed, 24 Apr 2013 17:08:20 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) by mx1.freebsd.org (Postfix) with ESMTP id F3D0B1130; Wed, 24 Apr 2013 17:08:19 +0000 (UTC) Received: by mail-ie0-f171.google.com with SMTP id e11so2416752iej.16 for ; Wed, 24 Apr 2013 10:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=yhDd5nuHfx8K/ubbV3Q6tCBDAHzl/kBW+Py/258OsZY=; b=uw4K88nVeTsb6miLFi2NDDHABr8SkpnKh7C4A9O5iRzFvtB99nnCcmLlaPBj/cie/0 nB4Cqb8VUntn7GP5bCJf9ELCcBuzX7gaZzBtnaP7zG1WozDOWmzx7CUHeYVzplah6nPv vvGdPntJx/jLfp14OYpMZ1J4/FH8upOXS0gBx2Ge8pCnoxMML2WwYUmojoi74quMHEfR oC9/onWGzGscVLVf4/f5ndiJWcwauqdGdlgQ0LGzdkKkQApK867ZEPF+CrNjLzYwHRk8 ISna9cDLc7wj5yCae03KUqrvZX4IfLfaWVKSD80FjynU6uc312LT+AmTdKhXu0vxve9m m7rA== X-Received: by 10.50.132.33 with SMTP id or1mr8451962igb.62.1366823299652; Wed, 24 Apr 2013 10:08:19 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.64.58.52 with HTTP; Wed, 24 Apr 2013 10:07:49 -0700 (PDT) In-Reply-To: <201304241508.r3OF8MCT082012@svn.freebsd.org> References: <201304241508.r3OF8MCT082012@svn.freebsd.org> From: Chris Rees Date: Wed, 24 Apr 2013 18:07:49 +0100 X-Google-Sender-Auth: 578Af1c0JfQRESSu2s4kwoDNCrk Message-ID: Subject: Re: svn commit: r316439 - in head/databases: mysql55-server/files mysql56-server/files To: Alex Dupre Content-Type: text/plain; charset=ISO-8859-1 Cc: "svn-ports-head@freebsd.org" , svn-ports-all@freebsd.org, "ports-committers@freebsd.org" X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2013 17:08:20 -0000 On 24 April 2013 16:08, Alex Dupre wrote: > XXX Ports RC script present > XXX Ports RC script present > Author: ale > Date: Wed Apr 24 15:08:22 2013 > New Revision: 316439 > URL: http://svnweb.freebsd.org/changeset/ports/316439 > > Log: > Allow to specify server-specific option file path in /etc/rc.conf > > PR: ports/172408 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=172408 > Submitted by: Daniel Ylitalo > > Modified: > head/databases/mysql55-server/files/mysql-server.in > head/databases/mysql56-server/files/mysql-server.in > > Modified: head/databases/mysql55-server/files/mysql-server.in > ============================================================================== > --- head/databases/mysql55-server/files/mysql-server.in Wed Apr 24 14:21:12 2013 (r316438) > +++ head/databases/mysql55-server/files/mysql-server.in Wed Apr 24 15:08:22 2013 (r316439) > @@ -16,6 +16,8 @@ > # just before mysql starts. > # mysql_dbdir (str): Default to "/var/db/mysql" > # Base database directory. > +# mysql_optfile (str): Server-specific option file. > +# Default to "${mysql_dbdir}/my.cnf". > # mysql_pidfile (str): Custum PID file path and name. > # Default to "${mysql_dbdir}/${hostname}.pid". > # mysql_args (str): Custom additional arguments to be passed > @@ -32,12 +34,13 @@ load_rc_config $name > : ${mysql_enable="NO"} > : ${mysql_limits="NO"} > : ${mysql_dbdir="/var/db/mysql"} > +: ${mysql_optfile="${mysql_dbdir}/my.cnf"} > > mysql_user="mysql" > mysql_limits_args="-e -U ${mysql_user}" > pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"} This is fairly slow for executing every time the script is included, can I suggest replacing the preceding pidfile line with: : ${hostname:=`hostname`} pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"} ? The majority of users will have set hostname in rc.conf, so this means that the call to the hostname binary is redundant. Chris