From 1e82a771ca78f5e55cfc0d432348ddebd94d56e0 Mon Sep 17 00:00:00 2001 From: Krzysztof Pawlik Date: Tue, 2 Jan 2007 22:33:47 +0000 Subject: [PATCH] Fix init.d script. Package-Manager: portage-2.1.2_rc4-r4 --- www-servers/resin/ChangeLog | 8 ++++-- www-servers/resin/Manifest | 32 +++++++++++------------ www-servers/resin/files/3.1.0/resin.conf | 5 +--- www-servers/resin/files/3.1.0/resin.init | 33 +++++++++++++++++------- 4 files changed, 47 insertions(+), 31 deletions(-) diff --git a/www-servers/resin/ChangeLog b/www-servers/resin/ChangeLog index 88b22a83f23f..87c91ab78aff 100644 --- a/www-servers/resin/ChangeLog +++ b/www-servers/resin/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for www-servers/resin -# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/ChangeLog,v 1.31 2006/12/26 01:49:46 nelchael Exp $ +# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/ChangeLog,v 1.32 2007/01/02 22:33:47 nelchael Exp $ + + 02 Jan 2007; Krzysiek Pawlik files/3.1.0/resin.conf, + files/3.1.0/resin.init: + Fix init.d script. *resin-3.1.0 (26 Dec 2006) diff --git a/www-servers/resin/Manifest b/www-servers/resin/Manifest index 26ce0ec3bf6c..f74c8bd58b5f 100644 --- a/www-servers/resin/Manifest +++ b/www-servers/resin/Manifest @@ -45,14 +45,14 @@ AUX 3.1.0/resin-3.1.0-gentoo.patch 6340 RMD160 a7945c5edff0c041e3fbcaab0a2125265 MD5 8cb00aa0c25e3db7e92d39afc6f46da5 files/3.1.0/resin-3.1.0-gentoo.patch 6340 RMD160 a7945c5edff0c041e3fbcaab0a2125265086a813 files/3.1.0/resin-3.1.0-gentoo.patch 6340 SHA256 fb7daf247ed4866c5767b8173a26053f24ad69d453b8e4b82a6766b10a6b451f files/3.1.0/resin-3.1.0-gentoo.patch 6340 -AUX 3.1.0/resin.conf 505 RMD160 569fdef0de2b9c7ad1ff4cec453591bc2643ca57 SHA1 2b0f2ba1edf8f438d28515c52ce69a3150b8420c SHA256 63a038b93fb41ab869f0a749539b2ab50c2935da7bcdd32696defc8cc48c78d6 -MD5 9aed30c2989de54d9d83ef4788145f7f files/3.1.0/resin.conf 505 -RMD160 569fdef0de2b9c7ad1ff4cec453591bc2643ca57 files/3.1.0/resin.conf 505 -SHA256 63a038b93fb41ab869f0a749539b2ab50c2935da7bcdd32696defc8cc48c78d6 files/3.1.0/resin.conf 505 -AUX 3.1.0/resin.init 746 RMD160 4972b125fa1fbee350cc6da598c96cfb98511bd2 SHA1 d598aab72ab840df0b736aadb830100efd9b15a7 SHA256 374b30a11f214ea77191fbe762742833d97413c3d7096142f6c4899162d7bbbf -MD5 3969abd9f16123e9934a1938cc551db7 files/3.1.0/resin.init 746 -RMD160 4972b125fa1fbee350cc6da598c96cfb98511bd2 files/3.1.0/resin.init 746 -SHA256 374b30a11f214ea77191fbe762742833d97413c3d7096142f6c4899162d7bbbf files/3.1.0/resin.init 746 +AUX 3.1.0/resin.conf 448 RMD160 d4b7405f55e36eedf4a737c9ced892f1e83d34a4 SHA1 6fb88c341a5271488d2b09aeb27c451619ee0015 SHA256 649d05d7fb515a9ba3c035adb19b9e39b66275e8a06cf452582b7ae5eb3ef667 +MD5 3065ffbced3b5961423f78283136730b files/3.1.0/resin.conf 448 +RMD160 d4b7405f55e36eedf4a737c9ced892f1e83d34a4 files/3.1.0/resin.conf 448 +SHA256 649d05d7fb515a9ba3c035adb19b9e39b66275e8a06cf452582b7ae5eb3ef667 files/3.1.0/resin.conf 448 +AUX 3.1.0/resin.init 760 RMD160 0f214967f9d2ebbce0a1f1328a5651ccbc7a7f4e SHA1 5c5627ee2fb82d7263cc66af44d1b8576b694aa8 SHA256 6ca51847c3b3b5055057f0564a2a56a48e99958d8220f40cb75c4aa87cc815b8 +MD5 a9ea68741e1b44173630ea40ac66af8a files/3.1.0/resin.init 760 +RMD160 0f214967f9d2ebbce0a1f1328a5651ccbc7a7f4e files/3.1.0/resin.init 760 +SHA256 6ca51847c3b3b5055057f0564a2a56a48e99958d8220f40cb75c4aa87cc815b8 files/3.1.0/resin.init 760 DIST resin-2.1.17.tar.gz 3239401 RMD160 5fcf2e7680bfad1531cf75d384dcd8f15c19f639 SHA1 2d45e885874122931e63d7c59baed50a75f60618 SHA256 70c681d45f34b1992fbdfb2024970c52a6be20b8cd23855903630e1476a89b92 DIST resin-3.0.21-src.tar.gz 5401440 RMD160 1f4d90a28aa772a4dc14259816325285ffea1957 SHA1 00a928d470f69f39c1fac511356b6d368ade54e5 SHA256 c9de627433fbe3ec940507fd604a4a2409e70a16342994ffab881a51f8db1055 DIST resin-3.0.22-src.tar.gz 5467522 RMD160 093cdcfa8bcd14a30ff54cc9cb8001ace10bbfc6 SHA1 23d4f2fd233033adb0b08f8fcdcb81a1f0aab3fe SHA256 0da5617b6867a0d40e59d2dfe2518158567506fea2c1273d56290c146a64849a @@ -73,10 +73,10 @@ EBUILD resin-3.1.0.ebuild 3419 RMD160 fd2b1b315a453d856fcbbed7dfb9c1aa2861e86b S MD5 4777e3ed6fde6990f9898a60b2d1fd80 resin-3.1.0.ebuild 3419 RMD160 fd2b1b315a453d856fcbbed7dfb9c1aa2861e86b resin-3.1.0.ebuild 3419 SHA256 5ba8f8651adb8fe8f054f5b469b2e38dfa2010eca8db94cc4d3d42c3823c3e0a resin-3.1.0.ebuild 3419 -MISC ChangeLog 7337 RMD160 df93bbac11fd43040a72f0efd02a03efff704589 SHA1 8fc92c4f028fdae16991309595622c08bf05d442 SHA256 cef8949138a83eff45d67c4fa7a440ad2b3beaa900fc12ab4040bdb0de53ed7a -MD5 a185b0bc90fb9b7175819b1a36ae7ca5 ChangeLog 7337 -RMD160 df93bbac11fd43040a72f0efd02a03efff704589 ChangeLog 7337 -SHA256 cef8949138a83eff45d67c4fa7a440ad2b3beaa900fc12ab4040bdb0de53ed7a ChangeLog 7337 +MISC ChangeLog 7462 RMD160 929e9cd2ef36efea23e927fa23c01437603e9e69 SHA1 5610536f041ee9e2b08fcdff4bce8f3cdeb7662c SHA256 f20212a27f6cec4a443e1b20753a8c770baf61a9474c00f0c42ee4b5fcce2868 +MD5 66962c3d982e4d6e226afdeff55a1d01 ChangeLog 7462 +RMD160 929e9cd2ef36efea23e927fa23c01437603e9e69 ChangeLog 7462 +SHA256 f20212a27f6cec4a443e1b20753a8c770baf61a9474c00f0c42ee4b5fcce2868 ChangeLog 7462 MISC metadata.xml 229 RMD160 a9b4042458f9aae459c108c2917745af68bd1d45 SHA1 087c10f53259e3702a47b6c43c4365fd16d8c201 SHA256 79bb370ed491d8c5f4c42086fcbd3affc893943b56254f98b5a9c9f369792884 MD5 2696a2548331ef205bf10abad6802180 metadata.xml 229 RMD160 a9b4042458f9aae459c108c2917745af68bd1d45 metadata.xml 229 @@ -94,9 +94,9 @@ MD5 486b2f59227ff5e961aee6f6a7482362 files/digest-resin-3.1.0 250 RMD160 29b90fa098e07020808bc9bb0156c404b6e012b3 files/digest-resin-3.1.0 250 SHA256 8af0d2e1d33ccff5b8ef7c6cfc0097f92c557d9179a3c1145ea103f7c40a1171 files/digest-resin-3.1.0 250 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.6 (GNU/Linux) +Version: GnuPG v2.0.1 (GNU/Linux) -iD8DBQFFkH/jgo/w9rxVVVERAuKvAJ4sQy27BirF4zgfkMrfQCnpdr9/XgCcCKfM -4caCPkrjGe8b+lRgxH2q5O8= -=Uh60 +iD8DBQFFmt4Cgo/w9rxVVVERAgF2AKC5FkfGFlnZmP7Bxjfcnzojds1WvQCfcUfW +uNQ23v05afSlcWtLS6Qoya0= +=04TS -----END PGP SIGNATURE----- diff --git a/www-servers/resin/files/3.1.0/resin.conf b/www-servers/resin/files/3.1.0/resin.conf index b3c218276ad7..5fb064e1ba6c 100644 --- a/www-servers/resin/files/3.1.0/resin.conf +++ b/www-servers/resin/files/3.1.0/resin.conf @@ -8,8 +8,5 @@ # java-config -L #GENTOO_VM=sun-jdk-1.5 -# Where your Resin is installed -RESIN_HOME=/usr/lib/resin - # The CLASSPATH for Resin to use, plus any others you need. -CLASSPATH=$(java-config -p resin) +CLASSPATH="$(java-config -p resin)" diff --git a/www-servers/resin/files/3.1.0/resin.init b/www-servers/resin/files/3.1.0/resin.init index ed7095efde77..5e2eebcf73bd 100644 --- a/www-servers/resin/files/3.1.0/resin.init +++ b/www-servers/resin/files/3.1.0/resin.init @@ -1,23 +1,38 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/files/3.1.0/resin.init,v 1.1 2006/12/26 01:49:46 nelchael Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/resin/files/3.1.0/resin.init,v 1.2 2007/01/02 22:33:47 nelchael Exp $ depend() { need net use dns logger mysql postgresql } -start() { - export JAVA_HOME=$(java-config --select-vm=${GENTOO_VM} -O) - ebegin "Starting Resin" - su - resin -c "${JAVA_HOME}/bin/java -Dresin.home=${RESIN_HOME} -cp ${CLASSPATH} -jar /usr/share/resin/lib/resin.jar start" +function runResin() { + + JAVA_HOME=$(java-config -O) + [[ -n "${GENTOO_VM}" ]] && JAVA_HOME=$(java-config --select-vm="${GENTOO_VM}" -O) + export JAVA_HOME + + local msg="${1}" + shift + + local cmdline="${JAVA_HOME}/bin/java -cp ${CLASSPATH} -jar /usr/share/resin/lib/resin.jar -resin-home /usr/lib/resin ${@}" + + ebegin "${msg}" + su - resin -c "${cmdline}" eend $? + +} + +start() { + + runResin "Starting Resin" "start" + } stop() { - export JAVA_HOME=$(java-config --select-vm=${GENTOO_VM} -O) - ebegin "Stopping Resin" - su - resin -c "${JAVA_HOME}/bin/java -Dresin.home=${RESIN_HOME} -jar /usr/share/resin/lib/resin.jar stop" - eend $? + + runResin "Stopping Resin" "stop" + } -- 2.26.2