summaryrefslogtreecommitdiff
blob: 9cd9fd86fb701a3ee8a36a63cb9e1d2a49de3b87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Running this script with dash results in an endless loop spitting out this:

  ./test-driver: 62: [: --test-name: unexpected operator
  ./test-driver: 78: [[: not found

This is caused by two bashisms which are being fixed by the below patch

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

--- ethtool-5.8/test-driver
+++ ethtool-5.8/test-driver
@@ -59,7 +59,7 @@
 while test $# -gt 1; do
  arg=${1%=*}
  val=${1#*=}
- if [ $arg == $val ]; then
+ if [ $arg = $val ]; then
    val=$2
    shift
  fi
@@ -75,7 +75,7 @@
   --) break;;
   -*) usage_error "invalid option: '$1'";;
   esac
-  [[ $arg != $val ]] && shift
+  [ $arg != $val ] && shift
 done
 
 missing_opts=