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