diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2015-10-22 11:43:58 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2015-11-03 17:16:28 +0100 |
commit | 27902f634ea544c1f077b19a26ca8c81b67059f3 (patch) | |
tree | 2f0977205608987a9239d39111f02ea1c086c1af /testing/scripts/build-guestkernel | |
parent | 3b7ae6673ae7bc330d0305098cd9818a4f6a7856 (diff) | |
download | vyos-strongswan-27902f634ea544c1f077b19a26ca8c81b67059f3.tar.gz vyos-strongswan-27902f634ea544c1f077b19a26ca8c81b67059f3.zip |
Imported Upstream version 5.3.3
Diffstat (limited to 'testing/scripts/build-guestkernel')
-rwxr-xr-x | testing/scripts/build-guestkernel | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/testing/scripts/build-guestkernel b/testing/scripts/build-guestkernel index 17f22bd83..a10fb83d2 100755 --- a/testing/scripts/build-guestkernel +++ b/testing/scripts/build-guestkernel @@ -26,21 +26,27 @@ then execute "wget -q $url" fi -log_action "Unpacking kernel" -execute "tar xJf $KERNELTARBALL" - KERNELDIR=$BUILDDIR/$KERNEL -cd $KERNELDIR -if [ $KERNELPATCH ] +if [ ! -d "$KERNELDIR" ] then - log_action "Applying kernel patch" - bzcat ../$KERNELPATCH | patch -p1 >>$LOGFILE 2>&1 - log_status $? - [ $? -eq 0 ] || exit 1 + log_action "Unpacking kernel" + execute "tar xJf $KERNELTARBALL" + + if [ $KERNELPATCH ] + then + log_action "Applying kernel patch" + bzcat $KERNELPATCH | patch -d $KERNELDIR -p1 >>$LOGFILE 2>&1 + log_status $? + [ $? -eq 0 ] || exit 1 + fi fi +cd $KERNELDIR -execute "cp $KERNELCONFIG .config" 0 +if [ ! -f .config ] +then + execute "cp $KERNELCONFIG .config" 0 +fi echo "Creating kernel configuration, you might get prompted for new parameters" make oldconfig 2>&1 | tee -a $LOGFILE |