[Bug 238381] [patch] ports-mgmt/pkg periodic/security/410.pkg-audit gives verbose output

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Sep 22 21:06:57 UTC 2020


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

Matt Simerson <matt at tnpi.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matt at tnpi.net

--- Comment #2 from Matt Simerson <matt at tnpi.net> ---
In a very related (verbose output), how about not spitting out empty jail names
when they have no output? Here's a little patch demonstrating it.

    for j in $jails ; do
        output=''
        for t in audit expiration deprecation; do
            output=${output}$(${t}_pkgs "-j ${j%|*}" ${j##*|})
            last_rc=$?
            [ $last_rc -gt 1 ] && rc=$last_rc
        done

        if [ -n "$output" ]; then
            echo
            echo "jail: ${j%|*}"
            echo $output
        fi
    done

Thanks for your consideration.

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


More information about the freebsd-pkg mailing list