Hello community, here is the log from the commit of package ddclient checked in at Wed Jun 28 18:45:36 CEST 2006. -------- --- ddclient/ddclient.changes 2006-01-25 21:35:24.000000000 +0100 +++ ddclient/ddclient.changes 2006-06-28 16:46:31.000000000 +0200 @@ -1,0 +2,8 @@ +Wed Jun 28 16:46:05 CEST 2006 - kssingvo@suse.de + +- update to version 3.7.0: +- support of many new routers +- fix to have a '#' char in the password +- renamed .orig to _orig in %doc section + +------------------------------------------------------------------- Old: ---- ddclient-3.6.7.tar.bz2 New: ---- ddclient-3.7.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ddclient.spec ++++++ --- /var/tmp/diff_new_pack.UsjvVc/_old 2006-06-28 18:45:15.000000000 +0200 +++ /var/tmp/diff_new_pack.UsjvVc/_new 2006-06-28 18:45:15.000000000 +0200 @@ -1,11 +1,11 @@ # -# spec file for package ddclient (Version 3.6.7) +# spec file for package ddclient (Version 3.7.0) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://bugs.opensuse.org +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild @@ -15,23 +15,23 @@ Group: Productivity/Networking/DNS/Utilities Requires: perl >= 5.004 Autoreqprov: on -Version: 3.6.7 +Version: 3.7.0 Release: 1 URL: http://ddclient.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build -Summary: A Perl client to update dynamic DNS entries +Summary: A Perl Client to Update Dynamic DNS Entries Source0: http://switch.dl.sourceforge.net/sourceforge/ddclient/%{name}-%{version}.tar.bz2 Patch0: ddclient-3.6.3-config.patch Patch1: ddclient-3.6.5-config.patch %description -DDclient is a small full featured client requiring only Perl. Supported -features include: operating as a daemon, manual and automatic updates, -static and dynamic updates, optimized updates for multiple addresses, -MX, wildcards, abuse avoidance, retrying failed updates, and sending -update status to syslog and through e-mail. This release may now obtain -your IP address from any interface, web based IP detection, many router -with user configurable FW definitions and now provides Full support for +ddclient is a small full-featured client requiring only Perl. Supported +features include daemon operation, manual and automatic updates, static +and dynamic updates, optimized updates for multiple addresses, MX, wild +cards, abuse avoidance, retry for failed updates, and status updates to +syslog and through e-mail. ddclient can obtain the IP address from any +interface, through a Web-based IP detection service, and for multiple +routers using custom FW definitions. It also provides full support for DynDNS.org's NIC2 protocol. Support is also included for other dynamic DNS services. Comes with sample scripts for use with DHCP, PPP, and cron. @@ -45,7 +45,7 @@ %prep %setup -%patch0 -p1 +%patch0 -p1 -b _orig %patch1 -p1 %build @@ -81,6 +81,11 @@ %doc COPY* README* sample* %changelog -n ddclient +* Wed Jun 28 2006 - kssingvo@suse.de +- update to version 3.7.0: +- support of many new routers +- fix to have a '#' char in the password +- renamed .orig to _orig in %%doc section * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Wed Jan 11 2006 - kssingvo@suse.de ++++++ ddclient-3.6.7.tar.bz2 -> ddclient-3.7.0.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/Changelog new/ddclient-3.7.0/Changelog --- old/ddclient-3.6.7/Changelog 2005-11-04 09:12:28.000000000 +0100 +++ new/ddclient-3.7.0/Changelog 2006-06-14 21:59:40.000000000 +0200 @@ -1,6 +1,30 @@ Changelog cvs +- Added vi tag +- Added support for 2Wire 1701HG Gateway (see + https://sourceforge.net/forum/message.php?msg_id=3496041 submitted by hemo) +- added ssl-support by perlhaq +- updated cvs version to 3.7.0-pre +- added support for Linksys RV042, see feature requests #1501093, #1500877 +- added support for netgear-rp614, see feature request #1237039 +- added support for watchguard-edge-x, patch #1468981 +- added support for dlink-524, see patch #1314272 +- added support for rtp300 +- added support for netgear-wpn824 +- added support for linksys-wcg200, see patch #1280713 +- added support for netgear-dg834g, see patch #1176425 +- added support for netgear-wgt624, see patch #1165209 +- added support for sveasoft, see patch #1102432 +- added support for smc-barricade-7004vbr, see patch #1087989 +- added support for sitecom-dc202, see patch #1060119 +- fixed the error of stripping out '#' in the middle of password, bug #1465932 +- fixed a couple bugs in sample-etc_rc.d_init.d_ddclient and added some extra auto distro detection +- added the validation of values when reading the configuration value. +- this fixes a bug when trying to use periods/intervals in the daemon check times, bug #1209743 +- added timeout option to the IO::Socket call for timing out the initial connection, bug: #1085110 + +3.6.7 - modified sample-etc_rc.d_init.d_ddclient.lsb (bug #1231930) - support for ConCont Protocol (patch #1265128) submitted by seather_misery - problem with sending mail should be solved @@ -231,4 +255,4 @@ network connectivity problems or a DynDNS server outage ------------------------------------------------------------------------------- -$Header: /cvsroot/ddclient/ddclient/Changelog,v 1.12 2005/11/04 08:12:28 wimpunk Exp $ +$Id: Changelog 10 2006-06-14 19:59:31Z wimpunk $ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/README new/ddclient-3.7.0/README --- old/ddclient-3.6.7/README 2005-12-18 16:05:03.000000000 +0100 +++ new/ddclient-3.7.0/README 2006-06-14 21:59:40.000000000 +0200 @@ -18,41 +18,31 @@ Dynamic DNS services currently supported include: -DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. -Hammernode - See http://www.hn.org for details on obtaining a free account. -Zoneedit - See http://www.zoneedit.com for details. -EasyDNS - See http://www.easydns.com for details. -NameCheap - See http://www.namecheap.com for details - -Also include is support for DSL Reports host monitoring service. [Highly recommended] -See http://dslreports.com for details. +DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. +Hammernode - See http://www.hn.org for details on obtaining a free account. +Zoneedit - See http://www.zoneedit.com for details. +EasyDNS - See http://www.easydns.com for details. +NameCheap - See http://www.namecheap.com for details +ConCont - See http://www.dydns.za.net for details +DnsPark - See http://www.dnspark.com for details +DslReports - See http://www.dslreports.com for details +Sitelutions - see http://www.sitelutions.com for details DDclient now supports many of cable/dsl broadband routers. -Comments, suggestions and requests can always be sent to: - mailto:paul+ddclient@burry.ca +Comments, suggestions and requests: use the forums on + http://sourceforge.net/projects/ddclient/ -If you use ddclient, please send a brief note to: - mailto:paul+ddclient@burry.ca -and indicate if you would like to be notified of new releases. - -.. Paul Burry - -IMPORTANT UPDATE: -Paul doesn't maintain the code anymore. Everything is done through sf.net. -Please check out http://ddclient.sourceforge.net and the project page. +The code was originally written by Paul Burry and is now hosted and maintained +through sf.net. Please check out http://ddclient.sf.net and the project page. ------------------------------------------------------------------------------- REQUIREMENTS: -- one or more accounts from: - DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. - Hammernode - See http://www.hn.org for details on obtaining a free account. - Zoneedit - See http://www.zoneedit.com for details. - EasyDNS - See http://www.easydns.com for details. - NameCheap - See http://www.namecheap.com for details +- one or more accounts from one of the dynamic DNS services - Perl 5.004 or later + (you need the IO::Socket::SSL perl library for ssl-support) - Linux or probably any common Unix system @@ -180,4 +170,4 @@ and monitor your ethernet interface. ------------------------------------------------------------------------------- -$Header: /cvsroot/ddclient/ddclient/README,v 1.8 2004/12/03 07:30:44 wimpunk Exp $ +$Id: README 10 2006-06-14 19:59:31Z wimpunk $ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/README.cisco new/ddclient-3.7.0/README.cisco --- old/ddclient-3.6.7/README.cisco 2004-12-03 08:28:39.000000000 +0100 +++ new/ddclient-3.7.0/README.cisco 2006-06-14 21:59:40.000000000 +0200 @@ -1,3 +1,4 @@ +$Id: README.cisco 10 2006-06-14 19:59:31Z wimpunk $ Method 1 ------------------------------------------------------ The following config will allow the Linux machine (10.1.1.2) to read @@ -32,4 +33,3 @@ fw-skip=FastEthernet0/0 fw-login=ddclient fw-password=xxxxxxxx - diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/README.ssl new/ddclient-3.7.0/README.ssl --- old/ddclient-3.6.7/README.ssl 1970-01-01 01:00:00.000000000 +0100 +++ new/ddclient-3.7.0/README.ssl 2006-06-14 21:59:40.000000000 +0200 @@ -0,0 +1,10 @@ +$Id: README.ssl 10 2006-06-14 19:59:31Z wimpunk $ + +Since 3.7.0, ddclient support ssl-updates +To use ssl, put "ssl=yes" in your configuration and make sure +you have IO::Socket::SSL. + +On debian, you need libio-socket-ssl-perl to have IO::Socket::SSL + +ssl support is tested on folowing dynamic dns providers: +- dyndns.org diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/ddclient new/ddclient-3.7.0/ddclient --- old/ddclient-3.6.7/ddclient 2005-12-18 16:03:42.000000000 +0100 +++ new/ddclient-3.7.0/ddclient 2006-06-14 22:03:52.000000000 +0200 @@ -1,7 +1,7 @@ #!/usr/bin/perl -w #!/usr/local/bin/perl -w ###################################################################### -# $Header: /cvsroot/ddclient/ddclient/ddclient,v 1.14 2005/11/04 08:12:28 wimpunk Exp $ +# $Id: ddclient 10 2006-06-14 19:59:31Z wimpunk $ # # DDCLIENT - a Perl client for updating DynDNS information # @@ -14,7 +14,7 @@ use Sys::Hostname; use IO::Socket; -my $version = "3.6.7"; +my $version = "3.7.0"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; @@ -188,6 +188,81 @@ 'url' => '/doc/wan.htm', 'skip' => 'st_wan_ip[0] = "', }, + 'westell-6100' => { + 'name' => 'Westell C90-610015-06 DSL Router', + 'url' => '/advstat.htm', + 'skip' => 'IP.+?Address', + }, + '2wire' => { + 'name' => '2Wire 1701HG Gateway', + 'url' => '/xslt?PAGE=B01', + 'skip' => 'Internet Address:', + }, + 'linksys-rv042-wan1' => { + 'name' => 'Linksys RV042 Dual Homed Router WAN Port 2', + 'url' => '/home.htm', + 'skip' => 'WAN1 IP', + }, + 'linksys-rv042-wan2' => { + 'name' => 'Linksys RV042 Dual Homed Router WAN Port 2', + 'url' => '/home.htm', + 'skip' => 'WAN2 IP', + }, + 'netgear-rp614' => { + 'name' => 'Netgear RP614 FW', + 'url' => '/sysstatus.html', + 'skip' => 'IP Address', + }, + 'watchguard-edge-x' => { + 'name' => 'Watchguard Edge X FW', + 'url' => '/netstat.htm', + 'skip' => 'inet addr:', + }, + 'dlink-524' => { + 'name' => 'D-Link DI-524', + 'url' => '/st_device.html', + 'skip' => 'WAN.*?Addres', + }, + 'rtp300' => { + 'name' => 'Linksys RTP300', + 'url' => '/cgi-bin/webcm?getpage=%2Fusr%2Fwww_safe%2Fhtml%2Fstatus%2FRouter.html', + 'skip' => 'Internet.*?IP Address', + }, + 'netgear-wpn824' => { + 'name' => 'Netgear WPN824 FW', + 'url' => '/RST_status.htm', + 'skip' => 'IP Address', + }, + 'linksys-wcg200' => { + 'name' => 'Linksys WCG200 FW', + 'url' => '/RgStatus.asp', + 'skip' => 'WAN.IP.*?Address', + }, + 'netgear-dg834g' => { + 'name' => 'netgear-dg834g', + 'url' => '/setup.cgi?next_file=s_status.htm&todo=cfg_init', + 'skip' => '', + }, + 'netgear-wgt624' => { + 'name' => 'Netgear WGT624', + 'url' => '/RST_st_dhcp.htm', + 'skip' => 'IP Address</B></td><TD NOWRAP width="50%">', + }, + 'sveasoft' => { + 'name' => 'Sveasoft WRT54G/WRT54GS', + 'url' => '/Status_Router.asp', + 'skip' => 'var wan_ip', + }, + 'smc-barricade-7004vbr' => { + 'name' => 'SMC Barricade FW (7004VBR model config)', + 'url' => '/status_main.stm', + 'skip' => 'var wan_ip=', + }, + 'sitecom-dc202' => { + 'name' => 'Sitecom DC-202 FW', + 'url' => '/status.htm', + 'skip' => 'Internet IP Address', + }, ); my %ip_strategies = ( 'ip' => ": obtain IP from -ip {address}", @@ -242,6 +317,7 @@ 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), 'retry' => setv(T_BOOL, 0, 0, 0, 0, undef), 'force' => setv(T_BOOL, 0, 0, 0, 0, undef), + 'ssl' => setv(T_BOOL, 0, 0, 0, 0, undef), 'syslog' => setv(T_BOOL, 0, 0, 1, 0, undef), 'facility' => setv(T_STRING,0, 0, 1, 'daemon', undef), @@ -431,6 +507,7 @@ "", [ "options", "=s", "-options opt,opt : optional per-service arguments (see below)" ], "", + [ "ssl", "!", "-{no}ssl : do updates over encrypted SSL connection" ], [ "retry", "!", "-{no}retry : retry failed updates." ], [ "force", "!", "-{no}force : force an update even if the update may be unnecessary" ], [ "timeout", "=i", "-timeout max : wait at most 'max' seconds for the host to respond" ], @@ -461,6 +538,7 @@ my ($result, %config, %globals, %cache); my $saved_cache = ''; my %saved_opt = %opt; +$result = 'OK'; test_geturl(opt('geturl')) if opt('geturl'); @@ -498,6 +576,7 @@ my ($daemon, $ip); do { $now = time; + $result = 'OK'; %opt = %saved_opt; if (opt('help')) { *STDERR = *STDOUT; @@ -516,7 +595,6 @@ $daemon = define($opt{'daemon'}, $globals{'daemon'}); $daemon = 0 if opt('force'); - $result = 'OK'; ## obtain the IP address to use. $ip = get_ip(opt('use')); @@ -799,11 +877,15 @@ warning("program version mismatch; ignoring %s", $file); last; } - warning("whitespace follows the \\ at the end-of-line.\nIf you meant to have a line continuation, remove the trailing whitespace.") - if /\\\s+$/; + if (/\\\s+$/) { + warning("whitespace follows the \\ at the end-of-line.\nIf you meant to have a line continuation, remove the trailing whitespace."); + } - $content .= "$_\n" unless /^#/; - s/#.*//; # remove comments + $content .= "$_\n" unless /^#/; + # lines contain passwords are a special case, we don't want to + # arbitrarily strip out '#' + if (/^(\S*password\S*)\s*=\s*(\S+)/i) { $_ = "$1=$2"; } + if (/^#/ || !(/password/i) || /#.*password/i) { s/#.*//; } # remove comments ## handle continuation lines $_ = "$continuation$_"; @@ -826,12 +908,19 @@ s/\s*,\s*/,/g; my @args = split; - ## verify that keywords are valid.. + ## verify that keywords are valid...and check the value foreach my $k (keys %locals) { if (!exists $variables{'merged'}{$k}) { - warning("unrecognized keyword '%s' (ignored)", $k); - delete $locals{$k}; - } + warning("unrecognized keyword '%s' (ignored)", $k); + delete $locals{$k}; + } else { + my $def = $variables{'merged'}{$k}; + my $value = check_value($locals{$k}, $def); + if (!defined($value)) { + warning("Invalid Value for keyword '%s' = '%s'", $k, $locals{$k}); + delete $locals{$k}; + } else { $locals{$k} = $value; } + } } if (exists($locals{'host'})) { $args[0] = @args ? "$args[0],$locals{host}" : "$locals{host}"; @@ -1539,29 +1628,46 @@ my $url = shift || ''; my $login = shift || ''; my $password = shift || ''; - my ($peer, $server, $port); + my ($peer, $server, $port, $default_port, $use_ssl); my ($sd, $rq, $request, $reply); - + + debug("proxy = $proxy"); + debug("url = $url"); ## canonify proxy and url - $proxy =~ s%^http://%%i; - $url =~ s%^http://%%i; + $proxy =~ s%^https?://%%i; + $url =~ s%^https?://%%i; $server = $url; $server =~ s%/.*%%; $url = "/" unless $url =~ m%/%; $url =~ s%^[^/]*/%%; - + + debug("server = $server"); + debug("opt(fw = ",opt('fw')); + debug("glo fw = $globals{'fw'}"); + #if ( $globals{'ssl'} and $server ne $globals{'fw'} ) { + ## always omit SSL for connections to local router + if ( $globals{'ssl'} and (caller(1))[3] ne 'main::get_ip' ) { + $use_ssl = 1; + $default_port = 443; + require IO::Socket::SSL; + import IO::Socket::SSL; + { no warnings; $IO::Socket::SSL::DEBUG = 0; } + } else { + $use_ssl = 0; + $default_port = 80; + } + ## determine peer and port to use. $peer = $proxy || $server; $peer =~ s%/.*%%; $port = $peer; $port =~ s%^.*:%%; - $port = 80 unless $port =~ /^\d+$/; + $port = $default_port unless $port =~ /^\d+$/; $peer =~ s%:.*$%%; - + my $to = sprintf "%s%s", $server, $proxy ? " via proxy $peer:$port" : ""; verbose("CONNECT:", "%s", $to); - $request = "GET "; $request .= "http://$server" if $proxy; $request .= "/$url HTTP/1.0\n"; @@ -1572,7 +1678,7 @@ $request .= "User-Agent: ${program}/${version}\n"; $request .= "Connection: close\n"; $request .= "\n"; - + ## make sure newlines are <cr><lf> for some pedantic proxy servers ($rq = $request) =~ s/\n/\r\n/g; @@ -1581,17 +1687,33 @@ if (! opt('exec')) { debug("skipped network connection"); verbose("SENDING:", $request); - - } elsif (! defined($sd = IO::Socket::INET->new(PeerAddr => $peer, PeerPort => $port, Proto => 'tcp', MultiHomed => 1))) { - warning("cannot connect to $peer:$port socket: $@"); - + } elsif ($use_ssl) { + $sd = IO::Socket::SSL->new( + PeerAddr => $peer, + PeerPort => $port, + Proto => 'tcp', + MultiHomed => 1, + Timeout => opt('timeout'), + ); + defined $sd or warning("cannot connect to $peer:$port socket: $@ " . IO::Socket::SSL::errstr()); } else { + $sd = IO::Socket::INET->new( + PeerAddr => $peer, + PeerPort => $port, + Proto => 'tcp', + MultiHomed => 1, + Timeout => opt('timeout'), + ); + defined $sd or warning("cannot connect to $peer:$port socket: $@"); + } + + if (defined $sd) { ## send the request to the http server - verbose("CONNECTED:", ""); + verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); verbose("SENDING:", $request); $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); - my $result = send $sd, $rq, 0; + my $result = syswrite $sd, $rq; if ($result != length($rq)) { warning("cannot send to $peer:$port ($!)."); @@ -2165,7 +2287,7 @@ } elsif (exists $errors{$status}) { if ($status eq 'nochg') { - success("updating %s: %s: %s", $h, $status, $errors{$status}); + warning("updating %s: %s: %s", $h, $status, $errors{$status}); $config{$h}{'ip'} = $ip; $config{$h}{'mtime'} = $now; $config{$h}{'status'} = 'good'; @@ -3002,3 +3124,9 @@ } ###################################################################### +# vim: ai ts=4 sw=4 tw=78 : + + +__END__ + + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_cron.d_ddclient new/ddclient-3.7.0/sample-etc_cron.d_ddclient --- old/ddclient-3.6.7/sample-etc_cron.d_ddclient 2004-12-03 08:30:44.000000000 +0100 +++ new/ddclient-3.7.0/sample-etc_cron.d_ddclient 2006-06-14 21:59:40.000000000 +0200 @@ -1,6 +1,6 @@ ###################################################################### ## ddclient is an IP address updater for www.dyndns.org -## $Header: /cvsroot/ddclient/ddclient/sample-etc_cron.d_ddclient,v 1.2 2004/12/03 07:30:44 wimpunk Exp $ +## $Id: sample-etc_cron.d_ddclient 10 2006-06-14 19:59:31Z wimpunk $ ###################################################################### ## minute 0-59 ## hour 0-23 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_ddclient.conf new/ddclient-3.7.0/sample-etc_ddclient.conf --- old/ddclient-3.6.7/sample-etc_ddclient.conf 2004-12-03 08:28:39.000000000 +0100 +++ new/ddclient-3.7.0/sample-etc_ddclient.conf 2006-06-14 21:59:40.000000000 +0200 @@ -1,5 +1,7 @@ ###################################################################### ## +## $Id: sample-etc_ddclient.conf 10 2006-06-14 19:59:31Z wimpunk $ +## ## Define default global variables with lines like: ## var=value [, var=value]* ## These values will be used for each following host unless overridden @@ -11,12 +13,18 @@ ## Lines can be continued on the following line by ending the line ## with a \ ## +## +## Warning: not all supported routers or dynamic DNS services +## are mentioned here. +## ###################################################################### daemon=300 # check every 300 seconds syslog=yes # log update msgs to syslog mail=root # mail all msgs to root mail-failure=root # mail failed update msgs to root pid=/var/run/ddclient.pid # record PID in file. +ssl=yes # use ssl-support. Works with + # ssl-library # #use=watchguard-soho, fw=192.168.111.1:80 # via Watchguard's SOHO FW #use=netopia-r910, fw=192.168.111.1:80 # via Netopia R910 FW diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_dhclient-exit-hooks new/ddclient-3.7.0/sample-etc_dhclient-exit-hooks --- old/ddclient-3.6.7/sample-etc_dhclient-exit-hooks 2004-08-14 00:29:17.000000000 +0200 +++ new/ddclient-3.7.0/sample-etc_dhclient-exit-hooks 2006-06-14 21:59:40.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/sh ###################################################################### -## $Header: /cvsroot/ddclient/ddclient/sample-etc_dhclient-exit-hooks,v 1.1.1.1 2004/08/13 22:29:17 wimpunk Exp $ +## $Id: sample-etc_dhclient-exit-hooks 10 2006-06-14 19:59:31Z wimpunk $ ###################################################################### # The /etc/dhclient-enter-hooks script is run by the ISC DHCP client's standard # update script whenever dhclient obtains or renews an address. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_dhcpc_dhcpcd-eth0.exe new/ddclient-3.7.0/sample-etc_dhcpc_dhcpcd-eth0.exe --- old/ddclient-3.6.7/sample-etc_dhcpc_dhcpcd-eth0.exe 2004-12-03 08:30:44.000000000 +0100 +++ new/ddclient-3.7.0/sample-etc_dhcpc_dhcpcd-eth0.exe 2006-06-14 21:59:40.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/sh ###################################################################### -## $Header: /cvsroot/ddclient/ddclient/sample-etc_dhcpc_dhcpcd-eth0.exe,v 1.2 2004/12/03 07:30:44 wimpunk Exp $ +## $Id: sample-etc_dhcpc_dhcpcd-eth0.exe 10 2006-06-14 19:59:31Z wimpunk $ ###################################################################### PATH=/usr/sbin:${PATH} diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_ppp_ip-up.local new/ddclient-3.7.0/sample-etc_ppp_ip-up.local --- old/ddclient-3.6.7/sample-etc_ppp_ip-up.local 2004-12-03 08:30:44.000000000 +0100 +++ new/ddclient-3.7.0/sample-etc_ppp_ip-up.local 2006-06-14 21:59:40.000000000 +0200 @@ -1,6 +1,6 @@ #!/bin/sh ###################################################################### -## $Header: /cvsroot/ddclient/ddclient/sample-etc_ppp_ip-up.local,v 1.2 2004/12/03 07:30:44 wimpunk Exp $ +## $Id: sample-etc_ppp_ip-up.local 10 2006-06-14 19:59:31Z wimpunk $ ###################################################################### ## ## On my host, pppd invokes this script with args: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_rc.d_init.d_ddclient new/ddclient-3.7.0/sample-etc_rc.d_init.d_ddclient --- old/ddclient-3.6.7/sample-etc_rc.d_init.d_ddclient 2004-12-03 08:28:39.000000000 +0100 +++ new/ddclient-3.7.0/sample-etc_rc.d_init.d_ddclient 2006-06-14 21:59:07.000000000 +0200 @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # ddclient This shell script takes care of starting and stopping # ddclient. @@ -6,25 +6,61 @@ # chkconfig: 2345 65 35 # description: ddclient provides support for updating dynamic DNS services. -[ -f /etc/ddclient/ddclient.conf ] || exit 0 +CONF=/etc/ddclient/ddclient.conf +program=ddclient -PATH=/usr/sbin:${PATH} -COLUMNS=9999 -export PATH COLUMNS +[ -f $CONF ] || exit 0 + +system=unknown +if [ -f /etc/fedora-release ]; then + system=fedora +elif [ -f /etc/redhat-release ]; then + system=redhat +elif [ -f /etc/debian_version ]; then + system=debian +fi + +PID='' +if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then + . /etc/init.d/functions + PID=`pidofproc $program` +else + PID=`ps -aef | grep "$program - sleep" | grep -v grep | awk '{print $2}'` +fi + +PATH=/usr/sbin:/usr/local/sbin:${PATH} +export PATH -program=ddclient # See how we were called. case "$1" in start) # Start daemon. + DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` + if [ -z "$DELAY" ] ; then + DELAY="-daemon 300" + else + DELAY='' + fi echo -n "Starting ddclient: " - ddclient -daemon 300 + if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then + daemon $program $DELAY + else + ddclient $DELAY + fi echo ;; stop) # Stop daemon. echo -n "Shutting down ddclient: " - kill `ps -aef | awk '/[ \/]perl.*ddclient/ { print $2}'` + if [ -n "$PID" ] ; then + if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then + killproc $program + else + kill $PID + fi + else + echo "ddclient is not running" + fi echo ;; restart) @@ -32,15 +68,18 @@ $0 start ;; status) - pids=`ps -aef | awk '/[ \/]perl.*ddclient/ { print $2}'` - if test "$pids" - then - for p in $pids - do - echo "$program (pid $p) is running" - done - else - echo "$program is stopped" + if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then + status $program + else + if test "$PID" + then + for p in $PID + do + echo "$program (pid $p) is running" + done + else + echo "$program is stopped" + fi fi ;; *) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_rc.d_init.d_ddclient.lsb new/ddclient-3.7.0/sample-etc_rc.d_init.d_ddclient.lsb --- old/ddclient-3.6.7/sample-etc_rc.d_init.d_ddclient.lsb 2005-07-04 08:33:19.000000000 +0200 +++ new/ddclient-3.7.0/sample-etc_rc.d_init.d_ddclient.lsb 2006-06-14 21:59:40.000000000 +0200 @@ -21,7 +21,7 @@ # can be used on many types of firewalls ### END INIT INFO # -# $Header: /cvsroot/ddclient/ddclient/sample-etc_rc.d_init.d_ddclient.lsb,v 1.2 2005/07/04 06:33:19 wimpunk Exp $ +# $Id: sample-etc_rc.d_init.d_ddclient.lsb 10 2006-06-14 19:59:31Z wimpunk $ # ### diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/ddclient-3.6.7/sample-etc_rc.d_init.d_ddclient.redhat new/ddclient-3.7.0/sample-etc_rc.d_init.d_ddclient.redhat --- old/ddclient-3.6.7/sample-etc_rc.d_init.d_ddclient.redhat 2004-12-03 08:28:39.000000000 +0100 +++ new/ddclient-3.7.0/sample-etc_rc.d_init.d_ddclient.redhat 2006-06-14 21:59:40.000000000 +0200 @@ -1,5 +1,5 @@ #!/bin/sh -# +# $Id: sample-etc_rc.d_init.d_ddclient.redhat 10 2006-06-14 19:59:31Z wimpunk $ # ddclient This shell script takes care of starting and stopping # ddclient. # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit-help@opensuse.org
participants (1)
-
root@suse.de