Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 299047 Details for
Bug 370207
sys-apps/kexec-tools - kexec init script does not detect kernel image and initrd properly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
genkernel compat and automatic initrd
kexec.init-2.patch (text/plain), 1.90 KB, created by
Dennis Schridde
on 2012-01-16 00:57:32 UTC
(
hide
)
Description:
genkernel compat and automatic initrd
Filename:
MIME Type:
Creator:
Dennis Schridde
Created:
2012-01-16 00:57:32 UTC
Size:
1.90 KB
patch
obsolete
>--- /var/cache/portage/gentoo/sys-apps/kexec-tools/files/kexec.init-ng 2011-03-27 10:31:50.000000000 +0200 >+++ /etc/init.d/kexec 2012-01-16 01:53:07.623999997 +0100 >@@ -8,9 +8,25 @@ > } > > image_path() { >- local x= kver=$(uname -r) >+ local x= kver=$(uname -r) karch=$(uname -m) > for x in "${KNAME:-bzImage}" vmlinuz \ >- bzImage-"${kver}" vmlinuz-"${kver}" ; do >+ bzImage-"${kver}" vmlinuz-"${kver}" \ >+ kernel-genkernel-"${karch}"-"${kver}" ; do >+ if [ -e "${BOOTPART}/${x}" ] ; then >+ echo "${BOOTPART}/${x}" >+ return 0 >+ fi >+ done >+ >+ return 1 >+} >+ >+initrd_path() { >+ local x= kver=$(uname -r) karch=$(uname -m) >+ for x in "${INITRD:-initrd}" \ >+ "initrd.img-${kver}" "initrd-${kver}.img" \ >+ "initrd-${kver}" "initramfs-${kver}.img" \ >+ "initramfs-genkernel-${karch}-${kver}" ; do > if [ -e "${BOOTPART}/${x}" ] ; then > echo "${BOOTPART}/${x}" > return 0 >@@ -29,15 +45,16 @@ > fi > > BOOTPART="${BOOTPART:-/boot}" >- local img="$(image_path)" mounted=false initrdopt= >+ local img="$(image_path)" initrd="$(initrd_path)" mounted=false initrdopt= > >- if [ -z "${img}" ] ; then >+ if [ -z "${img}" ] || [ -z "${initrd}" ] ; then > # If we cannot find our image, try mounting ${BOOTPART} > if ! grep -q " ${BOOTPART} " /proc/mounts ; then > ebegin "Mounting ${BOOTPART}" > mount "${BOOTPART}" && mounted=true > eend $? || return $? > img="$(image_path)" >+ initrd="$(initrd_path)" > fi > fi > >@@ -55,12 +72,9 @@ > KPARAM="$(sed -e 's/ /\n/g' /proc/cmdline | grep -v -e "^root=" | tr '\n' ' ')" > fi > >- # Use the default initrd if it exists and none other given >- if [ -z "${INITRD}" -a -e "${BOOTPART}"/initrd ] ; then >- INITRD="${BOOTPART}/initrd" >- fi >- if [ -e "${INITRD}" ] ; then >- initrdopt="--initrd=${INITRD}" >+ if [ -n "${initrd}" ] ; then >+ einfo " initrd image ${initrd}" >+ initrdopt="--initrd=${initrd}" > fi > > kexec -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 370207
:
275957
| 299047