From owner-freebsd-questions Wed Nov 13 15:38:17 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 434F437B401 for ; Wed, 13 Nov 2002 15:38:16 -0800 (PST) Received: from sage-one.net (adsl-65-71-135-137.dsl.crchtx.swbell.net [65.71.135.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3719C43E7B for ; Wed, 13 Nov 2002 15:38:14 -0800 (PST) (envelope-from jackstone@sage-one.net) Received: from sagea (sagea [192.168.0.3]) by sage-one.net (8.11.6/8.11.6) with SMTP id gADNbwD25357; Wed, 13 Nov 2002 17:37:58 -0600 (CST) (envelope-from jackstone@sage-one.net) Message-Id: <3.0.5.32.20021113173756.010b2eb0@mail.sage-one.net> X-Sender: jackstone@mail.sage-one.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Wed, 13 Nov 2002 17:37:56 -0600 To: Jonathan Chen , Toomas Aas From: "Jack L. Stone" Subject: Re: unexpected && in sh scripts after upg to 4.7 Cc: questions@FreeBSD.ORG In-Reply-To: <20021113231235.GA63427@grimoire.chen.org.nz> References: <200211131907.gADJ7UR02908@lv.raad.tartu.ee> <200211131907.gADJ7UR02908@lv.raad.tartu.ee> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 At 12:12 PM 11.14.2002 +1300, Jonathan Chen wrote: >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 >---------------------------------------------------------------------- ...or, more simply: just remove the "&&" from both lines "start" and "stop" in the script.... will start and stop just fine then. Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net jackstone@sage-one.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message