Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
"no" uses a shell colouring control sequences whilst "yes" does not
Version-Release number of selected component (if applicable):
firewalld-0.3.9-7.el7.noarch
How reproducible:
always
Steps to Reproduce:
firewall-cmd --zone=internal --query-masquerade
firewall-cmd --zone=external --query-masquerade
Actual results:
no (in red; 1b5b 3931 6d6e 6f1b 5b30 306d 0a .[91mno.[00m. )
yes (no color; 7965 730a yes. )
Expected results:
use consistent output as used in other commands
Additional info:
This was added with [1]. The commit message doesn't indicate where I'd actually got the idea of colouring the output. It however shows (the commented line) that I was actually considering the idea of colouring (in green) also the outputs of successful commands. I haven't used that because I've thought it'd be too much (of a colours) and that colouring only failed commands outputs is a nice trade-off.
If you really think it needs to be consistent, then I'd rather remove the coulouring at all.
[1] https://git.fedorahosted.org/cgit/firewalld.git/commit/?id=789ff4d2487e13da120706e3cd94066803e31338
(In reply to Jiri Popelka from comment #1)
> If you really think it needs to be consistent, then I'd rather remove the
> coulouring at all.
Or perhaps, do not colour output by default and add --color/--colour to turn that on ?
Hi Jiri,
I personally don't see any reason why it is relevant to colour just one word when it makes the whole message.
It might be a good idea to use the option to trigger the colouring, but who would then use it.
There are cases where yes/no does not necessarily needs to be in green/red, e.g. --query-lockdown. There's no wrong or good reply.
I didn't get to any stronger conclusion how to deal with this.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-0520.html