From: Dongsu Park Date: Thu, 22 Aug 2013 11:43:43 +0000 (+0200) Subject: extract_storage: fix a bug on selecting modules directory name X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=9c926632774fdfba5d29dfb8261e8ffa30a3a3fa;p=profitbricks%2Fjenkins-build-scripts.git extract_storage: fix a bug on selecting modules directory name 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. --- diff --git a/extract_storage_kernel+modules.sh b/extract_storage_kernel+modules.sh index 0a321fb..3696aa9 100755 --- a/extract_storage_kernel+modules.sh +++ b/extract_storage_kernel+modules.sh @@ -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