From 734e72186a9e9d6fcbae43661917a765b6e39464 Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Thu, 19 Nov 2020 17:22:45 +0100 Subject: [PATCH] install.sh: If current config isn't found in /boot/config-*, try /proc/config.gz --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 0204119..dc2de37 100755 --- a/install.sh +++ b/install.sh @@ -194,8 +194,11 @@ if [ "$1" = "install" ] || [ "$1" = "config" ]; then cd "$_where"/linux-${_basekernel} fi - msg2 "Copying current kernel's config and running make oldconfig..." - cp /boot/config-`uname -r` .config + if ( msg2 "Trying /boot/config-* ..." && cp /boot/config-`uname -r` .config ) || ( msg2 "Trying /proc/config.gz ..." && zcat --verbose /proc/config.gz > .config ); then + msg2 "Copying current kernel's config and running make oldconfig..." + else + msg2 "Current kernel config not found! Falling back to default..." + fi if [ "$_distro" = "Debian" ]; then #Help Debian cert problem. sed -i -e 's#CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/test-signing-certs.pem"#CONFIG_SYSTEM_TRUSTED_KEYS=""#g' .config fi