[Bug 228149] sysutils/munin-node: share/munin/plugins/ping_ wrong syntax for ping

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 11 09:44:59 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228149

            Bug ID: 228149
           Summary: sysutils/munin-node: share/munin/plugins/ping_ wrong
                    syntax for ping
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: mat at FreeBSD.org
          Reporter: niels=freebsd at bakker.net
             Flags: maintainer-feedback?(mat at FreeBSD.org)
          Assignee: mat at FreeBSD.org

In this commit:

 
https://github.com/munin-monitoring/munin/commit/0c75a5a0e160fba1e6c2853aab2e0753eaeee026#diff-cd846aa800193ea2a91756291de6cabf

the ping program's invocation was changed from ${ping_args2} to ${ping_args2:-}

This works for bash but not for FreeBSD's sh, where this expands to a null
argument, leading ping to complain and fail.

Note the extra space below, indicating that echo was invoked with an extra
argument:

% /bin/sh -c 'echo foo ${foo:-} bar'
foo  bar

The developer will no doubt have tested this only on Linux:

% /usr/local/bin/bash -c 'echo foo ${foo:-} bar'
foo bar

Possible fixes:

1) revert the relevant part of that commit (I don't see the point for this
particular change at all; 'set -u' is not the default nor set in the script)
2) change the script's hashbang to /usr/local/bin/bash (the port already has a
dependency on shells/bash)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list