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 $?
-}

Reply via email to