From owner-freebsd-questions@FreeBSD.ORG Thu Dec 15 19:44:54 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 A235716A41F for ; Thu, 15 Dec 2005 19:44:54 +0000 (GMT) (envelope-from drench@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCA3143D75 for ; Thu, 15 Dec 2005 19:44:34 +0000 (GMT) (envelope-from drench@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so364679wxc for ; Thu, 15 Dec 2005 11:44:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=MvgUi5MYPPZ12OjOpQX2zHJqqs9bJe3A0SCqQEBvjB6ma5ojIIbOzUr1dJB6sij+UicJxICOx2EAhnYq7Qn4wjZznSrZI7KCOmvb1XSA9sygU9ZrJhkGa1GRg4WfT3OLbHDU8PY/Se0bCXjA69NinyvPSyvcWNwWZWnoC/WKCBM= Received: by 10.70.92.18 with SMTP id p18mr3176013wxb; Thu, 15 Dec 2005 11:44:28 -0800 (PST) Received: by 10.70.125.1 with HTTP; Thu, 15 Dec 2005 11:44:28 -0800 (PST) Message-ID: Date: Thu, 15 Dec 2005 13:44:28 -0600 From: Daniel Rench To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: shebang line parsing changes in 6.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2005 19:44:54 -0000 I upgraded a test box to 6.0 recently and various things broke, all related to the shebang line parsing changes (see: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/imgact_shell.c ). I found the "historical" parsing behavior really, really useful. Like if I wanted a script to always run as a particular user, I'd use "#!/usr/local/bin/sudo -u someuser /bin/sh", or if I wanted to ensure only one copy of a script ran at a time, "#!/usr/local/bin/setlock /some/lock/file /bin/sh" (using setlock from the daemontools package), etc. I guess I could write a program to split argv[1] on whitespace and exec, but is there a simpler way to work around this?