lttctl scripts: ensure sh compatibility
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 1 Feb 2010 14:38:41 +0000 (09:38 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Mon, 1 Feb 2010 14:38:41 +0000 (09:38 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
configure.in
lttctl/Makefile.am
lttctl/ltt-armall.sh
lttctl/ltt-disarmall.sh

index 81c21c3ab3385b817e14f0b3039f2eb3b0d1bd3b..d67e7d4688d0f00a07e272bfa404d88c99e77a64 100644 (file)
@@ -23,7 +23,7 @@
 AC_PREREQ(2.57)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
 #AC_WITH_LTDL  # not needed ?
-AM_INIT_AUTOMAKE(ltt-control,0.78-04122009)
+AM_INIT_AUTOMAKE(ltt-control,0.79-01022010)
 AM_CONFIG_HEADER(config.h)
 AM_PROG_LIBTOOL
 
index b01d983fbca9e7f84a7a5e1df3590276b0af3069..66df1b76ac28d46624706e7386a1f2dfb9108931 100644 (file)
@@ -2,6 +2,9 @@
 
 AM_CFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)"\" -DPACKAGE_BIN_DIR=\""$(bindir)"\"
 
+# Ensure scripts are portable by depending only on /bin/sh
+SH = /bin/sh
+
 bin_PROGRAMS = lttctl
 bin_SCRIPTS = ltt-armall ltt-disarmall \
   ltt-armtap ltt-disarmtap
@@ -11,25 +14,25 @@ EXTRA_DIST = ltt-armall.sh ltt-disarmall.sh \
 
 ltt-armall: ltt-armall.sh
        rm -f ltt-armall
-       echo "#!"$(BASH) > ltt-armall
+       echo "#!"$(SH) > ltt-armall
        cat $(srcdir)/ltt-armall.sh >> ltt-armall
        chmod ugo+x ltt-armall
 
 ltt-disarmall: ltt-disarmall.sh
        rm -f ltt-disarmall
-       echo "#!"$(BASH) > ltt-disarmall
+       echo "#!"$(SH) > ltt-disarmall
        cat $(srcdir)/ltt-disarmall.sh >> ltt-disarmall
        chmod ugo+x ltt-disarmall
 
 ltt-armtap: ltt-armtap.sh
        rm -f ltt-armtap
-       echo "#!"$(BASH) > ltt-armtap
+       echo "#!"$(SH) > ltt-armtap
        cat $(srcdir)/ltt-armtap.sh >> ltt-armtap
        chmod ugo+x ltt-armtap
 
 ltt-disarmtap: ltt-disarmtap.sh
        rm -f ltt-disarmtap
-       echo "#!"$(BASH) > ltt-disarmtap
+       echo "#!"$(SH) > ltt-disarmtap
        cat $(srcdir)/ltt-disarmtap.sh >> ltt-disarmtap
        chmod ugo+x ltt-disarmtap
 
index 9b740d1cfd9b0e7dc85112f79000a8ae18ccccbc..03143235431dfc7bf3cbaeeae6c5210190533111 100755 (executable)
@@ -62,7 +62,7 @@ if [ ! ${NETWORK} ]; then
        TESTS="${TESTS} -path '*/net/*_extended' -prune -o"
 fi
 
-(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print0") | while read -r -d $'\0' marker; do
+(eval "find '${MARKERSROOT}' ${TESTS} -name metadata -prune -o -name enable -print") | while read -r marker; do
        if [ ! ${QUIET} ]; then
                echo "Connecting ${marker%/enable}"
        fi
index 4f4fdcab7f5012c2be48f0d26404d3757c4ff570..5fdcf1ec2b6f3fdf0acbaf80a6f15e5b52993ca5 100755 (executable)
@@ -48,7 +48,7 @@ while getopts "qh" options; do
 done
 shift $((${OPTIND} - 1))
 
-(eval "find '${MARKERSROOT}' -name metadata -prune -o -name enable -print0") | while read -r -d $'\0' marker; do
+(eval "find '${MARKERSROOT}' -name metadata -prune -o -name enable -print") | while read -r marker; do
        grep "^1$" "${marker}" -q
        if [ $? -ne 0 ]; then
                continue
This page took 0.026057 seconds and 4 git commands to generate.