Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function live-kernerl-update()
- {
- # Update the kernel source
- KERNELSOURCE=~/LiveKernel/linux
- cd $KERNELSOURCE
- git pull
- # Compiling the updated kernel source ( just changes since last hours git pull )
- fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false
- # Test compile was successful
- if test $? -ne 0;
- then
- echo "Git Kernel Failed to compile, will try again in an hour"
- exit;
- fi
- # Create Kpatch module
- kpatch -t vmlinuz kpatch-`date %h-%j-%Y`.ko
- # Update the currently running kernel live
- sudo kpatch load kpatch-`date +%H-%j-%Y`.ko
- }
Add Comment
Please, Sign In to add comment