diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-07-05 09:53:39 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-07-05 09:53:39 +0000 |
commit | 87b980a30aedc0be68733e8ae6da09efd8afc330 (patch) | |
tree | c3961b4ebbd99e0cbf9cc868dd37c8c25ca632c9 /sys-block/vblade | |
parent | Fixup for libtool-2.2 wrt bug #226525. Thanks Rafał Mużyło <galtgendo@o2.pl>. (diff) | |
download | historical-87b980a30aedc0be68733e8ae6da09efd8afc330.tar.gz historical-87b980a30aedc0be68733e8ae6da09efd8afc330.tar.bz2 historical-87b980a30aedc0be68733e8ae6da09efd8afc330.zip |
Bug #209792, use "vbladed?" and a shorter chunk of arguments to match more processes.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64
Diffstat (limited to 'sys-block/vblade')
-rw-r--r-- | sys-block/vblade/ChangeLog | 9 | ||||
-rw-r--r-- | sys-block/vblade/Manifest | 4 | ||||
-rw-r--r-- | sys-block/vblade/files/init.d-vblade.vblade0-14-r1 | 114 | ||||
-rw-r--r-- | sys-block/vblade/vblade-14-r1.ebuild | 43 |
4 files changed, 168 insertions, 2 deletions
diff --git a/sys-block/vblade/ChangeLog b/sys-block/vblade/ChangeLog index ba0b7a2a0469..ae71e0b72ec9 100644 --- a/sys-block/vblade/ChangeLog +++ b/sys-block/vblade/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-block/vblade # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/vblade/ChangeLog,v 1.19 2008/01/14 02:14:49 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/vblade/ChangeLog,v 1.20 2008/07/05 09:53:38 robbat2 Exp $ + +*vblade-14-r1 (05 Jul 2008) + + 05 Jul 2008; Robin H. Johnson <robbat2@gentoo.org> + +files/init.d-vblade.vblade0-14-r1, +vblade-14-r1.ebuild: + Bug #209792, use "vbladed?" and a shorter chunk of arguments to match more + processes. 14 Jan 2008; Robin H. Johnson <robbat2@gentoo.org> metadata.xml, -vblade-6.ebuild, -vblade-9.ebuild, -vblade-10.ebuild, diff --git a/sys-block/vblade/Manifest b/sys-block/vblade/Manifest index 4b7a4e09bbd5..44a81a6d91d1 100644 --- a/sys-block/vblade/Manifest +++ b/sys-block/vblade/Manifest @@ -1,8 +1,10 @@ AUX conf.d-vblade 929 RMD160 965d193ca4034302083552253b40f81bb46596d9 SHA1 a06f215ff55415995060eb0748f9f651d5aba4d9 SHA256 959b212244647776e04b1f28270b8a7fc2a6717326ee5b28e93af472f25dedcc AUX init.d-vblade.vblade0 2716 RMD160 e4211e81d16b6283d366e3614c46926b3cb05767 SHA1 3add92747ab16f5e863b192cfa2fd34b9e536fdc SHA256 7e65a2fe4d1e3a4abfafb734176ee10664458b4c9871e293bed0bc8c56c301ff AUX init.d-vblade.vblade0-14 2759 RMD160 846e99af68f55426acd2f269f496af015add9a4d SHA1 66aff27985df8e41e2ebb9e587570f3950e93e97 SHA256 ded292aa38a249cdee8a60366ee494ced0660d007340f97b398f18ba87947346 +AUX init.d-vblade.vblade0-14-r1 2748 RMD160 bcc5429f3f6a067600beb3243e355375b28c46b0 SHA1 26a85b44cb2bc2a39dc801cb4165c3c5227c556c SHA256 59f51555c4b0e975ccad074812ed6241bbe0972f1738b1d4fa9ebf608603dd6d AUX vbladed 650 RMD160 559099c8cb727dbd4af8df236022ff4bd112fefd SHA1 d240e8f607dd7e5eae22ec5ccd00b00b93410e3a SHA256 d6b7ca14e28c18bff20bf6d5fb37320c425b76ae042ae7cfd984e61e887caf41 DIST vblade-14.tgz 20317 RMD160 ad0fe6f0c4ab40fa31daa68c7b14143ad87f443c SHA1 57bea505f3acb88f03f761954eea0759a0241e3f SHA256 29374180e288293aa0206cbdfd8444fcc69c189946ec380959a85a35a3129253 +EBUILD vblade-14-r1.ebuild 1169 RMD160 02162f935779983c96a5aaa63b8e99a308aed8b7 SHA1 17e0648ac5546a37a7ebe882283374f4747771bf SHA256 1218a7b8451c5053a94231368ca916544a0a4ac016affa190e9e282622843a64 EBUILD vblade-14.ebuild 1159 RMD160 9012a58e4211d41b7374c4076fae037d9434d74a SHA1 16d4dc5bd248d6e1b23d05c89eb24a273d52e09e SHA256 f7dd810dd1e6693757ca6dd897ca37e73641b7a3b458c69c894f9d91a9bdcefc -MISC ChangeLog 2797 RMD160 afa5f9d64f46ac02d309fea04ee08bcabb1cf182 SHA1 703dbd28ce963327ba7f853cac1c2deb3b26258a SHA256 6ae2dca5b88d6d5e04f89470891f565d13c1868c3fc04d95a05501f3a7e51666 +MISC ChangeLog 3030 RMD160 040087f70e3a9ecd6fd840133fd2f6ed0933a96d SHA1 cf53de0a6eed25ff1230f9778aeb015577653a31 SHA256 476165f79ebd2604dd2815502ff79cd85414563ddee65a9f32db9dc56d064d4e MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 diff --git a/sys-block/vblade/files/init.d-vblade.vblade0-14-r1 b/sys-block/vblade/files/init.d-vblade.vblade0-14-r1 new file mode 100644 index 000000000000..93d0a92b251a --- /dev/null +++ b/sys-block/vblade/files/init.d-vblade.vblade0-14-r1 @@ -0,0 +1,114 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-block/vblade/files/init.d-vblade.vblade0-14-r1,v 1.1 2008/07/05 09:53:39 robbat2 Exp $ + +opts="${opts} checkconfig" + +depend() { + need net +} + +conf="$(add_suffix /etc/conf.d/vblade)" +[[ -e "${conf}" ]] && source "${conf}" +vblade_name="${myservice#*.}" +vblade_conf_variable="config_${vblade_name}" +vblade_conf="${!vblade_conf_variable}" +pidfile="/var/run/vblade-${vblade_name}.pid" +srvname="vblade.${vblade_name}" + +getconfig() { + tmp="${vblade_conf}" + shelf="${tmp/ *}" + tmp="${tmp#* }" + slot="${tmp/ *}" + tmp="${tmp#* }" + netif="${tmp/ *}" + tmp="${tmp#* }" + src="${tmp}" + export shelf slot netif src +} + + +checkconfig() { + if [ -z "${vblade_conf}" ]; then + eerror "vblade configuration not specified for ${vblade_name}" + return 1 + fi + getconfig + + is_valid_numeric "${shelf}" 0 + if [[ $? -ne 0 ]]; then + eerror "Shelf '${shelf}' is non-numeric or less than zero." + return 1 + fi + is_valid_numeric "${slot}" 0 15 + if [[ $? -ne 0 ]]; then + eerror "Slot '${slot}' is outside the valid range [0..15]." + return 1 + fi + + sysfs_base="/sys/class/net/" + procfs_base="/proc/sys/net/ipv4/conf/" + if test ! \( -e "${sysfs_base}${netif}" -o -e "${procfs_base}${netif}" \); then + eerror "Network interface '${netif}' does not exist" + return 1 + fi + + if test ! \( -f "${src}" -o -b "${src}" \) ; then + eerror "Source '${src}' must be a file or block device" + return 1 + fi + + if test ! \( -e "${src}" -a -r "${src}" \) ; then + eerror "Source '${src}' is not readable." + return 1 + fi + + return 0 +} + +is_valid_numeric() { + num="${1}" + min="${2}" + max="${3}" + # non-numeric + test "$num" -ge "0" 2>/dev/null + rc=$? + test "$rc" -eq 2 && return 2 + # check for min + test -z "$min" && return 0 + test "$num" -lt "$min" && return 1 + # check for max + test -z "$max" && return 0 + test "$num" -gt "$max" && return 1 + # done + return 0 +} + +start() { + checkconfig || return 1 + getconfig + ebegin "Starting ${srvname}: e${shelf}.${slot} on ${netif} using '${src}'" + export LOGTAG="${srvname}" + start-stop-daemon --start --quiet \ + --pidfile ${pidfile} --background \ + --make-pidfile --exec /usr/sbin/vbladed -- \ + ${shelf} ${slot} ${netif} "${src}" + eend $? + + #${shelf} ${slot} ${netif} "${src}" 2>&1 | logger -t ${srvname} & +} + +stop() { + ebegin "Stopping ${srvname}" + #start-stop-daemon --stop --quiet --pidfile ${pidfile} + getconfig + ps -Ao pid,args | egrep "^[[:space:]]*[[:digit:]]+ /usr/sbin/vbladed? ${shelf} ${slot}" | awk '{print $1}' | xargs kill + eend $? + + #start-stop-daemon --stop --quiet --exec /usr/sbin/vblade +} + +# vim: ft=gentoo-init-d syntax=gentoo-init-d : +# vim: ai sw=4 sts=4 ts=4 : diff --git a/sys-block/vblade/vblade-14-r1.ebuild b/sys-block/vblade/vblade-14-r1.ebuild new file mode 100644 index 000000000000..db96ba8e7443 --- /dev/null +++ b/sys-block/vblade/vblade-14-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/vblade/vblade-14-r1.ebuild,v 1.1 2008/07/05 09:53:38 robbat2 Exp $ + +inherit eutils + +DESCRIPTION="vblade exports a block device using AoE" +HOMEPAGE="http://sf.net/projects/aoetools/" +#SRC_URI="mirror://sourceforge/aoetools/${P}.tar.gz" +SRC_URI="mirror://sourceforge/aoetools/${P}.tgz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="" +DEPEND="virtual/libc" +RDEPEND="${DEPEND} + sys-apps/util-linux" + +src_unpack() { + unpack ${A} + cd "${S}" + # messy tarball + make clean || die "Failed to clean up source" + sed -i 's,^CFLAGS.*,CFLAGS += -Wall,' makefile || die "Failed to clean up makefile" +} +src_compile() { + emake || die "emake failed" +} + +src_install() { + into /usr + doman vblade.8 + dodoc HACKING NEWS README + dosbin vblade + dosbin "${FILESDIR}"/vbladed + newconfd "${FILESDIR}"/conf.d-vblade vblade + newinitd "${FILESDIR}"/init.d-vblade.vblade0-14-r1 vblade.vblade0 +} + +pkg_postinst() { + einfo "We do now include an init.d script, please look in your init.d and" + einfo "conf.d directories for it." +} |