Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 424800 Details for
Bug 574054
sys-apps/kexec-tools: update config files for new linux-4.3 kexec knobs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
New /etc/init.d/kexec init file
kexec.init-2.0.9-r3 (text/plain), 3.73 KB, created by
Terra
on 2016-02-07 01:24:12 UTC
(
hide
)
Description:
New /etc/init.d/kexec init file
Filename:
MIME Type:
Creator:
Terra
Created:
2016-02-07 01:24:12 UTC
Size:
3.73 KB
patch
obsolete
>#!/sbin/runscript ># Copyright 1999-2016 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Id$ > >depend() { > need localmount >} > >image_path() { > local x= kver=$(uname -r) karch=$(uname -m) > BOOTPART="${BOOTPART:-/boot}" > KNAME="${KNAME:-bzImage}" > if [ -e "${KNAME}" ]; then > echo "${KNAME}" > return 0 > fi > for x in "${KNAME#${BOOTPART}}" vmlinuz \ > bzImage-${kver} vmlinuz-${kver} \ > kernel-genkernel-${karch}-${kver} \ > kernel-${kver} kernel-${karch}; 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) > BOOTPART="${BOOTPART:-/boot}" > INITRD="${INITRD:-initrd}" > if [ -e "${INITRD}" ]; then > echo "${INITRD}" > return 0 > fi > for x in "${INITRD#${BOOTPART}}" \ > 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 > fi > done > > return 1 >} > >mount_boot(){ > local ret > > [ "${DONT_MOUNT_BOOT:-no}" = "no" ] || return 1 > grep -q " ${BOOTPART:-/boot} " /proc/mounts && return 1 > > BOOTPART="${BOOTPART:-/boot}" > ebegin "Mounting ${BOOTPART}" > mount "${BOOTPART}"; ret=$? > eend ${ret} > return ${ret} >} > >load_image() { > local ret > local kexec_load_file > > if [ "${KEXEC_LOAD_FILE:-no}" = "yes" ]; then > kexec_load_file="-s" > fi > > if [ "${KNAME}" = "-" ]; then > ebegin "Disabling kexec" > kexec -u ${kexec_load_file}; ret=$? > eend ${ret} > return ${ret} > fi > > BOOTPART="${BOOTPART:-/boot}" > local img= initrd="$(initrd_path)" mounted=false initrdopt= > > if ! img="$(image_path)"; then > if mount_boot; then > if img="$(image_path)"; then > mounted=true > initrd="$(initrd_path)" > else > eerror "No kernel image found in ${BOOTPART}!" > umount "${BOOTPART}" > return 1 > fi > else > eerror "No kernel image found in ${BOOTPART}!" > return 1 > fi > fi > > if [ -n "${INITRD}" ] && \ > ! [ "${BOOTPART}/${INITRD#${BOOTPART}/}" = "${initrd}" ]; then > eerror "Requested initrd: ${INITRD#${BOOTPART}}" > eerror "could not be found" > return 1 > fi > > [ -n "${ROOTPART}" ] || \ > ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")" #" > > [ -n "${KPARAM}" ] || KEXEC_OPT_ARGS="${KEXEC_OPT_ARGS} --reuse-cmdline" > > [ -n "${initrd}" ] && [ -e "${initrd}" ] && initrdopt="--initrd=${initrd}" > > local msg= > [ -n "${initrd}" ] && \ > msg="with ${initrd}" > einfo "Using kernel image ${img} ${msg} for kexec" > > ebegin "Setting kexec with ${kexec_load_file} ${KEXEC_OPT_ARGS} -l ${img} root=${ROOTPART} ${KPARAM} ${initrdopt}" > kexec ${kexec_load_file} ${KEXEC_OPT_ARGS} -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt} > local res=$? > > ${mounted} && umount "${BOOTPART}" > eend ${res} > return ${res} >} > >start() { > if [ "${LOAD_DURING_SHUTDOWN:-yes}" = "yes" ]; then > local ret=0 > BOOTPART="${BOOTPART:-/boot}" > if mount_boot; then > mounted=true > fi > if ! image_path > /dev/null; then > ewarn "Cannot find kernel image!" > ewarn "Please make sure a valid kernel image is present before reboot." > return 0 > fi > if [ -n "${mounted}" ]; then > ebegin "Unmounting ${BOOTPART}" > umount "${BOOTPART}"; ret=$? > eend ${ret} > fi > return ${ret} > else > ebegin "Configuring kexec" > load_image > eend $? > fi >} > >stop() { > local kexec_load_file > > if [ "${KEXEC_LOAD_FILE:-no}" = "yes" ]; then > kexec_load_file="-s" > fi > > if ! yesno $RC_REBOOT; then > einfo "Not rebooting, so disabling" > kexec -u ${kexec_load_file} > return 0 > fi > > if [ -f /nokexec ]; then > einfo "Not using kexec during reboot" > rm -f /nokexec > kexec -u ${kexec_load_file} > return 0 > fi > > [ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0 > > ebegin "Configuring kexec" > load_image > eend $? >}
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 Raw
Actions:
View
Attachments on
bug 574054
:
424796
|
424798
|
424800
|
424802
|
425086
|
428980