Add new configuration variable, which allows you to load the kernel image during...
authorDaniel Drake <dsd@gentoo.org>
Tue, 13 Jun 2006 20:48:55 +0000 (20:48 +0000)
committerDaniel Drake <dsd@gentoo.org>
Tue, 13 Jun 2006 20:48:55 +0000 (20:48 +0000)
Package-Manager: portage-2.1

sys-apps/kexec-tools/ChangeLog
sys-apps/kexec-tools/files/digest-kexec-tools-1.101
sys-apps/kexec-tools/files/digest-kexec-tools-1.101-r3 [new file with mode: 0644]
sys-apps/kexec-tools/files/kexec.conf
sys-apps/kexec-tools/files/kexec.init
sys-apps/kexec-tools/kexec-tools-1.101-r3.ebuild [new file with mode: 0644]

index 8e1449b5272f0cfe1c55734b19d9be59a6b9fec2..5697cb611540675811a504367c3887517b8ce94f 100644 (file)
@@ -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)
 
index 71334efb5b7050a114f723370e0f5411ef103563..149cf7fed2ca6dc4c27007033b4893f31968b9e5 100644 (file)
@@ -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 (file)
index 0000000..58ea055
--- /dev/null
@@ -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
index 005a82d98981d8bdafb7197bd9ceac2cb5bd1cdc..b496dc8668415b2d8d13a010234d5c3c3d4ccf71 100644 (file)
@@ -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"
+
index a7d0ba707879fe49c86dfcfede50181a0525db97..fa0d8619725079f82a18427aeee44ed90a88fb64 100755 (executable)
@@ -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 (file)
index 0000000..25c6191
--- /dev/null
@@ -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
+}