summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2013-07-08 14:44:28 +0200
committerJonathan Bauer2013-07-08 14:44:28 +0200
commit3bc8241149d0a2170753d64b85510bc22af3805a (patch)
tree3f81f0aa7ea02f8930611f4dc938e88b9d0d6c5b
parentMerge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-3bc8241149d0a2170753d64b85510bc22af3805a.tar.gz
tm-scripts-3bc8241149d0a2170753d64b85510bc22af3805a.tar.xz
tm-scripts-3bc8241149d0a2170753d64b85510bc22af3805a.zip
AUTO_UPDATE_KERNEL flag to rebuild kernel on version update or not
-rwxr-xr-xmltk5
-rwxr-xr-xremote/setup_target8
2 files changed, 7 insertions, 6 deletions
diff --git a/mltk b/mltk
index 8db16566..1e554824 100755
--- a/mltk
+++ b/mltk
@@ -27,10 +27,15 @@ for i in $DEVTOOLS; do
which "$i" 2>/dev/null 1>&2 || { echo "Essential development tool $i not found - exiting."; exit 1; }
done
+# AUTO_UPDATE_KERNEL flag to rebuild kernel if a new version is detected
+AUTO_UPDATE_KERNEL=1
+
# Make apt-get install non-interactive when it comes to postinstall questions
# ie. kdm asking which dm you want to set as default
export DEBIAN_FRONTEND=noninteractive
+
+
qnd_exit() {
unset_quiet
kill "$MLTK_PID"
diff --git a/remote/setup_target b/remote/setup_target
index f5df66ad..804f43bc 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -237,12 +237,8 @@ generate_target() {
local BUILT_KERNEL_VERSION=$(cat "${MODULES_DIR}/kernel/ksrc/KVERSION")
if [[ "${BUILT_KERNEL_VERSION}" != "${KERNEL_CURRENT_VERSION}" ]]; then
pinfo "The built kernel (${BUILT_KERNEL_VERSION}) is older than the running one (${KERNEL_CURRENT_VERSION})!"
- pinfo "Do you want to clean the old kernel and re-build for the new version? (Y/n)"
- read USER_INPUT
- if [ "x$USER_INPUT" == "xy" -o "x$USER_INPUT" == "xY" -o "x$USER_INPUT" == "x" ]; then
- clean_kernel_module --force
- # cleaning the module is enough as it forces to rebuild.
- fi
+ # cleaning the module is enough as it forces to rebuild.
+ [[ "${AUTO_UPDATE_KERNEL}" == 1 ]] && pinfo "Auto-Udpate Kernel..." && clean_kernel_module --force
fi
else
# KVERSION is not found.