Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
TESTS="${TESTS} -path '*/net/*_extended' -prune -o"
fi
-while read -r -d $'\0' marker; do
+(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print0") | while read -r -d $'\0' marker; do
if [ ! ${QUIET} ]; then
echo "Connecting ${marker%/enable}"
fi
echo 1 > ${marker}
-done < <(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print0")
+done
done
shift $((${OPTIND} - 1))
-while read -r -d $'\0' marker; do
+(eval "find '${MARKERSROOT}' -name metadata -prune -o -name enable -print0") | while read -r -d $'\0' marker; do
grep "^1$" "${marker}" -q
if [ $? -ne 0 ]; then
continue
echo "Disconnecting ${marker%/enable}"
fi
echo 0 > ${marker}
-done < <(eval "find '${MARKERSROOT}' -name metadata -prune -o -name enable -print0")
+done