aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fanout
diff options
context:
space:
mode:
authorSimon Barner <barner@FreeBSD.org>2005-06-01 06:27:08 +0000
committerSimon Barner <barner@FreeBSD.org>2005-06-01 06:27:08 +0000
commitadf764915acc79b1bb19d817177b3db8d6bcf3a1 (patch)
tree85c6256fe3d2070681b990ca41d8f45e456b17c8 /sysutils/fanout
parente904f9bdd26716c5370ff7ed3b5e32c0d2001e0c (diff)
downloadports-adf764915acc79b1bb19d817177b3db8d6bcf3a1.tar.gz
ports-adf764915acc79b1bb19d817177b3db8d6bcf3a1.zip
Notes
Diffstat (limited to 'sysutils/fanout')
-rw-r--r--sysutils/fanout/Makefile41
-rw-r--r--sysutils/fanout/distinfo2
-rw-r--r--sysutils/fanout/files/patch-fanmux8
-rw-r--r--sysutils/fanout/files/patch-fanout51
-rw-r--r--sysutils/fanout/files/patch-fanterm48
-rw-r--r--sysutils/fanout/pkg-descr12
6 files changed, 162 insertions, 0 deletions
diff --git a/sysutils/fanout/Makefile b/sysutils/fanout/Makefile
new file mode 100644
index 000000000000..29f65176a5e5
--- /dev/null
+++ b/sysutils/fanout/Makefile
@@ -0,0 +1,41 @@
+# New ports collection makefile for: fanout
+# Date created: 20.01.2005
+# Whom: janos.mohacsi@bsd.hu
+#
+# $FreeBSD$
+#
+
+PORTNAME= fanout
+PORTVERSION= 0.6.1
+CATEGORIES= sysutils
+MASTER_SITES= http://www.stearns.org/fanout/ \
+ ftp://ftp.bascom.com/pub/wstearns/fanout/ \
+ http://www.linuxgrill.com/anonymous/mirrors/wstearns/fanout/
+
+MAINTAINER= janos.mohacsi@bsd.hu
+COMMENT= Tool to run commands on multiple machines
+
+USE_PERL5_RUN= yes
+NO_BUILD= yes
+USE_REINPLACE= yes
+PLIST_FILES= bin/fanout bin/fanterm bin/fanmux
+.if !defined(NOPORTDOCS)
+PORTDOCS= README index.html
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
+ ${WRKSRC}/fanterm
+ @${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},g' \
+ ${WRKSRC}/fanmux
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/fanout ${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/fanterm ${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/fanmux ${PREFIX}/bin/
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/fanout/distinfo b/sysutils/fanout/distinfo
new file mode 100644
index 000000000000..0b8995dc40d9
--- /dev/null
+++ b/sysutils/fanout/distinfo
@@ -0,0 +1,2 @@
+MD5 (fanout-0.6.1.tar.gz) = 82addf30b2e0cc6f0d203c9a99b20210
+SIZE (fanout-0.6.1.tar.gz) = 299030
diff --git a/sysutils/fanout/files/patch-fanmux b/sysutils/fanout/files/patch-fanmux
new file mode 100644
index 000000000000..f7ba5383bc97
--- /dev/null
+++ b/sysutils/fanout/files/patch-fanmux
@@ -0,0 +1,8 @@
+--- fanmux.orig Thu Jan 20 17:40:25 2005
++++ fanmux Thu Jan 20 17:41:21 2005
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!%%PERL%%
+ #Copyright 2003, William Stearns <wstearns@pobox.com>
+ #Released under the GPL
+ #V0.6.1
diff --git a/sysutils/fanout/files/patch-fanout b/sysutils/fanout/files/patch-fanout
new file mode 100644
index 000000000000..66270f46a6b4
--- /dev/null
+++ b/sysutils/fanout/files/patch-fanout
@@ -0,0 +1,51 @@
+
+$FreeBSD$
+
+--- fanout.orig
++++ fanout
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #Copyright 2000, 2001, 2002, 2003 William Stearns <wstearns@pobox.com>
+ #GPL'd, of course.
+ #Version 0.6.1, 8/7/2002
+@@ -23,6 +23,7 @@
+ echo "Usage:" >/dev/stderr
+ echo " $0 \"MACHINES\" \"commands and parameters to run on each machine\"" >/dev/stderr
+ echo " $0 -h #Show this help" >/dev/stderr
++ echo " $0 --noping # Do not ping before running command" >/dev/stderr
+ echo >/dev/stderr
+ echo "Examples:" >/dev/stderr
+ echo " fanout \"wstearns@localhost localhost anotherhost.someplace.net\" \\" >/dev/stderr
+@@ -38,8 +39,7 @@
+ echo >/dev/stderr
+ echo " export SERVERS=\"web1 web2 mail\"" >/dev/stderr
+ echo " fanout \"\$SERVERS \" \"uname -a ; ( if [ -f /var/log/dmesg ]; then \\" >/dev/stderr
+- echo " cat /var/log/dmesg ; else dmesg ; fi ) | egrep -i '(hd[a-h]|sd[a-h])' ; ls -al \\" >/dev/stderr
+- echo " /proc/kcore ; cat /proc/cpuinfo\" >serverspecs" >/dev/stderr
++ echo " cat /var/log/dmesg ; else dmesg ; fi ) | egrep -i '(hd[a-h]|sd[a-h])' " >/dev/stderr
+ exit
+ }
+
+@@ -65,20 +65,11 @@
+ ;;
+ esac
+
+- if type -path mktemp >/dev/null 2>/dev/null ; then
+- TMPFILE=`mktemp -q /tmp/fanout.XXXXXX`
+- if [ $? -ne 0 ]; then
+- echo "$0: Can't create temp file ${TMPFILE}." >/dev/stderr
+- exit 1
+- fi
+- else
+- TMPFILE="/tmp/fanout.$MYPID.$ONETARGET.$RANDOM"
+- touch $TMPFILE
++ TMPFILE=`mktemp -q /tmp/fanout.XXXXXX`
+ if [ $? -ne 0 ]; then
+ echo "$0: Can't create temp file ${TMPFILE}." >/dev/stderr
+ exit 1
+ fi
+- fi
+ OUTFILES="$OUTFILES $TMPFILE" #Remember the filename for later display, cleanup
+ if [ "$PING" = "NO" ] || ping -c 3 $ONEMACH >/dev/null 2>/dev/null ; then
+ echo Starting $ONETARGET >/dev/stderr #Machine is reachable
diff --git a/sysutils/fanout/files/patch-fanterm b/sysutils/fanout/files/patch-fanterm
new file mode 100644
index 000000000000..cffe45ed13b0
--- /dev/null
+++ b/sysutils/fanout/files/patch-fanterm
@@ -0,0 +1,48 @@
+
+$FreeBSD$
+
+--- fanterm.orig
++++ fanterm
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #Copyright 2002, 2003 William Stearns <wstearns@pobox.com>
+ #Released under the GPL
+ #V0.6.1
+@@ -19,11 +19,6 @@
+ trap FanTermCleanup SIGINT #Ctrl-C generates this
+
+
+-if ! type -path mktemp >/dev/null 2>/dev/null ; then
+- echo "Sorry, no mktemp utility, exiting." >&2
+- exit 1
+-fi
+-
+ if [ -z "$1" ]; then
+ echo Usage: >&2
+ echo "$0 ssh_host [ssh_host]..." >&2
+@@ -45,13 +40,13 @@
+ echo "$0: Can't create temp file $InPipe." >&2
+ exit 1
+ fi
+- mknod --mode=600 $InPipe p
++ mkfifo -m 600 $InPipe
+ OutPipe=`mktemp -q -u /tmp/fanout.XXXXXX`
+ if [ $? -ne 0 ]; then
+ echo "$0: Can't create temp file $OutPipe." >&2
+ exit 1
+ fi
+- mknod --mode=600 $OutPipe p
++ mkfifo -m 600 $OutPipe
+
+ InPipes="$InPipes $InPipe"
+ OutPipes="$OutPipes $OutPipe"
+@@ -62,7 +57,7 @@
+ fi
+ done
+
+-fanmux $InPipes
++%%LOCALBASE%%/bin/fanmux $InPipes
+
+ wait
+
diff --git a/sysutils/fanout/pkg-descr b/sysutils/fanout/pkg-descr
new file mode 100644
index 000000000000..6766ce70b4fb
--- /dev/null
+++ b/sysutils/fanout/pkg-descr
@@ -0,0 +1,12 @@
+Fanout and fanterm are two utilities that allow you to run commands on
+multiple machines. The difference is that fanout only runs non-interactive
+commands (like dd, cat, adduser, uname -a, etc.) and pipelines built of
+these. The output is collected into a single display that can be viewed by
+less or redirected to a file.
+
+Fanterm, on the other hand, allows you to run interactive text mode
+commands on multiple machines at the same time. Your keystrokes are sent
+to a shell or application running on each of the target systems. The
+output from each system is shown in a seperate xterm.
+
+WWW: http://www.stearns.org/fanout/