Date: Wed, 14 Jul 2010 02:19:59 GMT From: Chris Howey <howeyc@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/148586: dns/ddclient - Added periodic daily script to force update Message-ID: <201007140219.o6E2JxWI042761@www.freebsd.org> Resent-Message-ID: <201007140220.o6E2K9ht010094@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <bsd.port.mk> 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007140219.o6E2JxWI042761>