From 87e670e33e9e1cac6870d4b0db0dede6f0b86a43 Mon Sep 17 00:00:00 2001 From: sthen Date: Mon, 6 Jun 2011 08:34:57 +0000 Subject: [PATCH] update ipcad to 3.7.3 and add rc.d script From Kirill Bychkov with tweaks from me: - set rc_reload - add "@sample /var/ipcad" so you don't need to create it yourself - use "@extraunexec rm -rf /var/ipcad/*" not rm -rf /var/ipcad --- net/ipcad/Makefile | 9 +++--- net/ipcad/distinfo | 10 +++--- net/ipcad/patches/patch-ipcad_conf | 37 ---------------------- net/ipcad/patches/patch-ipcad_conf_default | 28 ++++++++++++++++ net/ipcad/pkg/PLIST | 10 +++--- net/ipcad/pkg/ipcad.rc | 12 +++++++ 6 files changed, 55 insertions(+), 51 deletions(-) delete mode 100644 net/ipcad/patches/patch-ipcad_conf create mode 100644 net/ipcad/patches/patch-ipcad_conf_default create mode 100644 net/ipcad/pkg/ipcad.rc diff --git a/net/ipcad/Makefile b/net/ipcad/Makefile index 39ecfeecaa2..923c69110de 100644 --- a/net/ipcad/Makefile +++ b/net/ipcad/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.17 2010/11/19 22:31:33 espie Exp $ +# $OpenBSD: Makefile,v 1.18 2011/06/06 08:34:57 sthen Exp $ # $RuOBSD: Makefile,v 1.1.1.1 2002/04/08 02:46:36 form Exp $ COMMENT= IP accounting daemon simulating Cisco ip accounting -DISTNAME= ipcad-3.4.4 -REVISION= 0 +DISTNAME= ipcad-3.7.3 CATEGORIES= net HOMEPAGE= http://sourceforge.net/projects/ipcad/ @@ -29,8 +28,8 @@ do-install: perl -pi -e 's:%%SYSCONFDIR%%:${SYSCONFDIR}:' \ ${PREFIX}/man/man5/ipcad.conf.5 ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/ipcad - ${INSTALL_DATA} ${WRKDIST}/ipcad.conf \ - ${PREFIX}/share/examples/ipcad/ipcad.conf.sample + ${INSTALL_DATA} ${WRKDIST}/ipcad.conf.default \ + ${PREFIX}/share/examples/ipcad/ipcad.conf.default ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ipcad .for f in AUTHORS BUGS COPYING README ${INSTALL_DATA} ${WRKDIST}/${f} ${PREFIX}/share/doc/ipcad diff --git a/net/ipcad/distinfo b/net/ipcad/distinfo index f610f0ea4a7..d34da9892b2 100644 --- a/net/ipcad/distinfo +++ b/net/ipcad/distinfo @@ -1,5 +1,5 @@ -MD5 (ipcad-3.4.4.tar.gz) = Q1/ObFeFF6ddqgoqye2+9g== -RMD160 (ipcad-3.4.4.tar.gz) = i0AxdBDzDXtbmXkzQD7x1mwPxCo= -SHA1 (ipcad-3.4.4.tar.gz) = B0lP1HSvBtMxOdxfjL0PVcdkJps= -SHA256 (ipcad-3.4.4.tar.gz) = yhUC6HtH6yiew8jEGzwVePXYsZHVhP79i5HMZOiLMKk= -SIZE (ipcad-3.4.4.tar.gz) = 151558 +MD5 (ipcad-3.7.3.tar.gz) = ElYFJJlYiUFI7CbTyIGJ9Q== +RMD160 (ipcad-3.7.3.tar.gz) = 7sJ97n8MppuFXh4qQir78Vb8aF0= +SHA1 (ipcad-3.7.3.tar.gz) = e4iLZOryjLvDdRc80Ix/Zt3GP7Q= +SHA256 (ipcad-3.7.3.tar.gz) = cjctRq415NfMdNlvuvi7CuGJqp7P2JAmSHrKeQwvBxY= +SIZE (ipcad-3.7.3.tar.gz) = 172457 diff --git a/net/ipcad/patches/patch-ipcad_conf b/net/ipcad/patches/patch-ipcad_conf deleted file mode 100644 index 53a137e51f9..00000000000 --- a/net/ipcad/patches/patch-ipcad_conf +++ /dev/null @@ -1,37 +0,0 @@ -$OpenBSD: patch-ipcad_conf,v 1.3 2004/03/31 07:53:08 grange Exp $ ---- ipcad.conf.orig 2004-03-11 13:33:16.000000000 +0600 -+++ ipcad.conf 2004-03-20 20:50:10.000000000 +0600 -@@ -130,11 +130,11 @@ rsh enable at 127.0.0.1; - # - - rsh root@127.0.0.1 admin; /* Can shutdown ipcad */ --rsh staff@127.0.0.1 backup; /* Can dump/restore/import accounting table */ --rsh vlm@127.0.0.1; /* Can view and modify accounting tables */ -+#rsh staff@127.0.0.1 backup; /* Can dump/restore/import accounting table */ -+#rsh vlm@127.0.0.1; /* Can view and modify accounting tables */ - /* Note the order! */ --rsh luser@127.0.0.1 deny; /* Deny this user from even viewing tables */ --rsh 127.0.0.1 view-only; /* Other users can view current tables */ -+#rsh luser@127.0.0.1 deny; /* Deny this user from even viewing tables */ -+#rsh 127.0.0.1 view-only; /* Other users can view current tables */ - - - ########################## -@@ -167,7 +167,7 @@ netflow timeout inactive 15; # Flow inac - # to encourage you to change it. - # - --chroot = /adm/tmp; -+chroot = /var/ipcad; - - # - # File to keep getpid() in it. ipcad will also hold a lock. -@@ -177,7 +177,7 @@ chroot = /adm/tmp; - # exists inside chrooted environment. - # - --pidfile = /var/run/ipcad.pid; -+pidfile = /ipcad.pid; - - # - # UID/GID privileges dropping diff --git a/net/ipcad/patches/patch-ipcad_conf_default b/net/ipcad/patches/patch-ipcad_conf_default new file mode 100644 index 00000000000..09785f3f989 --- /dev/null +++ b/net/ipcad/patches/patch-ipcad_conf_default @@ -0,0 +1,28 @@ +$OpenBSD: patch-ipcad_conf_default,v 1.1 2011/06/06 08:34:57 sthen Exp $ +--- ipcad.conf.default.orig Sun Apr 17 13:18:07 2011 ++++ ipcad.conf.default Sun Apr 17 13:20:21 2011 +@@ -191,11 +191,11 @@ rsh enable at 127.0.0.1; + # + + rsh root@127.0.0.1 admin; /* Can shutdown ipcad */ +-rsh staff@127.0.0.1 backup; /* Can dump/restore/import accounting table */ +-rsh yourself@127.0.0.1; /* Can view and modify accounting tables */ ++#rsh staff@127.0.0.1 backup; /* Can dump/restore/import accounting table */ ++#rsh yourself@127.0.0.1; /* Can view and modify accounting tables */ + /* Note the order! */ +-rsh luser@127.0.0.1 deny; /* Deny this user from even viewing tables */ +-rsh 127.0.0.1 view-only; /* Other users can view current tables */ ++#rsh luser@127.0.0.1 deny; /* Deny this user from even viewing tables */ ++#rsh 127.0.0.1 view-only; /* Other users can view current tables */ + + # Keep IP packet time to live reasonably low to avoid remote attacks. + # (The rsh client must reside no more than three hops away from the +@@ -226,7 +226,7 @@ dumpfile = ipcad.dump; # The file is inside chroot(), + # to encourage you to change it. + # + +-chroot = /adm/tmp; ++chroot = /var/ipcad; + + # + # File to keep getpid() in it. ipcad will also hold a lock. diff --git a/net/ipcad/pkg/PLIST b/net/ipcad/pkg/PLIST index aa97fcebb0e..73ebb66f4ad 100644 --- a/net/ipcad/pkg/PLIST +++ b/net/ipcad/pkg/PLIST @@ -1,13 +1,15 @@ -@comment $OpenBSD: PLIST,v 1.5 2004/09/15 18:17:41 espie Exp $ +@comment $OpenBSD: PLIST,v 1.6 2011/06/06 08:34:57 sthen Exp $ +@extraunexec rm -rf /var/ipcad/* @man man/man5/ipcad.conf.5 @man man/man8/ipcad.8 -sbin/ipcad +@bin sbin/ipcad share/doc/ipcad/ share/doc/ipcad/AUTHORS share/doc/ipcad/BUGS share/doc/ipcad/COPYING share/doc/ipcad/README share/examples/ipcad/ -share/examples/ipcad/ipcad.conf.sample +share/examples/ipcad/ipcad.conf.default @sample ${SYSCONFDIR}/ipcad.conf -@extraunexec rm -rf /var/ipcad +@sample /var/ipcad/ +@rcscript ${RCDIR}/ipcad diff --git a/net/ipcad/pkg/ipcad.rc b/net/ipcad/pkg/ipcad.rc new file mode 100644 index 00000000000..2bed8c7a532 --- /dev/null +++ b/net/ipcad/pkg/ipcad.rc @@ -0,0 +1,12 @@ +#!/bin/sh +# +# $OpenBSD: ipcad.rc,v 1.1 2011/06/06 08:34:57 sthen Exp $ + +daemon="${TRUEPREFIX}/sbin/ipcad" +daemon_flags="-d" + +. /etc/rc.d/rc.subr + +rc_reload=NO + +rc_cmd $1