fedora-sysv / initscripts

📜 Scripts to bring up network interfaces and legacy utilities in Fedora.
GNU General Public License v2.0
46 stars 52 forks source link

grep -L return value breaks network start #300

Closed dirteat closed 4 years ago

dirteat commented 4 years ago

Spotted by M. W. on Mageia:

This breaks the init.d/network scripts there:

if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then # this loads the module, to preserve ordering is_available $i continue fi

and just after for the # Bring up xDSL and VPN interfaces.

The fix is to either use a negation, or the negated option -l

Cheers, Chris.

lnykryn commented 4 years ago

I would suggest replacing this with something like if ( . ./ifcfg-$i ; is_false $ONBOOT ; ) ; then .... Using standard is_true/is_false function but sourcing the ifcfg file in the subshell, so we don't mess up the current environment.

jamacku commented 4 years ago

Hi, Pull request #301 should fix your issue. In case It won't, please let me know.

jamacku commented 4 years ago

Fixed in initscripts 10.03