wl1251: Add support for idle mode
[pandora-wifi.git] / scripts / update-initramfs
1 #!/bin/bash
2 # Copyright 2009        Luis R. Rodriguez <mcgrof@gmail.com>
3 #
4 # Since we provide ssb, the Ethernet module b44 some people may
5 # rely on it to netboot, so update the initrafms for each
6 # distribution.
7 #
8 # Note that in the future people may want to wireless-boot
9 # so this will help with that as well.
10
11 LSB_RED_ID=$(/usr/bin/lsb_release -i -s)
12
13 KLIB=/lib/modules/2.6.31-wl/build
14 ver=$(echo $KLIB | awk -F "/lib/modules/" '{print $2}' | awk -F"/" '{print $1}')
15 dir=/boot/
16
17 case $LSB_RED_ID in
18 "Ubuntu")
19         echo "Updating Ubuntu's initramfs for $ver under $dir ..."
20         mkinitramfs -o $dir/initrd.img-$ver $ver
21         echo "Will now run update-grub to ensure grub will find the new initramfs ..."
22         update-grub
23         ;;
24 *)
25         echo "Warning:"
26         echo "You may or may not need to update your initframfs, you should if"
27         echo "any of the modules installed are part of your initramfs. To add"
28         echo "support for your distribution to do this automatically send a"
29         echo "patch against $0. If your distribution does not require this"
30         echo "send a patch against the '/usr/bin/lsb_release -i -s': $LSB_RED_ID"
31         echo "tag for your distribution to avoid this warning."
32         ;;
33 esac