[Bug 15371] New: env in shebang won't accept more than 1 parameter
bugzilla at busybox.net
bugzilla at busybox.net
Mon Mar 6 02:45:55 UTC 2023
https://bugs.busybox.net/show_bug.cgi?id=15371
Bug ID: 15371
Summary: env in shebang won't accept more than 1 parameter
Product: Busybox
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: m95d+git at psihoexpert.ro
CC: busybox-cvs at busybox.net
Target Milestone: ---
Busybox v1.36.0
When script interpreter path is unknown, it is common to use env as a
"preloader" in the shebang:
#!/bin/env -S <interpreter_without_path> <parameters>
Busybox env does not support -S parameter. Without -S, tries to execute
[interpreter and it's parameters] as a single filename.
Example:
Script starts with "#!/bin/env awk -f":
execve("/usr/sbin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars
*/) = -1 ENOENT (No such file or directory)
execve("/usr/bin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars
*/) = -1 ENOENT (No such file or directory)
execve("/sbin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars */)
= -1 ENOENT (No such file or directory)
execve("/bin/awk -f", ["awk -f", "/bin/ipcalc.sh"], 0xbe806d84 /* 16 vars */) =
-1 ENOENT (No such file or directory)
Please add -S parameter to env.
Thank you.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list