summaryrefslogtreecommitdiffstats
path: root/remote/modules/kernel/kernel.build
diff options
context:
space:
mode:
authorMichael Neves2013-07-08 17:02:37 +0200
committerMichael Neves2013-07-08 17:02:37 +0200
commit12d3c2d4bc1a66eb33566fb32b0f25603836eea8 (patch)
tree0179ffbd9e85dcd3954afa1720b1a699f33c4f31 /remote/modules/kernel/kernel.build
parent[vmchooser] remove unneeded icon for xterm (diff)
parent[debug] remove xset from REQUIRED_INSTALLED_PACKAGES as its wrong for ubuntu (diff)
downloadtm-scripts-12d3c2d4bc1a66eb33566fb32b0f25603836eea8.tar.gz
tm-scripts-12d3c2d4bc1a66eb33566fb32b0f25603836eea8.tar.xz
tm-scripts-12d3c2d4bc1a66eb33566fb32b0f25603836eea8.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/kernel/kernel.build')
-rw-r--r--remote/modules/kernel/kernel.build12
1 files changed, 8 insertions, 4 deletions
diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build
index 59bc8e99..99ee36a2 100644
--- a/remote/modules/kernel/kernel.build
+++ b/remote/modules/kernel/kernel.build
@@ -3,7 +3,7 @@ fetch_source() {
if [ "x$PACKET_MANAGER" == "xapt" ]; then
pdebug "apt-ing kernel source"
apt-get install -y dpkg-dev || perror "Installing dpkg-dev failed."
- apt-get source linux-image-${KERNEL_VERSION} || perror "Fetching kernel source failed."
+ apt-get source linux-image-${KERNEL_CURRENT_VERSION} || perror "Fetching kernel source failed."
[ -z "$(ls -d linux-*/)" ] && perror "Source directory not found."
[ ! -e ksrc ] && ln -s "$(ls -d linux-*/)" "ksrc"
elif [ "x$PACKET_MANAGER" == "xzypper" ]; then
@@ -29,6 +29,10 @@ fetch_source() {
# fix pc speaker
./patch-speaker
+
+ # remember the current kernel version
+ echo "${KERNEL_CURRENT_VERSION}" > ksrc/KVERSION
+
}
build() {
@@ -47,7 +51,7 @@ build() {
else
make oldconfig || perror "make oldconfig failed"
fi
- pinfo "Kompaliere kernel... (this will take some time)"
+ pinfo "Compiling kernel... (this will take some time)"
if gcc --version | grep "4\.7" && which distcc; then
pinfo "USING DISTCC"
make CC="distcc gcc-4.7" -j16 || perror "make failed"
@@ -116,8 +120,8 @@ patch_aufs() {
git clone "git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git" || perror "Cloning aufs3 failed."
fi
# get the needed version
- [ ! -z ${KERNEL_VERSION} ] && local NEEDED_BRANCH=$(echo $KERNEL_VERSION | awk -F "." '{print $1"."$2}') \
- || perror "KERNEL_VERSION not set, this should not happen!"
+ [ ! -z ${KERNEL_CURRENT_VERSION} ] && local NEEDED_BRANCH=$(echo $KERNEL_CURRENT_VERSION | awk -F "." '{print $1"."$2}') \
+ || perror "KERNEL_CURRENT_VERSION not set, this should not happen!"
pinfo "Getting branch origin/$NEEDED_BRANCH"
cd "$MODULE_DIR/aufs3-standalone" || perror "Could not CD to aufs3-standalone"
git checkout "origin/aufs$NEEDED_BRANCH"