]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
extract_storage: fix a bug on selecting modules directory name
authorDongsu Park <dongsu.park@profitbricks.com>
Thu, 22 Aug 2013 11:43:43 +0000 (13:43 +0200)
committerDongsu Park <dongsu.park@profitbricks.com>
Thu, 22 Aug 2013 11:48:11 +0000 (13:48 +0200)
In the sub-script, which is externally invoked by this script,
there was a little bug like "cd /lib/modules/*storage/".
This has been working if there's only 1 directory under /lib/modules.
But after upgrading kernel 3.4.23 to 3.4.51, there could be 2 different
directories, because ANDBD package could be possibly depending on
the older version.

To avoid such situations, set the kernel modules directory just the
same as its kernel version.

extract_storage_kernel+modules.sh

index 0a321fb4ad53fef146dc2d65c4c5ada160cc58ef..3696aa9c914d8eb03369b58b60dca3deab0cd260 100755 (executable)
@@ -94,7 +94,7 @@ export KERNEL_VERSION=###(ls /boot/vmlinu* | cut -d "-" -f2-)
 export GENTOO_KERNEL_VERSION="###(ls /boot/vmlinu* | cut -d "-" -f2).$BUILD_NUMBER"
 cp -v /boot/vmlinu* $TARGET_DIR/
 cp -v /boot/config* $TARGET_DIR/
-cd /lib/modules/*storage/
+cd /lib/modules/###{KERNEL_VERSION}
 /bin/tar -cJvf $TARGET_DIR/modules-###{KERNEL_VERSION}.tar.xz .
 echo "Job      : $JOB_NAME" > $TARGET_DIR/sources.txt
 echo "Build-Nr.: $BUILD_NUMBER" >> $TARGET_DIR/sources.txt