Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2005 13:44:28 -0600
From:      Daniel Rench <drench@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   shebang line parsing changes in 6.0
Message-ID:  <e94f934d0512151144w5b82b1abs6914f013dd37e10c@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e94f934d0512151144w5b82b1abs6914f013dd37e10c>