diff options
author | Andrew Cady <d@jerkface.net> | 2019-06-18 16:16:39 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2019-06-18 16:16:39 -0400 |
commit | d0b46fd6b01e561b7e388dd91c271ad8e301bb6d (patch) | |
tree | 53f9cd96f72996a382e858f7259a63b005306089 | |
parent | 0ea67bc90446c26a8d76f333a34dbef0da63f0b2 (diff) |
Change version selection logic for vmlinuz/initrd
We now choose the installed version of linux-image-rt-amd64
This will surely break if linux-image-rt-amd64 is not installed.
-rwxr-xr-x | src/initrd.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/initrd.sh b/src/initrd.sh index ffa55d1..b6939b1 100755 --- a/src/initrd.sh +++ b/src/initrd.sh | |||
@@ -6,7 +6,12 @@ initrd=${samizdat_linux_dir}/initrd.img | |||
6 | vmlinuz=${samizdat_linux_dir}/vmlinuz | 6 | vmlinuz=${samizdat_linux_dir}/vmlinuz |
7 | 7 | ||
8 | # version=4.9.0-6-amd64 | 8 | # version=4.9.0-6-amd64 |
9 | version=$(uname -r) | 9 | # version=$(apt-cache policy linux-image-amd64 | sed -ne 's/ Candidate: //p' || uname -r) |
10 | kernel_package=linux-image-rt-amd64 | ||
11 | kernel_package_version=$(apt-cache policy $kernel_package | sed -ne 's/ *Installed: //p') | ||
12 | real_kernel_package=$(apt-cache show $kernel_package=$kernel_package_version | sed -n 's/^Depends: //p') | ||
13 | version=${real_kernel_package#linux-image-} | ||
14 | |||
10 | conf_dir=$samizdat_initramfs_conf_dir | 15 | conf_dir=$samizdat_initramfs_conf_dir |
11 | 16 | ||
12 | apt_dependencies=$samizdat_initrd_files_dir/initrd-dependencies.txt | 17 | apt_dependencies=$samizdat_initrd_files_dir/initrd-dependencies.txt |