--- dkms-2.0.9/dkms.procconfig 2005-12-20 12:50:02.000000000 +0100 +++ dkms-2.0.9/dkms 2005-12-20 12:50:30.000000000 +0100 @@ -789,12 +789,18 @@ else config_arch=$2 fi - for config_type in BOOT smp enterprise secure i586-up-1GB i686-up-4GB p3-smp-64GB desktop586 desktop laptop server; do - [ `echo "$1" | grep "$config_type"` ] && kernel_config="$kernel_source_dir/arch/$config_arch/defconfig-$config_type" - [ ! -e "$kernel_config" ] && kernel_config="" - done - [ -z "$kernel_config" ] && kernel_config="$kernel_source_dir/arch/$config_arch/defconfig" - [ ! -e "$kernel_config" ] && kernel_config="" + if [ "$1" == `uname -r` ] && [ -e "/proc/config.gz" ]; then + kernel_config="/proc/config.gz" + elif [ -e "/boot/config-$1" ]; then + kernel_config="/boot/config-$1" + else + for config_type in BOOT smp enterprise secure i586-up-1GB i686-up-4GB p3-smp-64GB desktop586 desktop laptop server; do + [ `echo "$1" | grep "$config_type"` ] && kernel_config="$kernel_source_dir/arch/$config_arch/defconfig-$config_type" + [ ! -e "$kernel_config" ] && kernel_config="" + done + [ -z "$kernel_config" ] && kernel_config="$kernel_source_dir/arch/$config_arch/defconfig" + [ ! -e "$kernel_config" ] && kernel_config="" + fi fi elif [ -e /etc/SuSE-release ] || [ -d /etc/SuSEconfig ]; then if [ -z "$kernel_config" ] && [ -d "$kernel_source_dir/arch" ]; then @@ -844,7 +850,11 @@ if [ -n "$kernel_config" ]; then echo $"using $kernel_config" - cp -f "$kernel_config" .config + if file -b -i "$kernel_config" | grep -q "application/x-gzip"; then + zcat "$kernel_config" > .config + else + cp -f "$kernel_config" .config + fi elif [ -e .config ]; then echo $"using $kernel_source_dir/.config" echo $"(I hope this is the correct config for this kernel)" @@ -871,7 +881,11 @@ if [ -n "$kernel_config" ]; then echo $"using $kernel_config" - cp -f "$kernel_config" .config + if file -b -i "$kernel_config" | grep -q "application/x-gzip"; then + zcat "$kernel_config" > .config + else + cp -f "$kernel_config" .config + fi elif [ -e .config ]; then echo $"using $kernel_source_dir/.config" echo $"(I hope this is the correct config for this kernel)"