New init script works with non bash shells.
authorRoy Marples <uberlord@gentoo.org>
Tue, 13 Mar 2007 07:33:24 +0000 (07:33 +0000)
committerRoy Marples <uberlord@gentoo.org>
Tue, 13 Mar 2007 07:33:24 +0000 (07:33 +0000)
Package-Manager: portage-2.1.2.2

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

index 3def202a944f479397b4bfe4db171c0608cf1711..a872d0cf9538eb3eae00d223c63ffc21457ba408 100644 (file)
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX hdparm-conf.d.3 430 RMD160 2c075ab3bf51286999860e2fa08989327bbaa1e3 SHA1 994e932091e7a09136050b2b1a96c31850eee46d SHA256 e3d8ce9928385e25abd388cf2d169198e03129f41d3eca1f23c96fdbe54f3462
 MD5 7905eb90e421523aa0c7f32f3d16b1fe files/hdparm-conf.d.3 430
 RMD160 2c075ab3bf51286999860e2fa08989327bbaa1e3 files/hdparm-conf.d.3 430
@@ -9,6 +6,10 @@ AUX hdparm-init-7 3149 RMD160 b864061c66738ed4e2ca63fc2e711f91621ffeed SHA1 4939
 MD5 0c1b37777883cfc08d53b8b51cb5fbd6 files/hdparm-init-7 3149
 RMD160 b864061c66738ed4e2ca63fc2e711f91621ffeed files/hdparm-init-7 3149
 SHA256 2bf92c7bb384e9d0a4b1ffed02bbd6833a0dc31e12d49747db8f776219876288 files/hdparm-init-7 3149
+AUX hdparm-init-8 3413 RMD160 733efd260ed0a7809edf0dfb8cc9bf757db4979b SHA1 c9ba21e7247fbf980e29ba0c86f4367173e29641 SHA256 7b19fc09acb13df68a8aee556db9cb654c677cfb15edfa42d6de32d2ef602eec
+MD5 59e89ec84bd3b866bf0a2fb853477650 files/hdparm-init-8 3413
+RMD160 733efd260ed0a7809edf0dfb8cc9bf757db4979b files/hdparm-init-8 3413
+SHA256 7b19fc09acb13df68a8aee556db9cb654c677cfb15edfa42d6de32d2ef602eec files/hdparm-init-8 3413
 DIST hdparm-6.3.tar.gz 44052 RMD160 dff66236938b7d3f60fe43505b4c0d8f4dce2386 SHA1 013ebdf957bbbd53889e910012f552343eeff4b6 SHA256 08688a6a46ba495494bf838f8f26103e797584c1888eca94e43a171e1b37246d
 DIST hdparm-6.6.tar.gz 45538 RMD160 714fbc5216bdb427c7e817649f3c4f5462620c13 SHA1 8d288e0c22d7ff5968f5fa507bbf56703b2f6ed9 SHA256 7e2db39a4e1f41bb327a9a8ef9e5e8359aaed0cc78e642a4ca67659629e3048b
 DIST hdparm-6.9.tar.gz 46801 RMD160 d862e656456f14fb8139c15cd68ba9252082532e SHA1 10e8dcdde0fe4ed482bbb1e4b19cb3ea07b2f58a SHA256 cae6ed86296d01be98ee3be0c224c4323eee508941a7f162a0366d56655afe06
@@ -20,14 +21,18 @@ EBUILD hdparm-6.6.ebuild 980 RMD160 056ca90d04d353ab89de218fb3bf07478aa2720d SHA
 MD5 d5c4772c4acde67a6c65d84e49c63e7b hdparm-6.6.ebuild 980
 RMD160 056ca90d04d353ab89de218fb3bf07478aa2720d hdparm-6.6.ebuild 980
 SHA256 c5e6a38a5684d9fdeda7bb12edb88fb3e2fb4d2c2e442f6830f6cd9e94be9245 hdparm-6.6.ebuild 980
