Skip to content
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

msmtpq: ping uses linux-only -w for timeout #103

Open
dbaynard opened this issue Oct 11, 2022 · 2 comments
Open

msmtpq: ping uses linux-only -w for timeout #103

dbaynard opened this issue Oct 11, 2022 · 2 comments

Comments

@dbaynard
Copy link

BSD (and therefore macos) ping uses the -t flag for timeouts, not the -w for the linux tool (or the -w/--timeout for the GNU inetutils variant).

I’ve submitted NixOS/nixpkgs#195532 to fix this in the distribution I’m using (they patch msmtpq paths anyway) but it would be good to have a fix considered here. I’m not sure of the best option, but it would be very good to avoid this redirection of stderr to /dev/null, as this concealed the issue.

https://github.com/marlam/msmtp-mirror/blob/7e5e2345c3052e1b9aaa3c57ddd821b33c1d382f/scripts/msmtpq/msmtpq#L208

@marlam
Copy link
Owner

marlam commented Jan 23, 2023

This script does not have a maintainer currently. Can you propose a patch that ideally does not introduce problems on other systems?

@Konfekt
Copy link
Contributor

Konfekt commented May 7, 2024

Since Linux also supports -t, it is not clear how to check by the ping command itself which option is intended if one does not want to parse its documentation.
Therefore, better to check if it is run on a Mac by "$(uname)" = "Darwin" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants