Closed vvv closed 5 years ago
merged
resolved all discussions
Ok, it seems working on my devvm (just checked).
@andriy.tkachuk I believe it will work the same way, bash
will strip away the empty string variable substitution
I'm not sure it will work in case there is no eth1 interface. Please check it on devvm. (The old approach with ${var:+} made argument void to the script if the var is null. Now it will be just an empty string instead.)
Run precise check (
test -e eth1
) instead of matching against a pattern (ls | grep eth1
).CMD && ACTION
may return non-zero exit code. This would prevent execution of subsequent commands, since h0 script runs withset -e
. The solution is to either useif CMD; then ACTION; fi
or! CMD || ACTION
.