+EBUILD hdparm-6.9-r1.ebuild 997 RMD160 12f7e09dfa8dae7f2a20f7b0c5e259e6bbc6e53f SHA1 77fdc99e891404fe217fc52c1a4ceb8ce3ef2415 SHA256 4a0ce4023d3069c7233dcff66bfbf463f0c91330e787d5d5875e68d3c093c53f
+MD5 9c655a72bb1512c692a49d8cae5cd673 hdparm-6.9-r1.ebuild 997
+RMD160 12f7e09dfa8dae7f2a20f7b0c5e259e6bbc6e53f hdparm-6.9-r1.ebuild 997
+SHA256 4a0ce4023d3069c7233dcff66bfbf463f0c91330e787d5d5875e68d3c093c53f hdparm-6.9-r1.ebuild 997
 EBUILD hdparm-6.9.ebuild 981 RMD160 749a0adea5dd5bc8ec4e7455b2c3a95c6f1fe94b SHA1 db83117fdd82af2305693f79f86d0f786d89ce95 SHA256 3af30f6af96319b87d0beae0fb10a0ab708cb0eec3df528a8b326469940b4220
 MD5 1a7d174626a0b898f9942e6dc6c6411d hdparm-6.9.ebuild 981
 RMD160 749a0adea5dd5bc8ec4e7455b2c3a95c6f1fe94b hdparm-6.9.ebuild 981
 SHA256 3af30f6af96319b87d0beae0fb10a0ab708cb0eec3df528a8b326469940b4220 hdparm-6.9.ebuild 981
-MISC ChangeLog 12092 RMD160 f06ba04e032f05605c46f0bcb7d96d88f9e97ef5 SHA1 6c42e2a8c55fa6e0d40d37280d6f8d2e110ba56f SHA256 4f1065ff665b1ebf3a9c674d5a23724e88b62e29bb1212e06ea82c0afe7f4f87
-MD5 9e17857775c0ecac3c2f2a11b7c99f31 ChangeLog 12092
-RMD160 f06ba04e032f05605c46f0bcb7d96d88f9e97ef5 ChangeLog 12092
-SHA256 4f1065ff665b1ebf3a9c674d5a23724e88b62e29bb1212e06ea82c0afe7f4f87 ChangeLog 12092
+MISC ChangeLog 12260 RMD160 cb87495a64b81e91f9d6fdac8efea0f5c60e79c2 SHA1 89a912921ccc87e1cf002537f6af6b1bae34dd2e SHA256 79130d9c3b280c1a68dccca7e4e2f8d75b93dfbbd105e9cd3a253ef7bf984415
+MD5 5a39ce2ef1787baa1bcbe38e0eb25693 ChangeLog 12260
+RMD160 cb87495a64b81e91f9d6fdac8efea0f5c60e79c2 ChangeLog 12260
+SHA256 79130d9c3b280c1a68dccca7e4e2f8d75b93dfbbd105e9cd3a253ef7bf984415 ChangeLog 12260
 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164
@@ -41,10 +46,6 @@ SHA256 ffaad577c213d99ad547fddf0d22ad6e096114ff29fbca4d39216acc73ac0e46 files/di
 MD5 7ac1e2fe2d42973d1a3a5e8a69140dd9 files/digest-hdparm-6.9 229
 RMD160 f60e3443962c6b7a0148ee6cf560591a3fa41349 files/digest-hdparm-6.9 229
 SHA256 bd0d1bf3333855e47bea3a6edda1e54725e5557a22099a92992966431570a097 files/digest-hdparm-6.9 229
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.3 (GNU/Linux)
-
-iD8DBQFF9ZrJugEuf3OQ0akRAlMOAJ0fRVX9/jaPYz7hWRVQeG7QOt2l5wCfc64f
-MejfEgDEITTWvozMtObJpYg=
-=+UlU
------END PGP SIGNATURE-----
+MD5 7ac1e2fe2d42973d1a3a5e8a69140dd9 files/digest-hdparm-6.9-r1 229
+RMD160 f60e3443962c6b7a0148ee6cf560591a3fa41349 files/digest-hdparm-6.9-r1 229
+SHA256 bd0d1bf3333855e47bea3a6edda1e54725e5557a22099a92992966431570a097 files/digest-hdparm-6.9-r1 229
index e5393cd5df6c4d7a1085bed95f560acbbebe3a91..3431c611ae73542cfbce40202bc6e63eebc1463d 100644 (file)
@@ -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)
 
index ac7cfbdd6f13ba277452fb5297a2b4c2139832b8..511cd43bf264c351c8464088532730ec91f2e4b6 100644 (file)
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 AUX kexec-linux-headers.patch 410 RMD160 52dad63608d804132e81886e4822e6efbc8cf1ae SHA1 2ccbc57980819f02c18bcedc5526ce7fdea0c50b SHA256 f89714cdeaf16d14eb275a111b0ee0163ba1a5c76ec492be170750682851567b
 MD5 119e70f8306ffaf08a382ef7b60a8c1c files/kexec-linux-headers.patch 410
 RMD160 52dad63608d804132e81886e4822e6efbc8cf1ae files/kexec-linux-headers.patch 410
