From owner-freebsd-questions Wed Nov 13 11: 7:41 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 1C9DB37B401 for ; Wed, 13 Nov 2002 11:07:40 -0800 (PST) Received: from lv.raad.tartu.ee (lv.raad.tartu.ee [194.126.106.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DE4E43E3B for ; Wed, 13 Nov 2002 11:07:38 -0800 (PST) (envelope-from toomas.aas@raad.tartu.ee) Received: Message by Barricade lv.raad.tartu.ee with ESMTP id gADJ7UR02908 for ; Wed, 13 Nov 2002 21:07:30 +0200 Message-Id: <200211131907.gADJ7UR02908@lv.raad.tartu.ee> Received: from SpoolDir by INFO (Mercury 1.48); 13 Nov 02 21:06:00 +0200 From: "Toomas Aas" Organization: Tartu City Government To: questions@freebsd.org Date: Wed, 13 Nov 2002 21:05:58 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: unexpected && in sh scripts after upg to 4.7 X-info: Headers changed by Barricade 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 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 ;; ----------------------------------------------------------------------- I determined from ps output that mysqld is not running. Then I tried to run '/usr/local/etc/rc.d/mysql-server.sh start' from the command line, and got the error message 'Syntax error, unexpected "&&"' (I write this from memory, so the message is not exact but the meaning is). This mysql-server.sh script has been there since the server was originally installed and it has never been touched. The server has been upgraded from 4.3 to 4.5 to 4.6, and now this. For now I just broke the one line which caused the problem into two: /usr/local/bin/safe_mysqld --user=mysql > /dev/null & echo -n 'mysqld' but this just isn't right. The other script which doesn't start is pwcheck.sh (I think this is installed as part of Cyrus SASL or IMAPD, not sure exactly what it is used for ). The start line there also contains the '& &&' sequence: ${sasl_pwcheck_program} & && echo -n " pwcheck" How should I really correct the problem (the shotgun approach would probably be to upgrade the relevant ports to latest, but I'm looking for something lighter). -- Toomas Aas | toomas.aas@raad.tartu.ee | http://www.raad.tartu.ee/~toomas/ * Jesus has changed your life. Save changes (Y/N)? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message