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?
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?