modalias.prov: fix spurious exitcode of 1 on reaching EOF
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
0c32043719
commit
9d75b962fc
6
modalias.prov
Normal file → Executable file
6
modalias.prov
Normal file → Executable file
@ -42,7 +42,11 @@ print_modaliases() {
|
||||
|
||||
combine_modaliases() {
|
||||
declare tag class variants="" pos="" n
|
||||
read class
|
||||
|
||||
# Due to set -e, we can exit with exitcode 1 on read EOF
|
||||
# and this makes our caller think we failed. "|| return 0" prevents this:
|
||||
read class || return 0
|
||||
|
||||
while read tag; do
|
||||
for ((n=0; n<${#class}; n++)); do
|
||||
if [ "*" != "${class:n:1}" -a \
|
||||
|
Loading…
Reference in New Issue
Block a user