From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 14 02:20:09 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C133E106566C for ; Wed, 14 Jul 2010 02:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 85DCE8FC13 for ; Wed, 14 Jul 2010 02:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6E2K9YU010095 for ; Wed, 14 Jul 2010 02:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6E2K9ht010094; Wed, 14 Jul 2010 02:20:09 GMT (envelope-from gnats) Resent-Date: Wed, 14 Jul 2010 02:20:09 GMT Resent-Message-Id: <201007140220.o6E2K9ht010094@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Howey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9EF1106566C for ; Wed, 14 Jul 2010 02:19:59 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C980A8FC15 for ; Wed, 14 Jul 2010 02:19:59 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o6E2JxDV042762 for ; Wed, 14 Jul 2010 02:19:59 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o6E2JxWI042761; Wed, 14 Jul 2010 02:19:59 GMT (envelope-from nobody) Message-Id: <201007140219.o6E2JxWI042761@www.freebsd.org> Date: Wed, 14 Jul 2010 02:19:59 GMT From: Chris Howey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/148586: dns/ddclient - Added periodic daily script to force update X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jul 2010 02:20:09 -0000 >Number: 148586 >Category: ports >Synopsis: dns/ddclient - Added periodic daily script to force update >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jul 14 02:20:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Chris Howey >Release: 8.0-RELEASE >Organization: Home User >Environment: FreeBSD tinny-freebsd 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The dynamic dns provider I'm using expires an account after 30 days of activity. My IP does not change that often, so I created a script to update the account daily, regardless of IP changes. >How-To-Repeat: N/A >Fix: I have added a patch to the port that will install this script and shows a message on installation how to enable the script. The script is disabled by default. Files modified: ddclient/Makefile ddclient/files/pkg-message.in Files added: ddclient/files/ddclient_force.in Patch attached. Created using "diff -ruN ddclient.orig ddclient" Patch attached with submission follows: diff -ruN ddclient.orig/Makefile ddclient/Makefile --- ddclient.orig/Makefile 2009-08-21 18:18:41.000000000 -0600 +++ ddclient/Makefile 2010-07-13 18:56:04.000000000 -0600 @@ -22,7 +22,7 @@ NO_BUILD= yes USE_RC_SUBR= ${PORTNAME} -SUB_FILES= pkg-message +SUB_FILES= pkg-message ddclient_force PKGMESSAGE= ${WRKDIR}/pkg-message PLIST_FILES= etc/ddclient.conf.sample sbin/ddclient @@ -46,6 +46,10 @@ @${INSTALL} -d ${DOCSDIR} @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ .endif + +post-install: + ${MKDIR} ${PREFIX}/etc/periodic/daily + ${INSTALL_SCRIPT} ${WRKDIR}/ddclient_force ${PREFIX}/etc/periodic/daily/ddclient_force @${CAT} ${PKGMESSAGE} .include diff -ruN ddclient.orig/files/ddclient_force.in ddclient/files/ddclient_force.in --- ddclient.orig/files/ddclient_force.in 1969-12-31 17:00:00.000000000 -0700 +++ ddclient/files/ddclient_force.in 2010-07-13 20:02:46.000000000 -0600 @@ -0,0 +1,29 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_ddclient_force_enable" in + [Yy][Ee][Ss]) + echo + echo 'Forcing ddclient update:' + + out=`/usr/local/sbin/ddclient -force` + echo "$out" + rc=0 + ;; + + *) + rc=0 + ;; +esac + +exit $rc diff -ruN ddclient.orig/files/pkg-message.in ddclient/files/pkg-message.in --- ddclient.orig/files/pkg-message.in 2006-05-06 18:03:25.000000000 -0600 +++ ddclient/files/pkg-message.in 2010-07-13 18:58:26.000000000 -0600 @@ -12,4 +12,10 @@ ddclient_enable="YES" +If you would like to force ddclient to update your account +daily regardless of IP changes add the following line to +your /etc/periodic.conf + + daily_ddclient_force_enable="YES" + *********************************************************** >Release-Note: >Audit-Trail: >Unformatted: