Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/etc/rc.d



Module Name:    src
Committed By:   kre
Date:           Mon Dec 25 08:23:36 UTC 2023

Modified Files:
        src/etc/rc.d: bluetooth

Log Message:
Clean up obsolete test(1) usage - don't use -o, use sh || instead.

This one was particularly bad:

        if [ -z ${dev} -o ${junk} ]; then

was supposed to be validating an entry read from a config file,
dev should be not empty, and junk should be empty (ie: correct
number of fields present).   If that test succeeds, the line is
bad, and we error out.

But if dev was empty, and junk was also empty, that turned into

        if [ -z -o ]; then

which tests if "-o" is the empty string, which it isn't, so instead
of succeeding, and considering the entry invalid (no dev specified)
the code would just carry on as if all was good.

Because of this, a bunch of quoting fixes were also made (there might
perhaps be more needed).


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/bluetooth

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index