|
@ -2458,16 +2458,19 @@ get_service_relation() { |
|
|
return 0 |
|
|
return 0 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
while read-0 rn ts rc td; do |
|
|
|
|
|
|
|
|
while read-0-err E rn ts rc td; do |
|
|
[ "$relation" == "$rn" ] && { |
|
|
[ "$relation" == "$rn" ] && { |
|
|
printf "%s\0" "$ts" "$rc" "$td" |
|
|
printf "%s\0" "$ts" "$rc" "$td" |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
done < <(get_service_relations "$service") > "$cache_file" |
|
|
|
|
|
|
|
|
done < <(p-err get_service_relations "$service") > "${cache_file}.wip" |
|
|
if [ "$?" != 0 ]; then |
|
|
if [ "$?" != 0 ]; then |
|
|
rm -f "$cache_file" ## no cache |
|
|
|
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
if [ "$E" != 0 ]; then |
|
|
|
|
|
return 1 |
|
|
|
|
|
fi |
|
|
|
|
|
mv "${cache_file}"{.wip,} || return 1 |
|
|
cat "$cache_file" |
|
|
cat "$cache_file" |
|
|
} |
|
|
} |
|
|
export -f get_service_relation |
|
|
export -f get_service_relation |
|
|