summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-03-13 07:33:24 +0000
committerRoy Marples <uberlord@gentoo.org>2007-03-13 07:33:24 +0000
commit1c2691e66c53cf8ee7f772b9bc4ea2824f69bf34 (patch)
tree482ea00bd96d4cf54b9cb2ab1e6379f28e8eb45a /sys-apps
parentAdd xqp qt4 port than does not depend upon qt3support libraries. Closes #170402 (diff)
downloadgentoo-2-1c2691e66c53cf8ee7f772b9bc4ea2824f69bf34.tar.gz
gentoo-2-1c2691e66c53cf8ee7f772b9bc4ea2824f69bf34.tar.bz2
gentoo-2-1c2691e66c53cf8ee7f772b9bc4ea2824f69bf34.zip
New init script works with non bash shells.
(Portage version: 2.1.2.2)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/kexec-tools/ChangeLog8
-rw-r--r--sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r46
-rwxr-xr-xsys-apps/kexec-tools/files/kexec.init41
-rw-r--r--sys-apps/kexec-tools/kexec-tools-1.101-r4.ebuild40
4 files changed, 76 insertions, 19 deletions
diff --git a/sys-apps/kexec-tools/ChangeLog b/sys-apps/kexec-tools/ChangeLog
index e5393cd5df6c..3431c611ae73 100644
--- a/sys-apps/kexec-tools/ChangeLog
+++ b/sys-apps/kexec-tools/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/kexec-tools
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/ChangeLog,v 1.14 2007/03/06 18:13:11 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/ChangeLog,v 1.15 2007/03/13 07:33:24 uberlord Exp $
+
+*kexec-tools-1.101-r4 (13 Mar 2007)
+
+ 13 Mar 2007; Roy Marples <uberlord@gentoo.org> files/kexec.init,
+ +kexec-tools-1.101-r4.ebuild:
+ New init script works with non bash shells.
*kexec-tools-9999 (06 Mar 2007)
diff --git a/sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r4 b/sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r4
new file mode 100644
index 000000000000..80408fd5a799
--- /dev/null
+++ b/sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r4
@@ -0,0 +1,6 @@
+MD5 eb7cd98db3c94914ca51f8b42dcd8e4b kexec-tools-1.101-kdump10.patch 246975
+RMD160 67a94b54c848a2c85bfd0801766f02d76c44bba7 kexec-tools-1.101-kdump10.patch 246975
+SHA256 6ca5dd055d1714bb6c2e7aad44c84171673573d95ca832f06f37eaa39d926863 kexec-tools-1.101-kdump10.patch 246975
+MD5 b4f7ffcc294d41a6a4c40d6e44b7734d kexec-tools-1.101.tar.gz 206785
+RMD160 2c6cb949f1f9ac2871a5616d890edbe0bc43768a kexec-tools-1.101.tar.gz 206785
+SHA256 280b34fefa12c3d7a3e432c3730fe5d0d56e8d169c28b695cce9ba6d8dbe6e38 kexec-tools-1.101.tar.gz 206785
diff --git a/sys-apps/kexec-tools/files/kexec.init b/sys-apps/kexec-tools/files/kexec.init
index 3ddacd1d1546..785831bf0693 100755
--- a/sys-apps/kexec-tools/files/kexec.init
+++ b/sys-apps/kexec-tools/files/kexec.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init,v 1.8 2006/08/13 11:22:06 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init,v 1.9 2007/03/13 07:33:24 uberlord Exp $
depend() {
need localmount
@@ -11,7 +11,7 @@ image_path() {
local x= kver=$(uname -r)
for x in "${KNAME:-bzImage}" vmlinuz \
bzImage-"${kver}" vmlinuz-"${kver}" ; do
- if [[ -e ${BOOTPART}/${x} ]] ; then
+ if [ -e "${BOOTPART}/${x}" ] ; then
echo "${BOOTPART}/${x}"
return 0
fi
@@ -21,7 +21,7 @@ image_path() {
}
load_image() {
- if [[ ${KNAME} == "-" ]] ; then
+ if [ "${KNAME}" = "-" ] ; then
ebegin "Disabling kexec"
kexec -u
eend $?
@@ -29,34 +29,39 @@ load_image() {
fi
BOOTPART="${BOOTPART:-/boot}"
- local img=$(image_path) mounted=false initrdopt=
+ local img="$(image_path)" mounted=false initrdopt=
- if [[ -z ${img} ]] ; then
+ if [ -z "${img}" ] ; then
# If we cannot find our image, try mounting ${BOOTPART}
- if [[ ! $'\n'$(</proc/mounts) =~ $'\n'"[^ ]* ${BOOTPART} " ]] ; then
+ if ! grep -q " ${BOOTPART} " /proc/mounts ; then
ebegin "Mounting ${BOOTPART}"
mount "${BOOTPART}" && mounted=true
eend $? || return $?
- img=$(image_path)
+ img="$(image_path)"
fi
fi
- if [[ -z ${img} ]] ; then
+ if [ -z "${img}" ] ; then
eerror "No kernel image found in ${BOOTPART}!"
${mounted} && umount "${BOOTPART}"
return 1
fi
ebegin "Loading kernel image ${img} for kexec"
- [[ -z ${ROOTPART} ]] \
- && ROOTPART=$(sed -n '/^[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /etc/mtab)
- [[ -z ${KPARAM} ]] \
- && KPARAM=$(sed -r 's:root=[a-zA-Z0-9/]+\s*::g' /proc/cmdline)
+ if [ -z "${ROOTPART}" ] ; then
+ ROOTPART="$(sed -n '/^[^ ]* \/ / s,^\([^ ]*\).*,\1,p' /etc/mtab)"
+ fi
+ if [ -z "${KPARAM}" ] ; then
+ KPARAM="$(sed -r 's:root=[a-zA-Z0-9/]+\s*::g' /proc/cmdline)"
+ fi
# Use the default initrd if it exists and none other given
- [[ -z ${INITRD} && -e ${BOOTPART}/initrd ]] \
- && INITRD="${BOOTPART}/initrd"
- [[ -e ${INITRD} ]] && initrdopt="--initrd=${INITRD}"
+ if [ -z "${INITRD}" -a -e "${BOOTPART}"/initrd ] ; then
+ INITRD="${BOOTPART}/initrd"
+ fi
+ if [ -e "${INITRD}" ] ; then
+ initrdopt="--initrd=${INITRD}"
+ fi
kexec -l "${img}" --append="root=${ROOTPART} ${KPARAM}" ${initrdopt}
local res=$?
@@ -67,7 +72,7 @@ load_image() {
}
start() {
- [[ ${LOAD_DURING_SHUTDOWN:-yes} == "yes" ]] && return 0
+ [ "${LOAD_DURING_SHUTDOWN:-yes}" = "yes" ] && return 0
ebegin "Configuring kexec"
load_image
@@ -75,10 +80,10 @@ start() {
}
stop() {
- [[ ${LOAD_DURING_SHUTDOWN:-yes} != "yes" ]] && return 0
+ [ "${LOAD_DURING_SHUTDOWN:-yes}" != "yes" ] && return 0
ebegin "Configuring kexec"
- if [[ ${SOFTLEVEL} != "reboot" ]] || ! is_runlevel_stop ; then
+ if [ "${RC_SOFTLEVEL:-${SOFTLEVEL}}" != "reboot" ] || ! is_runlevel_stop ; then
einfo "Not rebooting, so disabling"
kexec -u
return 0
diff --git a/sys-apps/kexec-tools/kexec-tools-1.101-r4.ebuild b/sys-apps/kexec-tools/kexec-tools-1.101-r4.ebuild
new file mode 100644
index 000000000000..f7d676fa89c1
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-1.101-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/kexec-tools-1.101-r4.ebuild,v 1.1 2007/03/13 07:33:24 uberlord Exp $
+
+inherit eutils
+
+DESCRIPTION="Load another kernel from the currently executing Linux kernel"
+HOMEPAGE="http://www.xmission.com/~ebiederm/files/kexec/"
+SRC_URI="http://www.xmission.com/~ebiederm/files/kexec/${P}.tar.gz
+ http://lse.sourceforge.net/kdump/patches/1.101-kdump10/kexec-tools-1.101-kdump10.patch"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="zlib"
+DEPEND="zlib? ( sys-libs/zlib )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${DISTDIR}"/kexec-tools-1.101-kdump10.patch
+ epatch "${FILESDIR}"/${P}-LDFLAGS.patch
+ epatch "${FILESDIR}"/${P}-ppc64.patch
+ epatch "${FILESDIR}"/kexec-linux-headers.patch
+}
+
+src_compile() {
+ econf $(use_with zlib) || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ doman kexec/kexec.8
+ dodoc News AUTHORS TODO
+
+ newinitd "${FILESDIR}"/kexec.init kexec
+ newconfd "${FILESDIR}"/kexec.conf kexec
+}