Article 5MF3A Possible "="/"==" bug in rc.inet1?

Possible "="/"==" bug in rc.inet1?

by
fogbat
from LinuxQuestions.org on (#5MF3A)
I am running Slackware64-current and trying adjust my rc.inet1.conf to include a bridge for containers, but have yet to be successful.

Trying to understand the operation of rc.inet1, I set DEBUG_ETH_UP="yes" in inet1.conf, but, could not find debugging output in any message log.

Reading rc.inet1, I find the debug_log() function tests DEBUG_ETH_UP with a statement phrase:

if [ "$DEBUG_ETH_UP" = "yes" ]; then ...

When I change the test phrase to:

if [ "$DEBUG_ETH_UP" == "yes" ]; then ...

the debugging output is successfully found in /var/log/messages.

I see in man bash that both = and == should compare the strings "$DEBUG_ETH_UP" and "yes" for equality, with a single = being preferred for POSIX environment.

The last change log entry for rc.inet1 was Oct 13 2019, so I'm thinking this should be an old and fixed issue.

Could someone please help me understand what is happening?latest?d=yIl2AUoC8zA latest?i=vleIMUNRBFM:6jFVBklmfsk:F7zBnMy latest?i=vleIMUNRBFM:6jFVBklmfsk:V_sGLiP latest?d=qj6IDK7rITs latest?i=vleIMUNRBFM:6jFVBklmfsk:gIN9vFwvleIMUNRBFM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments