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