diff options
| author | Henrik Riomar <henrik.riomar@gmail.com> | 2017-09-08 10:05:10 +0200 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-09-19 14:45:04 +0000 |
| commit | ef0c973ce651944cb71939a35f8ee9856213bcdd (patch) | |
| tree | c6d647563c9147ce760881cbe5439fd4ac4bc74a /testing/virt-what/Remove-bashisms.patch | |
| parent | 8b768022ca5f5080c2c08d5e1e3b98054dc95b08 (diff) | |
| download | aports-ef0c973ce651944cb71939a35f8ee9856213bcdd.tar.bz2 aports-ef0c973ce651944cb71939a35f8ee9856213bcdd.tar.xz | |
testing/virt-what: fix bashisms
Add Remove-bashisms.patch from Debian
Drop: skip-ldoms-test-if-not-sparc64.patch not needed after bashisms fix
Diffstat (limited to 'testing/virt-what/Remove-bashisms.patch')
| -rw-r--r-- | testing/virt-what/Remove-bashisms.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/virt-what/Remove-bashisms.patch b/testing/virt-what/Remove-bashisms.patch new file mode 100644 index 0000000000..ec0baf6bcd --- /dev/null +++ b/testing/virt-what/Remove-bashisms.patch @@ -0,0 +1,43 @@ +From: =?utf-8?q?Guido_G=C3=BCnther_agx=40sigxcpu=2Eorg?= +Date: =?utf-8?q?Wed=2C_2_Aug_2017_14=3A16=3A07_-0300?= +Subject: =?utf-8?q?Remove_bashisms?= + +Use [ instead of [[ and -a instead of && so we fall back to test if +necessary: + + http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html +--- + virt-what.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/virt-what.in b/virt-what.in +index 8c27b11..56af1ad 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -360,20 +360,20 @@ if [ "$cpuid" = "OpenBSDVMM58" ]; then + fi + + # Check for LDoms +-if [[ "$arch" == sparc* && -e ${root}/dev/mdesc ]]; then ++if [ ${arch#sparc} != "$arch" -a -e ${root}/dev/mdesc ]; then + echo ldoms +- if [[ -d ${root}/sys/class/vlds/ctrl && \ +- -d ${root}/sys/class/vlds/sp ]]; then ++ if [ -d ${root}/sys/class/vlds/ctrl -a \ ++ -d ${root}/sys/class/vlds/sp ]; then + echo ldoms-control + else + echo ldoms-guest + fi + MDPROP="${root}/usr/lib/ldoms/mdprop.py" +- if [[ -x ${MDPROP} ]]; then +- if [[ -n $($MDPROP -v iodevice device-type=pciex) ]]; then ++ if [ -x ${MDPROP} ]; then ++ if [ -n $($MDPROP -v iodevice device-type=pciex) ]; then + echo ldoms-root + echo ldoms-io +- elif [[ -n $($MDPROP -v iov-device vf-id=0) ]]; then ++ elif [ -n $($MDPROP -v iov-device vf-id=0) ]; then + echo ldoms-io + fi + fi |
