2010-10-28 09:14:19

by Walter Goldens

[permalink] [raw]
Subject: [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.


Signed-off-by: Walter Goldens <[email protected]>
---

--- a/scripts/update-initramfs
+++ b/scripts/update-initramfs
@@ -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:"






2010-10-28 16:43:41

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 2/2] compat-wireless: fix update-initramfs script

On Thu, Oct 28, 2010 at 2:14 AM, Walter Goldens
<[email protected]> wrote:
> 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.
>
>
> Signed-off-by: Walter Goldens <[email protected]>

applied both and pushed, thanks!

Luis