From owner-freebsd-questions Wed Nov 13 15:12:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EA6B37B401 for ; Wed, 13 Nov 2002 15:12:49 -0800 (PST) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C8CB43E3B for ; Wed, 13 Nov 2002 15:12:48 -0800 (PST) (envelope-from jonc@chen.org.nz) Received: from grimoire.chen.org.nz (localhost [127.0.0.1]) by chen.org.nz (8.12.6/8.12.6) with ESMTP id gADNCa3f063482; Thu, 14 Nov 2002 12:12:36 +1300 (NZDT) (envelope-from jonc@grimoire.chen.org.nz) Received: (from jonc@localhost) by grimoire.chen.org.nz (8.12.6/8.12.6/Submit) id gADNCa86063481; Thu, 14 Nov 2002 12:12:36 +1300 (NZDT) (envelope-from jonc) Date: Thu, 14 Nov 2002 12:12:36 +1300 From: Jonathan Chen To: Toomas Aas Cc: questions@FreeBSD.ORG Subject: Re: unexpected && in sh scripts after upg to 4.7 Message-ID: <20021113231235.GA63427@grimoire.chen.org.nz> References: <200211131907.gADJ7UR02908@lv.raad.tartu.ee> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200211131907.gADJ7UR02908@lv.raad.tartu.ee> User-Agent: Mutt/1.4i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Nov 13, 2002 at 09:05:58PM +0200, Toomas Aas wrote: > Hello! > > Given the latest security advisory about 'resolv', I decided to upgrade > my FreeBSD 4.6.1-RELEASE-p10 server to 4.7-RELEASE-p1 via the usual > cvsup and buildworld magic. > > Everything else seems to have gone fine, but to my surprise after > upgrading two of the ports using scripts in /usr/local/etc/rc.d to > start didn't. One of them is MySQL server. It is started via > /usr/local/etc/rc.d/mysql-server.sh script, which looks like this: > > ----------------------------------------------------------------------- > #!/bin/sh > > case "$1" in > start) > if [ -x /usr/local/bin/safe_mysqld ]; then > # THE BELOW IS ACTUALLY ALL ON ONE LINE > /usr/local/bin/safe_mysqld --user=mysql > /dev/null & && echo -n > 'mysqld' > # THE ABOVE IS ACTUALLY ALL ON ONE LINE > fi > ;; > > ----------------------------------------------------------------------- Upgrade your mysql-port. The & && construct is illegal; the newer port fixes this. -- Jonathan Chen ---------------------------------------------------------------------- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message