Whamcloud - gitweb
LU-5465 scripts: handle added [spl,zfs]-dkms case 81/11381/3
authorBruno Faccini <bruno.faccini@intel.com>
Fri, 8 Aug 2014 23:18:44 +0000 (01:18 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 13 Aug 2014 01:17:43 +0000 (01:17 +0000)
Get SPL/ZFS version also when [spl,zfs]-dkms RPMs have only
been added in DKMS framework and terminology.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I70f339331d6b759fc3c120d8a07cb2f98ccaa148
Reviewed-on: http://review.whamcloud.com/11381
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/scripts/dkms.mkconf

index 6b419a1..03857c5 100755 (executable)
@@ -22,8 +22,8 @@ cat >${filename} <<EOF
 PACKAGE_NAME="${pkgname}"
 PACKAGE_VERSION="${pkgver}"
 PACKAGE_CONFIG="${pkgcfg}"
-SPL_VERSION=\$(dkms status -m spl | awk -F', ' '{print \$2; exit 0}')
-ZFS_VERSION=\$(dkms status -m zfs | awk -F', ' '{print \$2; exit 0}')
+SPL_VERSION=\$(dkms status -m spl | awk -F', ' '{print \$2; exit 0}' | sed 's/: added\$//')
+ZFS_VERSION=\$(dkms status -m zfs | awk -F', ' '{print \$2; exit 0}' | sed 's/: added\$//')
 PRE_BUILD="configure
   --prefix=/usr
   --with-linux=\${kernel_source_dir}