Comment 8 for bug 420900

Revision history for this message
pegasus (wit000) wrote :

Ok, I made it work by changing the line :

   initrdname=$(echo "$kernfile" | sed "s/vmlinu[zx]/initrd\*/")

to

   initrdname="$(echo "$kernfile" | sed "s/vmlinu[zx]/init\*/").img"

With this change, the script is now looking for the file name init*[kernel version].img, instead of initrd[kernel version].

It works for now, but still not perfect for generic use. I have to use " .img " instead of " .* " because some kernel version numbers have an extra ".PAE" in them. Using " .* " has caused multiple matches.

I am looking for a way to have the script matching either ".img" or ".gz" without adding any "if", so the script can be for generic use, not specific to fedora.