-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: hooks/reload fails because bash path is nonexistent #105
Comments
It does! |
What kind of error output do you get? Can you pin it down to any difference in the capabilities of sh/bash? Is sh symlinked to something else on Ubuntu? |
Tricky ;-) On my Ubuntu workstation (Ubuntu 14.04 LTS), there is a
Apparently the test command is not aliased to |
@gonium: Is /bin/sh symlinked to something? I seem to recall something about switching to dash by default some time ago, since dash is faster. |
@hlandau It seems so:
|
sh appears to be provided by dash: http://packages.ubuntu.com/xenial/dash |
Testing with dash. |
It looks like the issue is that I used the operator |
Fixed in v0.0.45. |
Thanks! |
Sorry about the lack of verbose error, this indeed is a better fix for the original problem. |
I'm just curious, but what speaks against the usage of |
I don't think there's any platform on which having sh in path, but not at /bin/sh is a sane configuration. I use that strategy for Python scripts, but most shell scripts just use At one point when debugging this I was worried I was going to have to do #!/bin/sh
[ -z "$BASH_VERSION" ] && which bash >/dev/null 2>/dev/null && { exec bash "$0" "$@"; }
... So unless you can find a concrete example of where it's necessary, I think I'll leave it as it is, since the script now seems to be appropriately POSIX-conformant. |
Okay, this makes sense. It all adds up! :) |
I'm running acmetool on Freebsd:
The reload hook fails:
because the script looks for
/bin/bash
in the shebang line:Since
bash
is only available as a port (in/usr/local/bin/bash
) I would recommend to use/bin/sh
. A quick test revealed that the script seems to be working using#!/bin/sh
. I am not aware of the consequences on other systems.The text was updated successfully, but these errors were encountered: