Skip to contentSkip to conversation

compat-wireless: fix update-initramfs script

PATCH Applied Walter Goldens 2 participants 2 messages Oct 28, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 compat-wireless: fix update-initramfs script

There are traces of a widespread error logs from installing compat-wireless pertaining to update-initramfs, as google would suggest. Ubuntu 10.10, for example complains of excessive:
"FATAL: Could not load /lib/modules/2.6.31-wl/modules.dep: No such file or directory" Other distributions/kernels: "Cannot find /lib/modules/2.6.31-wl"

* Fix kernel version detection
* Fix updating of initramfs. Instead of generating new initramfs image, simply update the existing one. This makes update-grub redundant, which is good thing, considering it messes with people's grub.cfg settings every time compat-wireless is installed. At some point replacing this script in Makefile with "@update-initramfs -u" will probably be best.

---

scripts/update-initramfs +6 -4
@@ -10,16 +10,18 @@
 
 LSB_RED_ID=$(/usr/bin/lsb_release -i -s)
 
-KLIB=/lib/modules/2.6.31-wl/build
+KLIB=/lib/modules/$(uname -r)/build
 ver=$(echo $KLIB | awk -F "/lib/modules/" '{print $2}' | awk -F"/" '{print $1}')
 dir=/boot/
 
 case $LSB_RED_ID in
 "Ubuntu")
 	echo "Updating Ubuntu's initramfs for $ver under $dir ..."
-	mkinitramfs -o $dir/initrd.img-$ver $ver
-	echo "Will now run update-grub to ensure grub will find the new initramfs ..."
-	update-grub
+#	mkinitramfs -o $dir/initrd.img-$ver $ver
+	update-initramfs -u
+	echo "update complete"
+#	echo "Will now run update-grub to ensure grub will find the new initramfs ..."
+#	update-grub
 	;;
 *)
 	echo "Warning:"
#1 lore raw
Quoted 14 lines · Walter Goldens

There are traces of a widespread error logs from installing compat-wireless pertaining to update-initramfs, as google would suggest. Ubuntu 10.10, for example complains of excessive:
"FATAL: Could not load /lib/modules/2.6.31-wl/modules.dep: No such file or directory" Other distributions/kernels: "Cannot find /lib/modules/2.6.31-wl"

* Fix kernel version detection
* Fix updating of initramfs. Instead of generating new initramfs image, simply update the existing one. This makes update-grub redundant, which is good thing, considering it messes with people's grub.cfg settings every time compat-wireless is installed. At some point replacing this script in Makefile with "@update-initramfs -u" will probably be best.

Quoted 1 line

applied both and pushed, thanks!

Luis