Blame SOURCES/0002-Remove-bashisms.patch

e10a2d
From 9d90704a05dee7704470eff818a1c44aeef6c880 Mon Sep 17 00:00:00 2001
e10a2d
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
e10a2d
Date: Fri, 4 Aug 2017 12:02:08 -0300
7c1897
Subject: [PATCH 02/22] Remove bashisms
e10a2d
e10a2d
Use [ instead of [[ so we fall back to test if necessary:
e10a2d
e10a2d
     http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html
e10a2d
e10a2d
Gbp-Pq: Name Remove-bashisms.patch
e10a2d
---
e10a2d
 virt-what.in | 12 ++++++------
e10a2d
 1 file changed, 6 insertions(+), 6 deletions(-)
e10a2d
e10a2d
diff --git a/virt-what.in b/virt-what.in
e10a2d
index 9050035..a05e0db 100644
e10a2d
--- a/virt-what.in
e10a2d
+++ b/virt-what.in
e10a2d
@@ -360,20 +360,20 @@ if [ "$cpuid" = "OpenBSDVMM58" ]; then
e10a2d
 fi
e10a2d
 
e10a2d
 # Check for LDoms
e10a2d
-if [[ "$arch" == sparc* && -e ${root}/dev/mdesc ]]; then
e10a2d
+if [ "${arch#sparc}" != "$arch" ] && [ -e "${root}/dev/mdesc" ]; then
e10a2d
     echo ldoms
e10a2d
-    if [[ -d ${root}/sys/class/vlds/ctrl && \
e10a2d
-             -d ${root}/sys/class/vlds/sp ]]; then
e10a2d
+    if [ -d "${root}/sys/class/vlds/ctrl" ] && \
e10a2d
+             [ -d "${root}/sys/class/vlds/sp" ]; then
e10a2d
         echo ldoms-control
e10a2d
     else
e10a2d
         echo ldoms-guest
e10a2d
     fi
e10a2d
     MDPROP="${root}/usr/lib/ldoms/mdprop.py"
e10a2d
-    if [[ -x ${MDPROP} ]]; then
e10a2d
-        if [[ -n $($MDPROP -v iodevice device-type=pciex) ]]; then
e10a2d
+    if [ -x "${MDPROP}" ]; then
e10a2d
+        if [ -n "$($MDPROP -v iodevice device-type=pciex)" ]; then
e10a2d
             echo ldoms-root
e10a2d
             echo ldoms-io
e10a2d
-        elif [[ -n $($MDPROP -v iov-device vf-id=0) ]]; then
e10a2d
+        elif [ -n "$($MDPROP -v iov-device vf-id=0)" ]; then
e10a2d
             echo ldoms-io
e10a2d
         fi
e10a2d
     fi
e10a2d
-- 
7c1897
2.32.0
e10a2d