From: Chapman Flack Date: Sat, 5 Apr 2014 01:24:51 +0000 (-0400) Subject: Correct strstr/strglobin in test suite. X-Git-Tag: 038~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cf339ada3110f4f366c373dab4d5f27f57ca6f3;p=thirdparty%2Fdracut.git Correct strstr/strglobin in test suite. Previous commit included versions of strstr/strglobin in the test suite files that did not match those in dracut-lib.sh. --- diff --git a/test/TEST-01-BASIC/test-init.sh b/test/TEST-01-BASIC/test-init.sh index 6e3a31ab5..cf5a0262e 100755 --- a/test/TEST-01-BASIC/test-init.sh +++ b/test/TEST-01-BASIC/test-init.sh @@ -1,7 +1,7 @@ #!/bin/sh >/dev/watchdog export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-02-SYSTEMD/test-init.sh b/test/TEST-02-SYSTEMD/test-init.sh index 43d7a21be..3fc24f526 100755 --- a/test/TEST-02-SYSTEMD/test-init.sh +++ b/test/TEST-02-SYSTEMD/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec /dev/console 2>&1 diff --git a/test/TEST-03-USR-MOUNT/test-init.sh b/test/TEST-03-USR-MOUNT/test-init.sh index e4f37793b..99e109aa5 100755 --- a/test/TEST-03-USR-MOUNT/test-init.sh +++ b/test/TEST-03-USR-MOUNT/test-init.sh @@ -1,7 +1,7 @@ #!/bin/sh >/dev/watchdog export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec /dev/console 2>&1 diff --git a/test/TEST-04-FULL-SYSTEMD/test-init.sh b/test/TEST-04-FULL-SYSTEMD/test-init.sh index c2ed7b974..3012213ec 100755 --- a/test/TEST-04-FULL-SYSTEMD/test-init.sh +++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh @@ -1,7 +1,7 @@ #!/bin/sh >/dev/watchdog export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec /dev/console 2>&1 diff --git a/test/TEST-10-RAID/test-init.sh b/test/TEST-10-RAID/test-init.sh index c64523f65..4b4977a07 100755 --- a/test/TEST-10-RAID/test-init.sh +++ b/test/TEST-10-RAID/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) command -v plymouth >/dev/null && plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-11-LVM/test-init.sh b/test/TEST-11-LVM/test-init.sh index 2afeeb916..db3c52a36 100755 --- a/test/TEST-11-LVM/test-init.sh +++ b/test/TEST-11-LVM/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-12-RAID-DEG/test-init.sh b/test/TEST-12-RAID-DEG/test-init.sh index c64523f65..4b4977a07 100755 --- a/test/TEST-12-RAID-DEG/test-init.sh +++ b/test/TEST-12-RAID-DEG/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) command -v plymouth >/dev/null && plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-14-IMSM/test-init.sh b/test/TEST-14-IMSM/test-init.sh index 616b73c3f..932bd26dc 100755 --- a/test/TEST-14-IMSM/test-init.sh +++ b/test/TEST-14-IMSM/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-16-DMSQUASH/test-init.sh b/test/TEST-16-DMSQUASH/test-init.sh index e8c8e70e3..55a532124 100755 --- a/test/TEST-16-DMSQUASH/test-init.sh +++ b/test/TEST-16-DMSQUASH/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-17-LVM-THIN/test-init.sh b/test/TEST-17-LVM-THIN/test-init.sh index 2afeeb916..db3c52a36 100755 --- a/test/TEST-17-LVM-THIN/test-init.sh +++ b/test/TEST-17-LVM-THIN/test-init.sh @@ -1,6 +1,6 @@ #!/bin/sh export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) plymouth --quit exec >/dev/console 2>&1 diff --git a/test/TEST-20-NFS/client-init.sh b/test/TEST-20-NFS/client-init.sh index f6bbdd92f..a16db3ceb 100755 --- a/test/TEST-20-NFS/client-init.sh +++ b/test/TEST-20-NFS/client-init.sh @@ -4,7 +4,7 @@ exec >/dev/console 2>&1 export TERM=linux export PS1='initramfs-test:\w\$ ' CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) -strstr() { [ "${1#*"$2"*}" != "$1" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } stty sane strstr "$CMDLINE" "rd.shell" && sh -i diff --git a/test/TEST-50-MULTINIC/client-init.sh b/test/TEST-50-MULTINIC/client-init.sh index 932096357..13affc418 100755 --- a/test/TEST-50-MULTINIC/client-init.sh +++ b/test/TEST-50-MULTINIC/client-init.sh @@ -2,8 +2,8 @@ exec >/dev/console 2>&1 set -x export PATH=/sbin:/bin:/usr/sbin:/usr/bin -strstr() { [ "${1#*"$2"*}" != "$1" ]; } -strglobin() { [ -n "$1" -a -z "${1#*$2*}" ]; } +strstr() { [ "${1##*"$2"*}" != "$1" ]; } +strglobin() { [ -n "$1" -a -z "${1##*$2*}" ]; } CMDLINE=$(while read line; do echo $line;done < /proc/cmdline) export TERM=linux export PS1='initramfs-test:\w\$ '