]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
include kernel_version in modules.tar.xz filenname
authorHolger Levsen <holger@layer-acht.org>
Wed, 5 Dec 2012 13:52:14 +0000 (14:52 +0100)
committerHolger Levsen <holger@layer-acht.org>
Wed, 5 Dec 2012 13:52:14 +0000 (14:52 +0100)
extract_storage_kernel+modules.sh

index 1bfccf6b0828a1f6c247f20836e65bf0ad2dc9e9..2cbb988e8da34fd91dc6dcc7ba99dca44e24419f 100755 (executable)
@@ -37,13 +37,15 @@ apt-get update
 apt-get install -y grub2 
 apt-get -y install profitbricks-andbd-modules-storage profitbricks-linux-image-storage || true
 mkdir -p $TARGET_DIR
+export KERNEL_VERSION=$(ls /boot/vmlinu* | cut -d "-" -f2-)
 cp -v /boot/vmlinu* $TARGET_DIR/
 cp -v /boot/config* $TARGET_DIR/
 cd /lib/modules/*storage/
-/bin/tar -cJvf $TARGET_DIR/modules.tar.xz .
+/bin/tar -cJvf $TARGET_DIR/modules-${KERNEL_VERSION}.tar.xz .
 echo "Job      : $JOBNAME" > $TARGET_DIR/sources.txt
 echo "Build-Nr.: $BUILD_NUMBER" >> $TARGET_DIR/sources.txt
 echo "URL      : http://jenkins/job/$JOB_NAME/$BUILD_NUMBER/" >> $TARGET_DIR/sources.txt
+echo "Kernel:  : $KERNEL_VERSION" >> $TARGET_DIR/sources.txt
 echo >> $TARGET_DIR/sources.txt
 apt-cache show profitbricks-linux-image-storage >> $TARGET_DIR/sources.txt
 apt-cache show profitbricks-andbd-modules-storage >> $TARGET_DIR/sources.txt