* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
@ 2017-01-08 3:00 Thomas Deutschmann
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Deutschmann @ 2017-01-08 3:00 UTC (permalink / raw
To: gentoo-commits
commit: 43983893090e88e6829a52e37a232456613683fd
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 8 02:59:18 2017 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jan 8 02:59:18 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43983893
sys-apps/kexec-tools: Fix syntax error in runscript
sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1 b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1
index 1f18f67..1d2494b 100644
--- a/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1
+++ b/sys-apps/kexec-tools/files/kexec.init-2.0.13-r1
@@ -70,7 +70,7 @@ initrd_path() {
"initrd-${kver}.img" \
"initrd-${kver}" \
"initramfs-${kver}.img" \
- "initramfs-genkernel-${karch}-${kver}"; do
+ "initramfs-genkernel-${karch}-${kver}" \
"initramfs-genkernel-${gkarch}-${kver}"; do
if [ -e "${BOOTPART}/${x}" ]; then
echo "${BOOTPART}/${x}"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
@ 2017-10-20 7:45 Patrice Clement
0 siblings, 0 replies; 5+ messages in thread
From: Patrice Clement @ 2017-10-20 7:45 UTC (permalink / raw
To: gentoo-commits
commit: 06bfeebcd9e444ee5383fbb69cf48af8c90031f0
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Tue Oct 10 13:40:19 2017 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 07:45:13 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06bfeebc
sys-apps/kexec-tools: remove unused files.
sys-apps/kexec-tools/files/kexec.init-2.0.12 | 174 -------------------------
sys-apps/kexec-tools/files/kexec.init-2.0.4-r3 | 164 -----------------------
2 files changed, 338 deletions(-)
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.12 b/sys-apps/kexec-tools/files/kexec.init-2.0.12
deleted file mode 100644
index a7bd859f082..00000000000
--- a/sys-apps/kexec-tools/files/kexec.init-2.0.12
+++ /dev/null
@@ -1,174 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# Set up some defaults.
-: "${LOAD_DURING_SHUTDOWN:=yes}"
-: "${BOOTPART:=/boot}"
-: "${DONT_MOUNT_BOOT:=no}"
-
-depend() {
- need localmount
-}
-
-auto_prefix_bootpath() {
- # Only auto-add prefix to relative paths.
- case $1 in
- */*) echo "$1";;
- *) echo "${BOOTPART}/$1" ;;
- esac
-}
-
-image_path() {
- # Do no sanity checking if the user has set a value.
- if [ -n "${KNAME}" ]; then
- auto_prefix_bootpath "${KNAME}"
- return
- fi
-
- local x kver="$(uname -r)" karch="$(uname -m)"
- for x in \
- "bzImage" \
- "vmlinuz" \
- "bzImage-${kver}" \
- "vmlinuz-${kver}" \
- "kernel-genkernel-${karch}-${kver}" \
- "kernel-${kver}" \
- "kernel-${karch}"; do
- if [ -e "${BOOTPART}/${x}" ]; then
- echo "${BOOTPART}/${x}"
- return
- fi
- done
-
- return 1
-}
-
-initrd_path() {
- # Do no sanity checking if the user has set a value.
- if [ -n "${INITRD}" ]; then
- auto_prefix_bootpath "${INITRD}"
- return 0
- fi
-
- local x kver="$(uname -r)" karch="$(uname -m)"
- for x in \
- "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
- fi
- done
-
- return 1
-}
-
-mount_boot() {
- [ "${DONT_MOUNT_BOOT}" != "no" ] && return 1
- mountinfo -q "${BOOTPART}" && return 1
-
- ebegin "Mounting ${BOOTPART}"
- mount "${BOOTPART}"
- eend $?
-}
-
-load_image() {
- if [ "${KNAME}" = "-" ]; then
- ebegin "Disabling kexec"
- kexec -u
- eend $?
- return # eend preserved $? for us.
- fi
-
- local img initrd="$(initrd_path)" mounted=false kparamopt 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 [ -z "${ROOTPART}" ]; then
- ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
- fi
-
- if [ -z "${KPARAM}" ]; then
- kparamopt="--reuse-cmdline"
- fi
-
- if [ -n "${initrd}" ]; then
- initrdopt="--initrd=${initrd}"
- fi
-
- local msg
- [ -n "${initrd}" ] && \
- msg=" (with ${initrd})"
- ebegin "Using kernel image ${img}${msg} for kexec"
-
- kexec ${KEXEC_OPT_ARGS} ${kparamopt} \
- -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
- local ret=$?
-
- ${mounted} && umount "${BOOTPART}"
- eend ${ret}
- return ${ret}
-}
-
-start() {
- if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
- local mounted
- 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}"
- eend $?
- fi
- # $? is already set to the previous calls.
- return
- else
- load_image
- fi
-}
-
-stop() {
- if ! yesno ${RC_REBOOT}; then
- ebegin "Not rebooting; disabling kexec"
- kexec -u
- eend $?
- return
- fi
-
- if [ -f /nokexec ]; then
- ebegin "Rebooting; disabling kexec due to /nokexec"
- rm -f /nokexec
- kexec -u
- eend $?
- return
- fi
-
- if [ "${LOAD_DURING_SHUTDOWN}" = "yes" ]; then
- load_image
- fi
-}
diff --git a/sys-apps/kexec-tools/files/kexec.init-2.0.4-r3 b/sys-apps/kexec-tools/files/kexec.init-2.0.4-r3
deleted file mode 100644
index 6eb2a748c9e..00000000000
--- a/sys-apps/kexec-tools/files/kexec.init-2.0.4-r3
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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
- if [ "${KNAME}" = "-" ]; then
- ebegin "Disabling kexec"
- kexec -u; 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_OPT_ARGS} -l ${img} root=${ROOTPART} ${KPARAM} ${initrdopt}"
- kexec ${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() {
- if ! yesno $RC_REBOOT; then
- einfo "Not rebooting, so disabling"
- kexec -u
- return 0
- fi
-
- if [ -f /nokexec ]; then
- einfo "Not using kexec during reboot"
- rm -f /nokexec
- kexec -u
- return 0
- fi
-
- [ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0
-
- ebegin "Configuring kexec"
- load_image
- eend $?
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
@ 2020-08-04 23:02 Thomas Deutschmann
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Deutschmann @ 2020-08-04 23:02 UTC (permalink / raw
To: gentoo-commits
commit: 4860fce5434f46d90e913ff10515a9a256fc6c6a
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 4 22:25:12 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Aug 4 23:02:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4860fce5
sys-apps/kexec-tools: runscript: do not append root= if --reuse-cmdline is used
Always appending root= can cause problems when auto-detection is used
when real system and initramfs don't agree on naming (i.e. when
current system detects root as /dev/dm-4 but on next boot, initramfs
will detect root as /dev/dm-5).
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
sys-apps/kexec-tools/files/kexec-r2.init | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/sys-apps/kexec-tools/files/kexec-r2.init b/sys-apps/kexec-tools/files/kexec-r2.init
index 2a3b63ad526..0578f51aea1 100644
--- a/sys-apps/kexec-tools/files/kexec-r2.init
+++ b/sys-apps/kexec-tools/files/kexec-r2.init
@@ -119,12 +119,22 @@ load_image() {
fi
fi
+ local is_rootpart_autodetected=no
if [ -z "${ROOTPART}" ]; then
ROOTPART="$(readlink -f "$(sed -n '/^\/[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /proc/mounts)")"
+ is_rootpart_autodetected=yes
fi
+ local is_reusing_cmdline=no
if [ -z "${KPARAM}" ]; then
kparamopt="--reuse-cmdline"
+ is_reusing_cmdline=yes
+ fi
+
+ if ! yesno "${is_rootpart_autodetected}" || ! yesno "${is_reusing_cmdline}"; then
+ # Only append root when explicit set in config or
+ # if we aren't re-using kernel cmdline
+ KPARAM="${KPARAM:+"${KPARAM} "}root=${ROOTPART}"
fi
if [ -n "${initrd}" ]; then
@@ -137,7 +147,7 @@ load_image() {
ebegin "Using kernel image ${img}${msg} for kexec"
kexec ${KEXEC_OPT_ARGS} ${kparamopt} \
- -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
+ -l "${img}" ${KPARAM:+--append="${KPARAM}"} ${initrdopt}
local ret=$?
${mounted} && umount "${BOOTPART}"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
@ 2020-08-04 23:02 Thomas Deutschmann
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Deutschmann @ 2020-08-04 23:02 UTC (permalink / raw
To: gentoo-commits
commit: 1f1b89399e462f1798a5fa990c73fbaec5a4050e
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 4 22:03:31 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Aug 4 23:02:39 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f1b8939
sys-apps/kexec-tools: runscript: add support for genkernel's default kernel/initramfs symlink
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
sys-apps/kexec-tools/files/kexec-r2.init | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys-apps/kexec-tools/files/kexec-r2.init b/sys-apps/kexec-tools/files/kexec-r2.init
index ea6b790d324..2a3b63ad526 100644
--- a/sys-apps/kexec-tools/files/kexec-r2.init
+++ b/sys-apps/kexec-tools/files/kexec-r2.init
@@ -40,6 +40,7 @@ image_path() {
"bzImage" \
"vmlinux" \
"vmlinuz" \
+ "kernel" \
"bzImage-${kver}" \
"vmlinux-${kver}" \
"vmlinuz-${kver}" \
@@ -67,6 +68,7 @@ initrd_path() {
local gkarch="$(get_genkernel_arch $karch)"
for x in \
"initrd" \
+ "initramfs" \
"initrd.img-${kver}" \
"initrd-${kver}.img" \
"initrd-${kver}" \
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/
@ 2024-08-06 7:58 Andrew Ammerlaan
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Ammerlaan @ 2024-08-06 7:58 UTC (permalink / raw
To: gentoo-commits
commit: 4c27efd95d9164b3e6ff433c06cd767885d27b13
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 6 07:58:28 2024 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Aug 6 07:58:28 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c27efd9
sys-apps/kexec-tools: drop +x on files/kexec-auto-load
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
sys-apps/kexec-tools/files/kexec-auto-load | 0
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/sys-apps/kexec-tools/files/kexec-auto-load b/sys-apps/kexec-tools/files/kexec-auto-load
old mode 100755
new mode 100644
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-06 7:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-06 7:58 [gentoo-commits] repo/gentoo:master commit in: sys-apps/kexec-tools/files/ Andrew Ammerlaan
-- strict thread matches above, loose matches on Subject: below --
2020-08-04 23:02 Thomas Deutschmann
2020-08-04 23:02 Thomas Deutschmann
2017-10-20 7:45 Patrice Clement
2017-01-08 3:00 Thomas Deutschmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox