summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2006-06-13 20:48:55 +0000
committerDaniel Drake <dsd@gentoo.org>2006-06-13 20:48:55 +0000
commit89bd40f02d05f7138d9c81a252ac91204c18995e (patch)
tree8a645524232541667ca4623b4fccd84603404f84 /sys-apps/kexec-tools
parentClean up output when dealing with files installed by other apps; bug #135520c4 (diff)
downloadgentoo-2-89bd40f02d05f7138d9c81a252ac91204c18995e.tar.gz
gentoo-2-89bd40f02d05f7138d9c81a252ac91204c18995e.tar.bz2
gentoo-2-89bd40f02d05f7138d9c81a252ac91204c18995e.zip
Add new configuration variable, which allows you to load the kernel image during shutdown rather than startup. This saves some memory during system operation, but poses an inconvenience if you like to use 'kexec --unload' during operation to disable kexec for the next reboot.
(Portage version: 2.1)
Diffstat (limited to 'sys-apps/kexec-tools')
-rw-r--r--sys-apps/kexec-tools/ChangeLog13
-rw-r--r--sys-apps/kexec-tools/files/digest-kexec-tools-1.1012
-rw-r--r--sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r36
-rw-r--r--sys-apps/kexec-tools/files/kexec.conf5
-rwxr-xr-xsys-apps/kexec-tools/files/kexec.init23
-rw-r--r--sys-apps/kexec-tools/kexec-tools-1.101-r3.ebuild39
6 files changed, 85 insertions, 3 deletions
diff --git a/sys-apps/kexec-tools/ChangeLog b/sys-apps/kexec-tools/ChangeLog
index 8e1449b5272f..5697cb611540 100644
--- a/sys-apps/kexec-tools/ChangeLog
+++ b/sys-apps/kexec-tools/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for sys-apps/kexec-tools
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/ChangeLog,v 1.8 2006/03/04 20:16:02 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/ChangeLog,v 1.9 2006/06/13 20:48:55 dsd Exp $
+
+*kexec-tools-1.101-r3 (13 Jun 2006)
+
+ 13 Jun 2006; Daniel Drake <dsd@gentoo.org> files/kexec.conf,
+ files/kexec.init, -kexec-tools-1.100-r1.ebuild,
+ -kexec-tools-1.101-r1.ebuild, -kexec-tools-1.101-r2.ebuild,
+ +kexec-tools-1.101-r3.ebuild:
+ Add new configuration variable, which allows you to load the kernel image
+ during shutdown rather than startup. This saves some memory during system
+ operation, but poses an inconvenience if you like to use 'kexec --unload'
+ during operation to disable kexec for the next reboot.
*kexec-tools-1.101-r2 (04 Mar 2006)
diff --git a/sys-apps/kexec-tools/files/digest-kexec-tools-1.101 b/sys-apps/kexec-tools/files/digest-kexec-tools-1.101
index 71334efb5b70..149cf7fed2ca 100644
--- a/sys-apps/kexec-tools/files/digest-kexec-tools-1.101
+++ b/sys-apps/kexec-tools/files/digest-kexec-tools-1.101
@@ -1 +1,3 @@
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/digest-kexec-tools-1.101-r3 b/sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r3
new file mode 100644
index 000000000000..58ea05500edf
--- /dev/null
+++ b/sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r3
@@ -0,0 +1,6 @@
+MD5 00f62d42ec4ee7e738a3ed6d1e80687e kexec-tools-1.101-kdump7.patch 187536
+RMD160 0f333311d606f7613497242fdcd0ffc65a582ff5 kexec-tools-1.101-kdump7.patch 187536
+SHA256 da1101b92101f349d011e8c832d426f91521a5747f0de375a5dc33201dcb2f15 kexec-tools-1.101-kdump7.patch 187536
+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.conf b/sys-apps/kexec-tools/files/kexec.conf
index 005a82d98981..b496dc866841 100644
--- a/sys-apps/kexec-tools/files/kexec.conf
+++ b/sys-apps/kexec-tools/files/kexec.conf
@@ -13,3 +13,8 @@
# Initrd
#INITRD="/boot/fbsplash-emergence-1024x768"
+
+# Load kexec kernel image into memory during shutdown instead of bootup
+# (default: no)
+#LOAD_DURING_SHUTDOWN="no"
+
diff --git a/sys-apps/kexec-tools/files/kexec.init b/sys-apps/kexec-tools/files/kexec.init
index a7d0ba707879..fa0d86197250 100755
--- a/sys-apps/kexec-tools/files/kexec.init
+++ b/sys-apps/kexec-tools/files/kexec.init
@@ -1,13 +1,13 @@
#!/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.6 2006/03/04 20:16:03 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kexec-tools/files/kexec.init,v 1.7 2006/06/13 20:48:55 dsd Exp $
depend() {
need checkfs
}
-start() {
+load_image() {
[ -z "$KNAME" ] && KNAME="bzImage"
[ -z "$BOOTPART" ] && BOOTPART="/boot"
[ -z "$BOOTMOUNT" ] && BOOTMOUNT=1
@@ -54,3 +54,22 @@ start() {
eend $RES
}
+
+start() {
+ if [ "$LOAD_DURING_SHUTDOWN" == 'no' -o "$LOAD_DURING_SHUTDOWN" == '' ];
+ then
+ load_image
+ else
+ return 0
+ fi
+}
+
+stop() {
+ if ! [ "$LOAD_DURING_SHUTDOWN" == 'no' -o "$LOAD_DURING_SHUTDOWN" == '' ];
+ then
+ load_image
+ else
+ return 0
+ fi
+}
+
diff --git a/sys-apps/kexec-tools/kexec-tools-1.101-r3.ebuild b/sys-apps/kexec-tools/kexec-tools-1.101-r3.ebuild
new file mode 100644
index 000000000000..25c6191fadde
--- /dev/null
+++ b/sys-apps/kexec-tools/kexec-tools-1.101-r3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2006 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-r3.ebuild,v 1.1 2006/06/13 20:48:55 dsd 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-kdump7/kexec-tools-1.101-kdump7.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-kdump7.patch
+ epatch "${FILESDIR}"/${P}-LDFLAGS.patch
+ epatch "${FILESDIR}"/${P}-ppc64.patch
+}
+
+src_compile() {
+ econf $(use_with zlib) || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+
+ doman kexec/kexec.8
+ dodoc News AUTHORS TODO
+
+ newinitd "${FILESDIR}"/kexec.init kexec
+ newconfd "${FILESDIR}"/kexec.conf kexec
+}