Date: Mon, 05 Apr 2004 21:55:55 +0200 From: Radim Kolar <hsn@netmag.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/65224: new port: uptimec Message-ID: <E1BAaCJ-000MIJ-JL@asura.bsd> Resent-Message-ID: <200404052020.i35KKDPV094160@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 65224 >Category: ports >Synopsis: new port: uptimec >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Apr 05 13:20:13 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Radim Kolar >Release: FreeBSD 5.2.1-RELEASE i386 >Organization: Bhagavata Dharma >Environment: System: FreeBSD asura.bsd 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #5: Thu Mar 25 09:24:50 CET 2004 root@asura.bsd:/usr/src/sys/i386/compile/UP i386 >Description: !!Client for running longest uptime contest!! >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # uptimec # uptimec/Makefile # uptimec/files # uptimec/files/uptimec.sh # uptimec/files/uptimecrc.sample # uptimec/distinfo # uptimec/pkg-message # uptimec/pkg-descr # echo c - uptimec mkdir -p uptimec > /dev/null 2>&1 echo x - uptimec/Makefile sed 's/^X//' >uptimec/Makefile << 'END-of-uptimec/Makefile' X# New ports collection makefile for: uptimec X# Date created: 5 Apr 2004 X# Whom: Radim Kolar X# X# $FreeBSD$ X# X XPORTNAME= uptimec XPORTVERSION= 0.1 XCATEGORIES= sysutils X XMASTER_SITES= http://www.mrEriksson.net/downloads/ XMAINTAINER= hsn@netmag.cz XCOMMENT= Client for Uptime Project X XGNU_CONFIGURE= yes XUSE_GMAKE= yes XUSE_AUTOCONF_VER= 257 X XPLIST_FILES= sbin/uptimec etc/uptimecrc.sample etc/rc.d/uptimec.sh XPORTDOCS= README COPYING ChangeLog INSTALL protocol.txt X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/uptimec ${PREFIX}/sbin X ${INSTALL} ${MASTERDIR}/files/uptimecrc.sample ${PREFIX}/etc X ${INSTALL_SCRIPT} ${MASTERDIR}/files/uptimec.sh ${PREFIX}/etc/rc.d X.if !defined(NOPORTDOCS) X ${MKDIR} ${DOCSDIR} X.for i in ${PORTDOCS} X ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} X.endfor X.endif X ${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-uptimec/Makefile echo c - uptimec/files mkdir -p uptimec/files > /dev/null 2>&1 echo x - uptimec/files/uptimec.sh sed 's/^X//' >uptimec/files/uptimec.sh << 'END-of-uptimec/files/uptimec.sh' X#!/bin/sh X# X# $FreeBSD$ X# X X# PROVIDE: uptimec X# REQUIRE: LOGIN X# KEYWORD: FreeBSD shutdown X X# X# Add the following line to /etc/rc.conf to enable uptimec: X# X#uptimec_enable="YES" X# X X. /etc/rc.subr X Xname=uptimec Xrcvar=`set_rcvar` X Xcommand=/usr/local/sbin/uptimec Xrequired_files=/usr/local/etc/uptimecrc X X# default to enable Xuptimec_enable=${uptimec_enable:-"YES"} Xuptimec_user=${uptimec_user:-"nobody"} X Xload_rc_config $name X X#if no uptimec_flags, parse rcfile Xif [ -z "$uptimec_flags" -a -r $required_files ]; then X #get hostid from configuration file X hostid=`awk -F '( |\t)*=( |\t)*' '/^HOSTID/ { print $2;exit 0;}' $required_files` X password=`awk -F '( |\t)*=( |\t)*' '/^PASSWORD/ { print $2;exit 0;}' $required_files` X server=`awk -F '( |\t)*=( |\t)*' '/^SERVER/ { print $2;exit 0;}' $required_files` X if [ -z "$hostid" -o -z "$password" ]; then X exit 0; X fi X if [ -n "$server" ]; then X uptimec_flags="-s $server" X fi X uptimec_flags="$uptimec_flags -i $hostid -p $password" Xelse X exit 0; Xfi X Xrun_rc_command "$1" END-of-uptimec/files/uptimec.sh echo x - uptimec/files/uptimecrc.sample sed 's/^X//' >uptimec/files/uptimecrc.sample << 'END-of-uptimec/files/uptimecrc.sample' X# Uptimec configuration file. This file is used by startup script XHOSTID=2345 XPASSWORD=blabla X#SERVER=uptimes.mreriksson.net END-of-uptimec/files/uptimecrc.sample echo x - uptimec/distinfo sed 's/^X//' >uptimec/distinfo << 'END-of-uptimec/distinfo' XMD5 (uptimec-0.1.tar.gz) = 7f266a6afbe1c7b50ee335d497e8bd1f XSIZE (uptimec-0.1.tar.gz) = 44173 END-of-uptimec/distinfo echo x - uptimec/pkg-message sed 's/^X//' >uptimec/pkg-message << 'END-of-uptimec/pkg-message' XTips for participating in Uptime contest: X X - You need to obtain hostid and password on project home page X http://mreriksson.net/uptimes/ X X - Enter hostid and password into /usr/local/etc/uptimecrc X X - client uses UDP protocol for talking to server on port 2050 X X You may need to open this port in firewall: X ipfw add allow udp from any to any dst-port 2050 out keep-state X XRadim Kolar END-of-uptimec/pkg-message echo x - uptimec/pkg-descr sed 's/^X//' >uptimec/pkg-descr << 'END-of-uptimec/pkg-descr' XThe Uptime Client X XThe Uptime Client is a tiny daemon process that is installed on participating Xhosts, and sends details about uptime etc to the central server. X XWWW: http://mreriksson.net/uptimes/ END-of-uptimec/pkg-descr exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1BAaCJ-000MIJ-JL>