From: Mathieu Desnoyers Date: Wed, 18 Nov 2009 16:17:30 +0000 (-0500) Subject: Remove dependency of ltt-arm/disarmall on bash idioms X-Git-Tag: 0.80~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d7a3410b5ce5a9cf33c488f8602e9976bef90eeb;p=ltt-control.git Remove dependency of ltt-arm/disarmall on bash idioms Signed-off-by: Mathieu Desnoyers --- diff --git a/lttctl/ltt-armall.sh b/lttctl/ltt-armall.sh index 9eda365..307f0b1 100755 --- a/lttctl/ltt-armall.sh +++ b/lttctl/ltt-armall.sh @@ -62,9 +62,9 @@ if [ ! ${NETWORK} ]; then 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 diff --git a/lttctl/ltt-disarmall.sh b/lttctl/ltt-disarmall.sh index aa1a0d7..64e65a4 100755 --- a/lttctl/ltt-disarmall.sh +++ b/lttctl/ltt-disarmall.sh @@ -48,7 +48,7 @@ while getopts "qh" options; do 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 @@ -57,4 +57,4 @@ while read -r -d $'\0' marker; do echo "Disconnecting ${marker%/enable}" fi echo 0 > ${marker} -done < <(eval "find '${MARKERSROOT}' -name metadata -prune -o -name enable -print0") +done