diff options
author | David Howells <dhowells@redhat.com> | 2015-12-21 14:00:56 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2015-12-21 14:00:56 +0000 |
commit | 1ef9e1583d6985935be2dd02851ec67e2ab7bc1d (patch) | |
tree | eafa2dad53a6ec5b3e5ae995e9be8397c32974d0 | |
parent | afa2004732fca000589e90579c299d3227c1771b (diff) | |
download | keyutils-1ef9e1583d6985935be2dd02851ec67e2ab7bc1d.tar.gz |
TEST: Use the lsb_release -s flag to trim the output
The lsb_release command can take a -s flag to trim the fixed specifier text
from the output. This means that it isn't actually necessary to pass the
output through awk to strip this off.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | tests/prepare.inc.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/prepare.inc.sh b/tests/prepare.inc.sh index 8b7cb04..a2793d4 100644 --- a/tests/prepare.inc.sh +++ b/tests/prepare.inc.sh @@ -24,13 +24,13 @@ then echo -n >$OUTPUTFILE fi -case `lsb_release -i | awk '{ print $3}'` in +case `lsb_release -i -s` in Fedora*) OSDIST=Fedora;; RedHatEnterprise*) OSDIST=RHEL;; *) OSDIST=Unknown;; esac -OSRELEASE=`lsb_release -r | awk '{ print $2}'` +OSRELEASE=`lsb_release -r -s` KEYUTILSVER=`keyctl --version 2>/dev/null` if [ -n "$KEYUTILSVER" ] |