@@ -21,24 +18,28 @@ AUX kexec.conf 397 RMD160 a366158ef7a24764c7e42bd0a246e035587d0c42 SHA1 46760b27
 MD5 d2c4d35d9a5644a4579916365143c51e files/kexec.conf 397
 RMD160 a366158ef7a24764c7e42bd0a246e035587d0c42 files/kexec.conf 397
 SHA256 59bd15f8a0be3a41a457e61cfbb3520252773ed6422b9b223b347dfeb54f152a files/kexec.conf 397
-AUX kexec.init 2051 RMD160 3462b49ef2e41e39ca04a0a9c0b9e5a5100322b6 SHA1 4d7464b96511fb4c83d288a7117dbdaf64ff539b SHA256 581f690cf836ae1d0453084d4bf9a37a7ec887f281507b043473a8bddffeb508
-MD5 c32b672c56c14e805592ea312d6c7c8a files/kexec.init 2051
-RMD160 3462b49ef2e41e39ca04a0a9c0b9e5a5100322b6 files/kexec.init 2051
-SHA256 581f690cf836ae1d0453084d4bf9a37a7ec887f281507b043473a8bddffeb508 files/kexec.init 2051
+AUX kexec.init 2104 RMD160 8218854d47d10d5d4838df597f10e5f79d8fc237 SHA1 77762addcc1b4101d10748770453ca73a64233e3 SHA256 2eaaee707a831732e25c29ac36aace05ba3caaf865be2baa4d730a6610df33e3
+MD5 3f6f94f15333db9f920ebf53ae29192a files/kexec.init 2104
+RMD160 8218854d47d10d5d4838df597f10e5f79d8fc237 files/kexec.init 2104
+SHA256 2eaaee707a831732e25c29ac36aace05ba3caaf865be2baa4d730a6610df33e3 files/kexec.init 2104
 DIST kexec-tools-1.101-kdump10.patch 246975 RMD160 67a94b54c848a2c85bfd0801766f02d76c44bba7 SHA1 f995ba47838dd99d23f3368560257ea5800136f0 SHA256 6ca5dd055d1714bb6c2e7aad44c84171673573d95ca832f06f37eaa39d926863
 DIST kexec-tools-1.101.tar.gz 206785 RMD160 2c6cb949f1f9ac2871a5616d890edbe0bc43768a SHA1 65234ec68ca19c5d444375b923fecbb9ce28b255 SHA256 280b34fefa12c3d7a3e432c3730fe5d0d56e8d169c28b695cce9ba6d8dbe6e38
 EBUILD kexec-tools-1.101-r3.ebuild 1156 RMD160 d5d85739a99b214b6b2ba31117870fcc97edda35 SHA1 63bb36f19edaf5168e75573034e81263e3a4974a SHA256 bae59bd7857817b02d3ad768717d44136dc57c0ca1ef83d415bddc0468aec0e0
 MD5 94305f9c59cf43b9fd742e931b7fb1b9 kexec-tools-1.101-r3.ebuild 1156
 RMD160 d5d85739a99b214b6b2ba31117870fcc97edda35 kexec-tools-1.101-r3.ebuild 1156
 SHA256 bae59bd7857817b02d3ad768717d44136dc57c0ca1ef83d415bddc0468aec0e0 kexec-tools-1.101-r3.ebuild 1156
+EBUILD kexec-tools-1.101-r4.ebuild 1157 RMD160 9d9bc1e60052d8912ef0e96a1c6713c7b08c191d SHA1 56dcff060ed2108d8e8f80a01b81a5559f0280eb SHA256 2f6fe3857e9a4a1f4dbdee3e86813a1c35bc6460de4649fc5c4123e4fc06c5fa
+MD5 35f698c0ff82a457277cb8a85edd47a8 kexec-tools-1.101-r4.ebuild 1157
+RMD160 9d9bc1e60052d8912ef0e96a1c6713c7b08c191d kexec-tools-1.101-r4.ebuild 1157
+SHA256 2f6fe3857e9a4a1f4dbdee3e86813a1c35bc6460de4649fc5c4123e4fc06c5fa kexec-tools-1.101-r4.ebuild 1157
 EBUILD kexec-tools-9999.ebuild 1000 RMD160 7a40485eeaf922511de800e4b0a1ff00777389e5 SHA1 83f5bd7ceb19b7b185d8b4d94c6c1efdf8342d5e SHA256 e0b407bbea9f21d7345e81db174faa09fb1b76d5ba84053d1f8d152dbcc91815
 MD5 2663dc43f9124edf83b88fcadf90be98 kexec-tools-9999.ebuild 1000
 RMD160 7a40485eeaf922511de800e4b0a1ff00777389e5 kexec-tools-9999.ebuild 1000
 SHA256 e0b407bbea9f21d7345e81db174faa09fb1b76d5ba84053d1f8d152dbcc91815 kexec-tools-9999.ebuild 1000
