Bug 129812 - Create rc script for dns/inadyn
Summary: Create rc script for dns/inadyn
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rong-En Fan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-21 09:10 UTC by Joseph S Atkinson
Modified: 2008-12-21 10:30 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S Atkinson 2008-12-21 09:10:00 UTC

Inadyn must be started manually to be effective. It makes sense that something of this nature would be desirable at boot. Since I desired it, I created and tested this locally. I came to the conclusion that others might make use of it and worked out an install script proper. This should help people until we can get a still maintained inadyn client in ports.

The chances here:
- Remove obsolete EXTRACT_SUFX, port already had USE_ZIP
- Shuffle the WRKSRC directory a bit because the default location causes a conflict when we install the rc script (directory and file share names)
- install rc script!
- bump PORTREVISION

Fix: 

#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: inadyn
# REQUIRE: NETWORKING
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable inadyn:
#
#inadyn_enable="YES"
#
# Reccomend using the inadyn.conf over inadyn_flags. However, inadyn_flags will
# take priotiy over the configuration file by upstream's design. Any command
# line arguement (and thus inadyn_flags) will cause inadyn.conf to be ignored
# completely.
# See inadyn(8) for inadyn_flags and inadyn.conf syntax.
#
# Don't forget to include --background in either method!
#
inadyn_enable="${inadyn_enable=NO}"

. %%RC_SUBR%%

name="inadyn"
rcvar=`set_rcvar`

command="%%PREFIX%%/bin/${name}"

load_rc_config "$name"
run_rc_command "$1"
--- inadyn.in ends here -----SHhAjqWKWL8ebnJFhgSeSSBI698Shiv15Hz8tguxHrZxq9nB
Content-Type: text/plain; name="inadyn_rc.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="inadyn_rc.diff"

--- Makefile.orig	2008-12-21 02:53:13.000000000 -0500
+++ Makefile	2008-12-21 03:14:34.000000000 -0500
@@ -7,17 +7,17 @@
 
 PORTNAME=	inadyn
 PORTVERSION=	1.96.2
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	dns
 MASTER_SITES=	http://inadyn.ina-tech.net/ \
 		http://www.mirrorservice.org/sites/ftp.freebsd.org/pub/FreeBSD/ports/distfiles/
 DISTNAME=	${PORTNAME}.v${PORTVERSION}
-EXTRACT_SUFX=	.zip
 
 MAINTAINER=	samm@os2.kiev.ua
 COMMENT=	INADYN - Simple DYNAMIC DNS client
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_RC_SUBR=	inadyn
 USE_ZIP=	yes
 USE_DOS2UNIX=	yes
 USE_GMAKE=	yes
@@ -32,6 +32,9 @@
 
 NO_INSTALL_MANPAGES=yes
 
+post-extract:
+	${MV} ${WRKDIR}/${PORTNAME} ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
 post-patch:
 	@${REINPLACE_CMD} -e 's|gcc|$$\(CC\)|g' ${WRKSRC}/makefile
 	${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" \
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-12-21 09:10:09 UTC
Maintainer of dns/inadyn,

Please note that PR ports/129812 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/129812

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2008-12-21 09:10:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Rong-En Fan freebsd_committer freebsd_triage 2008-12-21 09:13:45 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rafan

I like rc script. Take it.
Comment 4 Oleksii Samorukov freebsd_committer freebsd_triage 2008-12-21 09:35:19 UTC
Approving, thanks for your patch.
Comment 5 Rong-En Fan freebsd_committer freebsd_triage 2008-12-21 10:24:57 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!
Comment 6 dfilter service freebsd_committer freebsd_triage 2008-12-21 10:25:11 UTC
rafan       2008-12-21 10:24:54 UTC

  FreeBSD ports repository

  Modified files:
    dns/inadyn           Makefile 
  Added files:
    dns/inadyn/files     inadyn.in 
  Log:
  - Add rc script (rename WRKSRC to avoid name conflict)
  - Remove EXTRACT_SUFX as it uses USE_ZIP which automatically sets EXTRACT_SUFX
  - Bump PORTREVISION
  
  PR:             ports/129812
  Submitted by:   Joseph S. Atkinson <jsatkinson at embarqmail.com>
  Approved by:    Alex Samorukov <samm at os2.kiev.ua> (maintainer)
  
  Revision  Changes    Path
  1.7       +6 -3      ports/dns/inadyn/Makefile
  1.1       +34 -0     ports/dns/inadyn/files/inadyn.in (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"