-MISC ChangeLog 3513 RMD160 566db10d250ba665387866f5e807c9e1d9c4ad94 SHA1 c56dae1cd516fbb981be3313b574f406d3f992c6 SHA256 680200328f1e3c8b428ab779984ff221d584a48499f64460cad8f4fc68570978
-MD5 2e0b8040503e7cf0f595afff86275e02 ChangeLog 3513
-RMD160 566db10d250ba665387866f5e807c9e1d9c4ad94 ChangeLog 3513
-SHA256 680200328f1e3c8b428ab779984ff221d584a48499f64460cad8f4fc68570978 ChangeLog 3513
+MISC ChangeLog 3698 RMD160 1a49bfc58f5ad56a72be83d3b9789bd6bfc7c156 SHA1 f0dbd4203f9f68b3a11491fb8be91e6820ddd5a9 SHA256 2080f48a75afb233ee00cd99d1252fa985c84c07eb8b570cb6bee23c76a34ff9
+MD5 6620078a22261446cf56f7f2bf34e580 ChangeLog 3698
+RMD160 1a49bfc58f5ad56a72be83d3b9789bd6bfc7c156 ChangeLog 3698
+SHA256 2080f48a75afb233ee00cd99d1252fa985c84c07eb8b570cb6bee23c76a34ff9 ChangeLog 3698
 MISC metadata.xml 264 RMD160 ff3b07b3794623e4733a4dd289cffc9606d6e432 SHA1 310c846802ac0f01334ee8677c428e2962594d01 SHA256 62bbe388ec16f0c4a20cfbb752b05fdefd1349254c494cdea67c096bb553c06b
 MD5 6e89ba8198764bfd079a0cfa18dca593 metadata.xml 264
 RMD160 ff3b07b3794623e4733a4dd289cffc9606d6e432 metadata.xml 264
@@ -46,13 +47,9 @@ SHA256 62bbe388ec16f0c4a20cfbb752b05fdefd1349254c494cdea67c096bb553c06b metadata
 MD5 683964b85bf00f1ac0d518aaea057f26 files/digest-kexec-tools-1.101-r3 527
 RMD160 f0455fbaea4d9d857bbbd5724a7bd5426f81a9eb files/digest-kexec-tools-1.101-r3 527
 SHA256 5ecc2669a163a9ec13ffe88f7706a22ae9856cca40a704348290c3d6c312439d files/digest-kexec-tools-1.101-r3 527
+MD5 683964b85bf00f1ac0d518aaea057f26 files/digest-kexec-tools-1.101-r4 527
+RMD160 f0455fbaea4d9d857bbbd5724a7bd5426f81a9eb files/digest-kexec-tools-1.101-r4 527
+SHA256 5ecc2669a163a9ec13ffe88f7706a22ae9856cca40a704348290c3d6c312439d files/digest-kexec-tools-1.101-r4 527
 MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-kexec-tools-9999 0
 RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-kexec-tools-9999 0
 SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-kexec-tools-9999 0
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.2 (GNU/Linux)
-
-iD8DBQFF7a9K8bi6rjpTunYRAqp5AJ4+HwfWKh+zkDL9eWlyMy5z3WxOrQCfUzNI
-5qLrDptCT/HNrT9uvV1lTxY=
-=+2R/
------END PGP SIGNATURE-----
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 (file)
index 0000000..80408fd
--- /dev/null
@@ -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
index 3ddacd1d15464110fa2a5199ff7cef0b14dd2ae5..785831bf0693ca4dae4506eb4e562cb60e47270e 100755 (executable)
@@ -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 (file)
index 0000000..f7d676f
--- /dev/null
@@ -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
+}