From 74f33b719d7072c565ff05813d86d65310f0153f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 22 May 2006 19:37:19 +0000 Subject: [PATCH 001/231] Reorganise git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/svn@2 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- COPYING | 340 +++ COPYRIGHT | 19 + Changelog | 241 ++ README | 173 ++ README.cisco | 35 + README.ssl | 9 + ddclient | 3040 ++++++++++++++++++++++++ sample-etc_cron.d_ddclient | 17 + sample-etc_ddclient.conf | 160 ++ sample-etc_dhclient-exit-hooks | 17 + sample-etc_dhcpc_dhcpcd-eth0.exe | 20 + sample-etc_ppp_ip-up.local | 40 + sample-etc_rc.d_init.d_ddclient | 54 + sample-etc_rc.d_init.d_ddclient.lsb | 66 + sample-etc_rc.d_init.d_ddclient.redhat | 41 + 15 files changed, 4272 insertions(+) create mode 100644 COPYING create mode 100644 COPYRIGHT create mode 100644 Changelog create mode 100644 README create mode 100644 README.cisco create mode 100644 README.ssl create mode 100755 ddclient create mode 100644 sample-etc_cron.d_ddclient create mode 100644 sample-etc_ddclient.conf create mode 100644 sample-etc_dhclient-exit-hooks create mode 100644 sample-etc_dhcpc_dhcpcd-eth0.exe create mode 100644 sample-etc_ppp_ip-up.local create mode 100755 sample-etc_rc.d_init.d_ddclient create mode 100755 sample-etc_rc.d_init.d_ddclient.lsb create mode 100755 sample-etc_rc.d_init.d_ddclient.redhat diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..60549be --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..57342b6 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,19 @@ +ddclient - update client for www.dyndns.org accounts + +Copyright (C) 1999 Paul Burry (paul@burry.ca) +Copyright (C) 2000 Paul Burry (paul@burry.ca) +Copyright (C) 2001 Paul Burry (paul@burry.ca) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/Changelog b/Changelog new file mode 100644 index 0000000..b1eeb93 --- /dev/null +++ b/Changelog @@ -0,0 +1,241 @@ +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 + +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 +- corrected a few writing mistakes +- support for 'NetComm NB3' adsl modem (submitted by crazyprog) +- Added Sitelutions DynDNS, fixed minor Namecheap bug (patch #1346867) + +3.6.6 +- support for olitec-SX200 +- added sample-etc_rc.d_init.d_ddclient.lsb as a sample script for lsb-compliant systems. +- support for linksys wrt854g (thanks to Nick Triantos) +- support for linksys ver 3 +- support for Thomson (Alcatel) SpeedTouch 510 (thanks to Aldoir) +- Cosmetic fixes submitted by John Owens + +3.6.5 +- there was a bug in the linksys-ver2 +- support for postscript (thanks to Larry Hendrickson) +- Changelog out of README +- modified all documentation to use /etc/ddclient/ddclient.conf (notified by nicolasmartin in bug [1070646]) + +3.6.4 +- added support for NameCheap service (thanks to Dan Boardman) +- added support for linksys ver2 (thanks to Dan Perik) + +3.6.3 +- renamed sample-etc_dhclient-enter-hooks to sample-etc_dhclient-exit-hooks +- add support for the Allnet 1298 Router +- add -a to ifconfig to query all interfaces (for Solaris and OpenBSD) +- update the process status to reflect what is happening. +- add a To: line when sending e-mail +- add mail-failure to send mail on failures only +- try all addresses for multihomed hosts (like check.dyndns.org) +- add support for dnspark +- add sample for OrgDNS.org + +3.6.2 +- add support for Xsense Aero +- add support for Alcatel Speedtouch Pro +- do authentication when either the login or password are defined. +- fix parsing of web status pages + +- 3.6 +- add support for EasyDNS (see easydns.com) +- add warning for possible incorrect continuation lines in the .conf file. +- add if-skip with the default as was used before. +- add cmd-skip. + +- 3.5.4 +- added !active result code for DynDNS.org + +- 3.5.2 +- avoid undefined variable in get_ip + +- 3.5.1 +- fix parsing of quoted strings in .conf file +- add filename and line number to any warnings regarding files. + +- 3.5 +- allow any url to be specified for -fw {address|url} + use -fw-skip {pattern} to specify a string preceding the IP address at the URL's page +- allow any url to be specified for -web {address|url} + use -web-skip {pattern} to specify a string preceding the IP address at the URL's page +- modify -test to display any IP addresses that could be obtained from + any interfaces, builtin fw definitions, or web status pages. + +- 3.4.6 (not released) +- fix errors in -help +- allow non-FQDNs as hosts; dslreports requires this. +- handle german ifconfig output +- try to get english messages from ifconfig so other languages are handled too. +- added support for com 3c886a 56k Lan Modem + +- 3.4.5 +- handle french ifconfig output + +- 3.4.4 +- added support for obtaining the IP address from a Cisco DHCP interface. + (Thanks, Tim) + +- 3.4.2 +- update last modified time when nochg is returned from dyndns +- add example regarding fw-login and fw-password's required by some + home routers + +- 3.4.1 +- add option (-pid) to record process id in a file. This option should be + defined in the .conf file as it is done in the sample. +- add detection of SIGHUP. When this signal is received, ddclient will + wake up immediately, reload it's configuration file, and update + the IP addresses if necessary. + +- 3.4 +- ALL PEOPLE USING THIS CLIENT ARE URGED TO UPGRADE TO 3.4 or better. +- fixed several timer related bugs. +- reformatted some messages. + +- 3.3.8 +- added support for the ISDN channels on ELSA LANCOM DSL/10 router + +- 3.3.7 +- suppress repeated identical e-mail messages. + +- 3.3.6 +- added support for the ELSA LANCOM DSL/10 router +- ignore 0.0.0.0 when obtained from any FW/router. + +- 3.3.5 +- fixed sample ddclient.conf. fw-ip= should be fw= +- fixed problem getting status pages for some routers + +- 3.3.4 +- added support for the MaxGate's UGATE-3x00 routers + +- 3.3.3 +- sample* correct checks for private addresses +- add redhat specific sample-etc_rc.d_init.d_ddclient.redhat +- make daemon-mode be the default when named ddclientd +- added support for the Linksys BEF* Internet Routers + +- 3.3.2 +- (sample-etc_rc.d_init.d_ddclient) set COLUMNS to a large number so that + 'ps -aef' will not prematurely truncate the CMD. + +- 3.3 +- added rpm (thanks to Bo Forslund) +- added support for the Netgear RT3xx Internet Routers +- modified sample-etc_rc.d_init.d_ddclient to work with other Unix beside RedHat. +- avoid rewritting the ddclient.cache file unnecessarily +- fixed other minor bugs + +- 3.2.0 +- add support for DynDNS's custom domain service. +- change suggested directory to /usr/sbin + +- 3.1.0 +- clean up; fix minor bugs. +- removed -refresh +- add min-interval to avoid too frequent update attempts. +- add min-error-interval to avoid too frequent update attempts when the + service is unavailable. + +- 3.0.1 +- make all values case sensitive (ie. passwords) + +- 3.0 +- new release! +- new ddclient.conf format +- rewritten to support DynDNS's NIC2 and other dynamic DNS services +- added Hammernode (hn.org) +- added ZoneEdit (zoneedit.com) +- added DSLreports (dslreports.com) host monitoring +- added support for obtaining IP addresses from +- interfaces, +- commands, +- web, +- external commands, +- Watchguard's SOHO router +- Netopia's R910 router +- and SMC's Barracade +- added daemon mode +- added logging msgs to syslog and e-mail + +- 2.3.7 +- add -refresh to the sample scripts so default arguments are obtained from the cache +- added local-ip script for obtaining the address of an interface +- added public-ip script for obtaining the ip address as seen from a public web page + +- 2.3.6 +- fixed bug the broke enabling retrying when members.dyndns.org was down. + +- 2.3.5 +- prevent warnings from earlier versions of Perl. + +- 2.3.4 +- added sample-etc_dhclient-enter-hooks for those using the ISC DHCP client (dhclient) + +- 2.3.3 +- make sure that ddclient.conf is only readable by the owner so that no one +- else can see the password (courtesy of Steve Greenland). +-- NOTE: you will need to change the permissions on ddclient.conf to prevent +-- others from obtaining viewing your password. +-- ie. chmod go-rwx /etc/ddclient.conf + +- 2.3.2 +- make sure 'quiet' messages are printed when -verbose or -debug is enabled +- fix error messages for those people using proxies. + +- 2.3 +- fixed a problem reading in cached entries + + +- 2.2.1 +- sample-etc_ppp_ip-up.local - local ip address is $4 or $PPP_LOCAL (for debian) +- use as the line terminator (some proxies are strict about this) + +- 2.2 +- added support (-static) for updating static DNS (thanks Marc Sira) +- changed ddclient.cache format (old style is still read) +- sample-etc_ppp_ip-up.local - detect improper calling sequences +- sample-etc_ppp_ip-up.local - local ip address is $3 or $PPP_LOCAL (for debian) + +- 2.1.2 +- updated README + +- 2.1.1 +- make sure result code reflects any failures +- optionally (-quiet) omit messages for unnecessary updates +- update sample-etc_cron.d_ddclient to use -quiet + +- 2.1 +- avoid unnecessary updates by recording the last hosts updated in a + cache file (default /etc/ddclient.cache) + +- optionally (-force) force an update, even if it may be unnecessary. + + This can be used to prevent dyndns.org from deleting a host that has not + required an update for a long period of time. + +- optionally (-refresh), reissue all host updates. + + This can be used together with cron to periodically update DynDNS. + See sample-etc-cron.d-ddclient for details. + +- optionally (-retry) save failed updates for future processing. + + This feature can be used to reissue updates that may have failed due to + network connectivity problems or a DynDNS server outage + +------------------------------------------------------------------------------- +$Id$ diff --git a/README b/README new file mode 100644 index 0000000..f70e0c9 --- /dev/null +++ b/README @@ -0,0 +1,173 @@ +=============================================================================== +DDCLIENT v3.6.7 + +ddclient is a Perl client used to update dynamic DNS entries for accounts +on many dynamic DNS services. + +IMPORTANT: The format and options used by ddclient have CHANGED. + Please examine the sample configuration file. + It is highly recommended that you take advantage of the + new daemon mode of operation. + +IMPORTANT: The installation location for the ddclient script has changed from + /root/bin/ + to + /usr/sbin/ + +=============================================================================== + +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 +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: use the forums on + http://sourceforge.net/projects/ddclient/ + +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 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 + +------------------------------------------------------------------------------- +INSTALLATION: + + cp ddclient /usr/sbin/ + mkdir /etc/ddclient + cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf + vi /etc/ddclient/ddclient.conf + -- and change hostnames, logins, and passwords appropriately + + ## For those using Redhat style rc files and using daemon-mode: + cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient + ## enable automatic startup when booting + /sbin/chkconfig --add ddclient + ## start the first time by hand + /etc/rc.d/init.d/ddclient start + + ## If you are not using daemon-mode, configure cron and dhcp or ppp + ## as described below. + +------------------------------------------------------------------------------- +TROUBLESHOOTING: + + 1. enable debugging and verbose messages. + $ ddclient -daemon=0 -debug -verbose -noquiet + + 2. Do you need to specify a proxy? + If so, just add a + proxy=your.isp.proxy + to the ddclient.conf file. + + 3. Define the IP address of your router with fw=xxx.xxx.xxx.xxx in + /etc/ddclient/ddclient.conf and then try + $ ddclient -daemon=0 -query + to see if the router status web page can be understood. + + 4. Need support for another router/firewall? + Define the router status page yourself with: + fw=url-to-your-router's-status-page + fw-skip=any-string-preceding-your-IP-address + + ddclient does something like this to provide builtin support for + common routers. + For example, the Linksys routers could have been added with: + fw=192.168.1.1/Status.htm + fw-skip=WAN.*?IP Address + + OR + Send me the output from: + $ ddclient -geturl {fw-ip-status-url} [-login login [-password password]] + and I'll add it to the next release! + + ie. for my fw/router I used: + $ ddclient -geturl 192.168.1.254/status.htm + + 5. Some broadband routers require the use of a password when ddclient + accesses its status page to determine the router's WAN IP address. + If this is the case for your router, add + fw-login=your-router-login + fw-password=your-router-password + to the beginning of your ddclient.conf file. + Note that some routers use either 'root' or 'admin' as their login + while some others accept anything. + +------------------------------------------------------------------------------- +USING DDCLIENT WITH ppp + +If you are using a ppp connection, you can easily update your DynDNS +entry with each connection, with: + ## configure pppd to update DynDNS with each connection + cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local + +Alternatively, you may just configure ddclient to operate as a daemon +and monitor your ppp interface. + +------------------------------------------------------------------------------- +USING DDCLIENT WITH cron + +If you have not configured ddclient to use daemon-mode, you'll need to +configure cron to force an update once a month so that the dns entry will +not become stale. + + ## configure cron to force an update twice a month + cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient + vi /etc/cron.d/ddclient + +------------------------------------------------------------------------------- +USING DDCLIENT WITH dhcpcd-1.3.17 + +If you are using dhcpcd-1.3.17 or thereabouts, you can easily update +your DynDNS entry automatically every time your lease is obtained +or renewed by creating an executable file named: + /etc/dhcpc/dhcpcd-{your-interface}.exe +ie.: + cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe + +In my case, it is named dhcpcd-eth0.exe and contains the lines: + #!/bin/sh + PATH=/usr/sbin:/root/bin:${PATH} + logger -t dhcpcd IP address changed to $1 + ddclient -proxy fasthttp.sympatico.ca -wildcard -ip $1 | logger -t ddclient + exit 0 + +Other DHCP clients may have another method of calling out to programs +for updating DNS entries. + +Alternatively, you may just configure ddclient to operate as a daemon +and monitor your ethernet interface. + +------------------------------------------------------------------------------- +USING DDCLIENT WITH dhclient + +If you are using the ISC DHCP client (dhclient), you can update +your DynDNS entry automatically every time your lease is obtained +or renewed by creating an executable file named: + /etc/dhclient-exit-hooks +ie.: + cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks + +Edit /etc/dhclient-exit-hooks to change any options required. + +Alternatively, you may just configure ddclient to operate as a daemon +and monitor your ethernet interface. + +------------------------------------------------------------------------------- +$Id$ diff --git a/README.cisco b/README.cisco new file mode 100644 index 0000000..2d7e337 --- /dev/null +++ b/README.cisco @@ -0,0 +1,35 @@ +$Id$ +Method 1 ------------------------------------------------------ + +The following config will allow the Linux machine (10.1.1.2) to read +the IP address from the DHCP interface on the Cisco router (eth0) as +user ddclient. Since ddclient is configured with a priv level of 1 it +cannot do anything except look at the routers stats, ip addresses, +etc. This should be pretty harmless even if ddclient's password were +to be discovered. + +This has been tested with Cisco IOS 12.1(5)T5 running on a Cisco 2621 +router. + +Cisco Router Config (Assuming eth0 is DHCP interface) +----------------------------------------------------- +user ddclient password password +user ddclient priv 1 +ip http auth local +ip http access-class 99 +ip http port 1021 +ip http server +access-list 99 permit host 10.1.1.2 + +DDClient Config +--------------------------------------------------- +use=cisco, fw=10.1.1.1, if=eth0, fw-login=ddclient, fw-password=password + + +Method 2 ------------------------------------------------------ + +use=fw +fw=192.168.1.1/exec/show/interfaces/CR +fw-skip=FastEthernet0/0 +fw-login=ddclient +fw-password=xxxxxxxx diff --git a/README.ssl b/README.ssl new file mode 100644 index 0000000..52a8d51 --- /dev/null +++ b/README.ssl @@ -0,0 +1,9 @@ +$Id$ + +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 --git a/ddclient b/ddclient new file mode 100755 index 0000000..4e1af65 --- /dev/null +++ b/ddclient @@ -0,0 +1,3040 @@ +#!/usr/bin/perl -w +#!/usr/local/bin/perl -w +###################################################################### +# $Id$ +# +# DDCLIENT - a Perl client for updating DynDNS information +# +# Author: Paul Burry (paul+ddclient@burry.ca) +# ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817 +###################################################################### +require 5.004; +use strict; +use Getopt::Long; +use Sys::Hostname; +use IO::Socket; + +my $version = "3.7.0-pre"; +my $programd = $0; +$programd =~ s%^.*/%%; +my $program = $programd; +$program =~ s/d$//; +my $now = time; +my $hostname = hostname(); +my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; +my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; +my $msgs = ''; +my $last_msgs = ''; + +use vars qw($file $lineno); +local $file = ''; +local $lineno = ''; + +$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:"; + +sub T_ANY {'any'}; +sub T_STRING {'string'}; +sub T_EMAIL {'e-mail address'}; +sub T_NUMBER {'number'}; +sub T_DELAY {'time delay (ie. 1d, 1hour, 1m)'}; +sub T_LOGIN {'login'}; +sub T_PASSWD {'password'}; +sub T_BOOL {'boolean value'}; +sub T_FQDN {'fully qualified host name'}; +sub T_OFQDN {'optional fully qualified host name'}; +sub T_FILE {'file name'}; +sub T_FQDNP {'fully qualified host name and optional port number'}; +sub T_PROTO {'protocol'} +sub T_USE {'ip strategy'} +sub T_IF {'interface'} +sub T_PROG {'program name'} +sub T_IP {'ip'} +sub T_POSTS {'postscript'}; + +## strategies for obtaining an ip address. +my %builtinweb = ( + 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, + 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, +); +my %builtinfw = ( + 'watchguard-soho' => { + 'name' => 'Watchguard SOHO FW', + 'url' => '/pubnet.htm', + 'skip' => 'NAME=IPAddress VALUE=', + }, + 'netopia-r910' => { + 'name' => 'Netopia R910 FW', + 'url' => '/WanEvtLog', + 'skip' => 'local:', + }, + 'smc-barricade' => { + 'name' => 'SMC Barricade FW', + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, + 'netgear-rt3xx' => { + 'name' => 'Netgear FW', + 'url' => '/mtenSysStatus.html', + 'skip' => 'IP Address', + }, + 'elsa-lancom-dsl10' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address', + }, + 'elsa-lancom-dsl10-ch01' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address.*?CH01', + }, + 'elsa-lancom-dsl10-ch02' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address.*?CH02', + }, + 'linksys' => { + 'name' => 'Linksys FW', + 'url' => '/Status.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-ver2' => { + 'name' => 'Linksys FW version 2', + 'url' => '/RouterStatus.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-ver3' => { + 'name' => 'Linksys FW version 3', + 'url' => '/Status_Router.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-wrt854g' => { + 'name' => 'Linksys WRT854G FW', + 'url' => '/Status_Router.asp', + 'skip' => 'IP Address:', + }, + 'maxgate-ugate3x00' => { + 'name' => 'MaxGate UGATE-3x00 FW', + 'url' => '/Status.htm', + 'skip' => 'WAN.*?IP Address', + }, + 'netcomm-nb3' => { + 'name' => 'NetComm NB3', + 'url' => '/MainPage?id=6', + 'skip' => 'ppp-0', + }, + '3com-3c886a' => { + 'name' => '3com 3c886a 56k Lan Modem', + 'url' => '/stat3.htm', + 'skip' => 'IP address in use', + }, + 'sohoware-nbg800' => { + 'name' => 'SOHOWare BroadGuard NBG800', + 'url' => '/status.htm', + 'skip' => 'Internet IP', + }, + 'xsense-aero' => { + 'name' => 'Xsense Aero', + 'url' => '/A_SysInfo.htm', + 'skip' => 'WAN.*?IP Address', + }, + 'alcatel-stp' => { + 'name' => 'Alcatel Speed Touch Pro', + 'url' => '/cgi/router/', + 'skip' => 'Brt', + }, + 'alcatel-510' => { + 'name' => 'Alcatel Speed Touch 510', + 'url' => '/cgi/ip/', + 'skip' => 'ppp', + }, + 'allnet-1298' => { + 'name' => 'Allnet 1298', + 'url' => '/cgi/router/', + 'skip' => 'WAN', + }, + '3com-oc-remote812' => { + 'name' => '3com OfficeConnect Remote 812', + 'url' => '/callEvent', + 'skip' => '.*IP address in use', + }, + 'e-tech' => { + 'name' => 'E-tech Router', + 'url' => '/Status.htm', + 'skip' => 'Public IP Address', + }, + 'cayman-3220h' => { + 'name' => 'Cayman 3220-H DSL', + 'url' => '/shell/show+ip+interfaces', + 'skip' => '.*inet', + }, + 'vigor-2200usb' => { + 'name' => 'Vigor 2200 USB', + 'url' => '/doc/online.sht', + 'skip' => 'PPPoA', +# 'skip' => 'PPPoA ', + }, + 'dlink-614' => { + 'name' => 'D-Link DI-614+', + 'url' => '/st_devic.html', + 'skip' => 'WAN', + }, + 'dlink-604' => { + 'name' => 'D-Link DI-604', + 'url' => '/st_devic.html', + 'skip' => 'WAN.*?IP.*Address', + }, + 'olitec-SX200' => { + 'name' => 'olitec-SX200', + '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:', + }, + +); +my %ip_strategies = ( + 'ip' => ": obtain IP from -ip {address}", + 'web' => ": obtain IP from an IP discovery page on the web", + 'fw' => ": obtain IP from the firewall specified by -fw {type|address}", + 'if' => ": obtain IP from the -if {interface}", + 'cmd' => ": obtain IP from the -cmd {external-command}", + 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", + map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, +); +sub ip_strategies_usage { + return map { sprintf(" -use=%-22s %s.", $_, $ip_strategies{$_}) } sort keys %ip_strategies; +} + +my %web_strategies = ( + 'dyndns'=> 1, + 'dnspark'=> 1, +); + +sub setv { + return { + 'type' => shift, + 'required' => shift, + 'cache' => shift, + 'config' => shift, + 'default' => shift, + 'minimum' => shift, + }; +}; +my %variables = ( + 'global-defaults' => { + 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), + 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), + 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), + 'pid' => setv(T_FILE, 0, 0, 1, "", undef), + 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), + 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), + + 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), + 'ip' => setv(T_IP, 0, 0, 1, undef, undef), + 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), + 'if-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), + 'web-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw' => setv(T_ANY, 0, 0, 1, '', undef), + 'fw-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw-login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'fw-password' => setv(T_PASSWD,1, 0, 1, '', undef), + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), + + '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), + 'priority' => setv(T_STRING,0, 0, 1, 'notice', undef), + 'mail' => setv(T_EMAIL, 0, 0, 1, '', undef), + 'mail-failure' => setv(T_EMAIL, 0, 0, 1, '', undef), + + 'exec' => setv(T_BOOL, 0, 0, 1, 1, undef), + 'debug' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'verbose' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'quiet' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'help' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'test' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'geturl' => setv(T_STRING,0, 0, 0, '', undef), + + 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), + }, + 'service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, + 'dyndns-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'dnspark-common-defaults' => { + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), + }, +); +my %services = ( + 'dyndns1' => { + 'updateable' => \&nic_dyndns2_updateable, + 'update' => \&nic_dyndns1_update, + 'examples' => \&nic_dyndns1_examples, + 'variables' => merge( + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'dyndns2' => { + 'updateable' => \&nic_dyndns2_updateable, + 'update' => \&nic_dyndns2_update, + 'examples' => \&nic_dyndns2_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, +# { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'concont' => { + 'updateable' => undef, + 'update' => \&nic_concont_update, + 'examples' => \&nic_concont_examples, + 'variables' => merge( + $variables{'service-common-defaults'}, + { 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), }, + { 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + ), + }, + 'dslreports1' => { + 'updateable' => undef, + 'update' => \&nic_dslreports1_update, + 'examples' => \&nic_dslreports1_examples, + 'variables' => merge( + { 'host' => setv(T_NUMBER, 1, 1, 1, 0, undef) }, + $variables{'service-common-defaults'}, + ), + }, + 'hammernode1' => { + 'updateable' => undef, + 'update' => \&nic_hammernode1_update, + 'examples' => \&nic_hammernode1_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dup.hn.org', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'zoneedit1' => { + 'updateable' => undef, + 'update' => \&nic_zoneedit1_update, + 'examples' => \&nic_zoneedit1_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.zoneedit.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'easydns' => { + 'updateable' => undef, + 'update' => \&nic_easydns_update, + 'examples' => \&nic_easydns_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'dnspark' => { + 'updateable' => undef, + 'update' => \&nic_dnspark_update, + 'examples' => \&nic_dnspark_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'dnspark-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'namecheap' => { + 'updateable' => undef, + 'update' => \&nic_namecheap_update, + 'examples' => \&nic_namecheap_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamicdns.park-your-domain.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, + 'sitelutions' => { + 'updateable' => undef, + 'update' => \&nic_sitelutions_update, + 'examples' => \&nic_sitelutions_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.sitelutions.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, +); +$variables{'merged'} = merge($variables{'global-defaults'}, + $variables{'service-common-defaults'}, + $variables{'dyndns-common-defaults'}, + map { $services{$_}{'variables'} } keys %services, +); + +my @opt = ( + "usage: ${program} [options]", + "options are:", + [ "daemon", "=s", "-daemon delay : run as a daemon" ], + [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], + [ "server", "=s", "-server host : update DNS information on 'host'" ], + [ "protocol", "=s", "-protocol type : update protocol used" ], + [ "file", "=s", "-file path : load configuration information from 'path'" ], + [ "cache", "=s", "-cache path : record address used in 'path'" ], + [ "pid", "=s", "-pid path : record process id in 'path'" ], + "", + [ "use", "=s", "-use which : how the should IP address be obtained." ], + &ip_strategies_usage(), + "", + [ "ip", "=s", "-ip address : set the IP address to 'address'" ], + "", + [ "if", "=s", "-if interface : obtain IP address from 'interface'" ], + [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ], + "", + [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ], + [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ], + "", + [ "fw", "=s", "-fw address|url : obtain IP address from firewall at 'address'" ], + [ "fw-skip", "=s", "-fw-skip pattern : skip any IP addresses before 'pattern' on the firewall address|url" ], + [ "fw-login", "=s", "-fw-login login : use 'login' when getting IP from fw" ], + [ "fw-password", "=s", "-fw-password secret : use password 'secret' when getting IP from fw" ], + "", + [ "cmd", "=s", "-cmd program : obtain IP address from by calling {program}" ], + [ "cmd-skip", "=s", "-cmd-skip pattern : skip any IP addresses before 'pattern' in the output of {cmd}" ], + "", + [ "login", "=s", "-login user : login as 'user'" ], + [ "password", "=s", "-password secret : use password 'secret'" ], + [ "host", "=s", "-host host : update DNS information for 'host'" ], + "", + [ "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" ], + + [ "syslog", "!", "-{no}syslog : log messages to syslog" ], + [ "facility", "=s", "-facility {type} : log messages to syslog to facility {type}" ], + [ "priority", "=s", "-priority {pri} : log messages to syslog with priority {pri}" ], + [ "mail", "=s", "-mail address : e-mail messages to {address}" ], + [ "mail-failure","=s", "-mail-failure address : e-mail messages for failed updates to {address}" ], + [ "exec", "!", "-{no}exec : do {not} execute; just show what would be done" ], + [ "debug", "!", "-{no}debug : print {no} debugging information" ], + [ "verbose", "!", "-{no}verbose : print {no} verbose information" ], + [ "quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates" ], + [ "help", "", "-help : this message" ], + + [ "query", "!", "-{no}query : print {no} ip addresses and exit" ], + [ "test", "!", "" ], ## hidden + [ "geturl", "=s", "" ], ## hidden + "", + nic_examples(), + "$program version $version, ", + " originally written by Paul Burry, paul+ddclient\@burry.ca", + " maintained by WimPunk" +); + +## process args +my ($opt_usage, %opt) = process_args(@opt); +my ($result, %config, %globals, %cache); +my $saved_cache = ''; +my %saved_opt = %opt; +$result = 'OK'; + +test_geturl(opt('geturl')) if opt('geturl'); + +## read config file because 'daemon' mode may be defined there. +read_config(define($opt{'file'}, default('file')), \%config, \%globals); +init_config(); +test_possible_ip() if opt('query'); + +if (!opt('daemon') && $programd =~ /d$/) { + $opt{'daemon'} = minimum('daemon'); +} +my $caught_hup = 0; +my $caught_term = 0; +$SIG{'HUP'} = sub { $caught_hup = 1; }; +$SIG{'TERM'} = sub { $caught_term = 1; }; +if (opt('daemon') && !opt('force')) { + $SIG{'CHLD'} = 'IGNORE'; + my $pid = fork; + if ($pid < 0) { + print STDERR "${program}: can not fork ($!)\n"; + exit -1; + } elsif ($pid) { + exit 0; + } + $SIG{'CHLD'} = 'DEFAULT'; + $opt{'syslog'} = 1; + open(STDOUT, ">/dev/null"); + open(STDERR, ">/dev/null"); + open(STDIN, " 0) && !$caught_hup && !$caught_term) { + my $delay = $left > 10 ? 10 : $left; + + $0 = sprintf("%s - sleeping for %s seconds", $program, $left); + $left -= sleep $delay; + } + $caught_hup = 0; + $result = 0; + + } elsif (! scalar(%config)) { + warning("no hosts to update.") unless !opt('quiet') || opt('verbose') || !$daemon; + $result = 1; + + } else { + $result = $result eq 'OK' ? 0 : 1; + } +} while ($daemon && !$result && !$caught_term); + +warning("caught SIGTERM; exiting") if $caught_term; +unlink_pid(); +sendmail(); + +exit($result); + +###################################################################### +## runpostscript +###################################################################### + +sub runpostscript { + my ($ip) = @_; + + if ( defined $globals{postscript} ) { + if ( -x $globals{postscript}) { + system ("$globals{postscript} $ip &"); + } else { + warning ("Can not execute post script: %s", $globals{postscript}); + } + } +} + +###################################################################### +## update_nics +###################################################################### +sub update_nics { + my %examined = (); + + foreach my $s (sort keys %services) { + my @hosts = (); + my $updateable = $services{$s}{'updateable'}; + my $update = $services{$s}{'update'}; + + foreach my $h (sort keys %config) { + next if $config{$h}{'protocol'} ne lc($s); + $examined{$h} = 1; + next if !nic_updateable($h, $updateable); + push @hosts, $h; + } + if (@hosts) { + $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); + &$update(@hosts); + runpostscript($ip); + } + } + foreach my $h (sort keys %config) { + if (!exists $examined{$h}) { + failed("%s was not updated because protocol %s is not supported.", + $h, define($config{$h}{'protocol'}, '') + ); + } + } + write_cache(opt('cache')); +} +###################################################################### +## unlink_pid() +###################################################################### +sub unlink_pid { + if (opt('pid') && opt('daemon')) { + unlink opt('pid'); + } +} + +###################################################################### +## write_pid() +###################################################################### +sub write_pid { + my $file = opt('pid'); + + if ($file && opt('daemon')) { + local *FD; + if (! open(FD, "> $file")) { + warning("Cannot create file '%s'. ($!)", $file); + + } else { + printf FD "$$\n"; + close(FD); + } + } +} + +###################################################################### +## write_cache($file) +###################################################################### +sub write_cache { + my ($file) = @_; + + ## merge the updated host entries into the cache. + foreach my $h (keys %config) { + if (! exists $cache{$h} || $config{$h}{'update'}) { + map {$cache{$h}{$_} = $config{$h}{$_} } @{$config{$h}{'cacheable'}}; + + } else { + map {$cache{$h}{$_} = $config{$h}{$_} } qw(atime wtime status); + } + } + + ## construct the cache file. + my $cache = ""; + foreach my $h (sort keys %cache) { + my $opt = join(',', map { "$_=".define($cache{$h}{$_},'') } sort keys %{$cache{$h}}); + + $cache .= sprintf "%s%s%s\n", $opt, ($opt ? ' ' : ''), $h; + } + $file = '' if defined($saved_cache) && $cache eq $saved_cache; + + ## write the updates and other entries to the cache file. + if ($file) { + $saved_cache = undef; + local *FD; + if (! open(FD, "> $file")) { + fatal("Cannot create file '%s'. ($!)", $file); + } + printf FD "## $program-$version\n"; + printf FD "## last updated at %s (%d)\n", prettytime($now), $now; + printf FD $cache; + + close(FD); + } +} +###################################################################### +## read_cache($file) - called before reading the .conf +###################################################################### +sub read_cache { + my $file = shift; + my $config = shift; + my $globals = {}; + + %{$config} = (); + ## read the cache file ignoring anything on the command-line. + if (-e $file) { + my %saved = %opt; + %opt = (); + $saved_cache = _read_config($config, $globals, "##\\s*$program-$version\\s*", $file); + %opt = %saved; + + foreach my $h (keys %cache) { + if (exists $config{$h}) { + foreach (qw(atime mtime wtime ip status)) { + $config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; + } + } + } + } +} +###################################################################### +## parse_assignments(string) return (rest, %variables) +## parse_assignment(string) return (name, value, rest) +###################################################################### +sub parse_assignments { + my $rest = shift; + my @args = @_; + my %variables = (); + my ($name, $value); + + while (1) { + $rest =~ s/^\s+//; + ($name, $value, $rest) = parse_assignment($rest, @args); + if (defined $name) { + $variables{$name} = $value; + } else { + last; + } + } + return ($rest, %variables); +} +sub parse_assignment { + my $rest = shift; + my $stop = @_ ? shift : '[\n\s,]'; + my ($c, $name, $value); + my ($escape, $quote) = (0, ''); + + if ($rest =~ /^\s*([a-z][a-z_-]*)=(.*)/i) { + ($name, $rest, $value) = ($1, $2, ''); + + while (length($c = substr($rest,0,1))) { + $rest = substr($rest,1); + if ($escape) { + $value .= $c; + $escape = 0; + } elsif ($c eq "\\") { + $escape = 1; + } elsif ($quote && $c eq $quote) { + $quote = '' + } elsif (!$quote && $c =~ /[\'\"]/) { + $quote = $c; + } elsif (!$quote && $c =~ /^${stop}/) { + last; + } else { + $value .= $c; + } + } + } + warning("assignment ended with an open quote") if $quote; + return ($name, $value, $rest); +} +###################################################################### +## read_config +###################################################################### +sub read_config { + my $file = shift; + my $config = shift; + my $globals = shift; + my %globals = (); + + _read_config($config, $globals, '', $file, %globals); +} +sub _read_config { + my $config = shift; + my $globals = shift; + my $stamp = shift; + local $file = shift; + my %globals = @_; + my %config = (); + my $content = ''; + + local *FD; + if (! open(FD, "< $file")) { + # fatal("Cannot open file '%s'. ($!)", $file); + warning("Cannot open file '%s'. ($!)", $file); + } + # Check for only owner has any access to config file + my ($dev, $ino, $mode, @statrest) = stat(FD); + if ($mode & 077) { + if (-f FD && (chmod 0600, $file)) { + warning("file $file must be accessible only by its owner (fixed)."); + } else { + # fatal("file $file must be accessible only by its owner."); + warning("file $file must be accessible only by its owner."); + } + } + + local $lineno = 0; + my $continuation = ''; + while () { + s/[\r\n]//g; + + $lineno++; + + ## check for the program version stamp + if (($. == 1) && $stamp && ($_ !~ /^$stamp$/i)) { + 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+$/; + + $content .= "$_\n" unless /^#/; + s/#.*//; # remove comments + + ## handle continuation lines + $_ = "$continuation$_"; + if (/\\$/) { + chop; + $continuation = $_; + next; + } + $continuation = ''; + + s/^\s+//; # remove leading white space + s/\s+$//; # remove trailing white space + s/\s+/ /g; # canonify + next if /^$/; + + ## expected configuration line is: + ## [opt=value,opt=..] [host [login [password]]] + my %locals; + ($_, %locals) = parse_assignments($_); + s/\s*,\s*/,/g; + my @args = split; + + ## verify that keywords are valid.. + foreach my $k (keys %locals) { + if (!exists $variables{'merged'}{$k}) { + warning("unrecognized keyword '%s' (ignored)", $k); + delete $locals{$k}; + } + } + if (exists($locals{'host'})) { + $args[0] = @args ? "$args[0],$locals{host}" : "$locals{host}"; + } + ## accumulate globals + if ($#args < 0) { + map { $globals{$_} = $locals{$_} } keys %locals; + } + + ## process this host definition + if (@args) { + my ($host, $login, $password) = @args; + + ## add in any globals.. + %locals = %{ merge(\%locals, \%globals) }; + + ## override login and password if specified the old way. + $locals{'login'} = $login if defined $login; + $locals{'password'} = $password if defined $password; + + ## allow {host} to be a comma separated list of hosts + foreach my $h (split_by_comma($host)) { + ## save a copy of the current globals + $config{$h} = { %locals }; + $config{$h}{'host'} = $h; + } + } + } + close(FD); + + warning("file ends while expecting a continuation line.") + if $continuation; + + %$globals = %globals; + %$config = %config; + + return $content; +} +###################################################################### +## init_config - +###################################################################### +sub init_config { + %opt = %saved_opt; + + ## + $opt{'quiet'} = 0 if opt('verbose'); + + ## infer the IP strategy if possible + $opt{'use'} = 'ip' if !define($opt{'use'}) && defined($opt{'ip'}); + $opt{'use'} = 'if' if !define($opt{'use'}) && defined($opt{'if'}); + $opt{'use'} = 'web' if !define($opt{'use'}) && defined($opt{'web'}); + + ## sanity check + $opt{'max-interval'} = max(interval(opt('max-interval')), interval(default('max-interval'))); + $opt{'min-interval'} = max(interval(opt('min-interval')), interval(default('min-interval'))); + $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); + + $opt{'timeout'} = 0 if opt('timeout') < 0; + $opt{'daemon'} = minimum('daemon') + if define($opt{'daemon'},$globals{'daemon'},0) + && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { + ## collect cmdline configuration options. + my %options = (); + foreach my $opt (split_by_comma($opt{'options'})) { + my ($name,$var) = split /\s*=\s*/, $opt; + $options{$name} = $var; + } + ## determine hosts specified with -host + my @hosts = (); + if (exists $opt{'host'}) { + foreach my $h (split_by_comma($opt{'host'})) { + push @hosts, $h; + } + } + ## and those in -options=... + if (exists $options{'host'}) { + foreach my $h (split_by_comma($options{'host'})) { + push @hosts, $h; + } + delete $options{'host'}; + } + ## merge options into host definitions or globals + if (@hosts) { + foreach my $h (@hosts) { + $config{$h} = %{ merge(\%options, $config{$h}) }; + } + $opt{'host'} = join(',', @hosts); + } else { + %globals = %{ merge(\%options, \%globals) }; + } + } + + ## override global options with those on the command-line. + foreach my $o (keys %opt) { + if (defined $opt{$o} && exists $variables{'global-defaults'}{$o}) { + $globals{$o} = $opt{$o}; + } + } + + ## sanity check + if (defined $opt{'host'} && defined $opt{'retry'}) { + usage("options -retry and -host (or -option host=..) are mutually exclusive"); + } + + ## determine hosts to update (those on the cmd-line, config-file, or failed cached) + my @hosts = keys %config; + if (opt('host')) { + @hosts = split_by_comma($opt{'host'}); + } + if (opt('retry')) { + @hosts = map { $_ if $cache{$_}{'status'} ne 'good' } keys %cache; + } + + ## remove any other hosts + my %hosts; + map { $hosts{$_} = undef } @hosts; + map { delete $config{$_} unless exists $hosts{$_} } keys %config; + + ## collect the cacheable variables. + foreach my $proto (keys %services) { + my @cacheable = (); + foreach my $k (keys %{$services{$proto}{'variables'}}) { + push @cacheable, $k if $services{$proto}{'variables'}{$k}{'cache'}; + } + $services{$proto}{'cacheable'} = [ @cacheable ]; + } + + ## sanity check.. + ## make sure config entries have all defaults and they meet minimums + ## first the globals... + foreach my $k (keys %globals) { + my $def = $variables{'merged'}{$k}; + my $ovalue = define($globals{$k}, $def->{'default'}); + my $value = check_value($ovalue, $def); + if ($def->{'required'} && !defined $value) { + $value = default($k); + warning("'%s=%s' is an invalid %s. (using default of %s)", $k, $ovalue, $def->{'type'}, $value); + } + $globals{$k} = $value; + } + + ## now the host definitions... + HOST: + foreach my $h (keys %config) { + my $proto; + $proto = $config{$h}{'protocol'}; + $proto = opt('protocol') if !defined($proto); + + if (!exists($services{$proto})) { + warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); + delete $config{$h}; + + } else { + my $svars = $services{$proto}{'variables'}; + my $conf = { 'protocol' => $proto }; + + foreach my $k (keys %$svars) { + my $def = $svars->{$k}; + my $ovalue = define($config{$h}{$k}, $def->{'default'}); + my $value = check_value($ovalue, $def); + if ($def->{'required'} && !defined $value) { + warning("skipping host: %s: '%s=%s' is an invalid %s.", $h, $k, $ovalue, $def->{'type'}); + delete $config{$h}; + next HOST; + } + $conf->{$k} = $value; + + } + $config{$h} = $conf; + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } + if (opt('help')) { + *STDERR = *STDOUT; + usage(); + } +} + +###################################################################### +## usage +###################################################################### +sub usage { + my $msg = ''; + if (@_) { + my $format = shift; + $msg .= sprintf $format, @_; + 1 while chomp($msg); + $msg .= "\n"; + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); + exit 1; +} + +###################################################################### +## process_args - +###################################################################### +sub process_args { + my @spec = (); + my $usage = ""; + my %opts = (); + + foreach (@_) { + if (ref $_) { + my ($key, $specifier, $arg_usage) = @$_; + my $value = default($key); + + ## add a option specifier + push @spec, $key . $specifier; + + ## define the default value which can be overwritten later + $opt{$key} = undef; + + next unless $arg_usage; + + ## add a line to the usage; + $usage .= " $arg_usage"; + if (defined($value) && $value ne '') { + $usage .= " (default: "; + if ($specifier eq '!') { + $usage .= "no" if ($specifier eq '!') && !$value; + $usage .= $key; + } else { + $usage .= $value; + } + $usage .= ")"; + } + $usage .= "."; + } else { + $usage .= $_; + } + $usage .= "\n"; + } + ## process the arguments + if (! GetOptions(\%opt, @spec)) { + $opt{"help"} = 1; + } + return ($usage, %opt); +} +###################################################################### +## test_possible_ip - print possible IPs +###################################################################### +sub test_possible_ip { + local $opt{'debug'} = 0; + + printf "use=ip, ip=%s address is %s\n", opt('ip'), define(get_ip('ip'), 'NOT FOUND') + if defined opt('ip'); + + { + local $opt{'use'} = 'if'; + foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) { + $if =~ s/:?\s.*//is; + local $opt{'if'} = $if; + printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND'); + } + } + if (opt('fw')) { + if (opt('fw') !~ m%/%) { + foreach my $fw (sort keys %builtinfw) { + local $opt{'use'} = $fw; + printf "use=$fw address is %s\n", define(get_ip($fw), 'NOT FOUND'); + } + } + local $opt{'use'} = 'fw'; + printf "use=fw, fw=%s address is %s\n", opt('fw'), define(get_ip(opt('fw')), 'NOT FOUND') + if ! exists $builtinfw{opt('fw')}; + + } + { + local $opt{'use'} = 'web'; + foreach my $web (sort keys %builtinweb) { + local $opt{'web'} = $web; + printf "use=web, web=$web address is %s\n", define(get_ip('web'), 'NOT FOUND'); + } + printf "use=web, web=%s address is %s\n", opt('web'), define(get_ip('web'), 'NOT FOUND') + if ! exists $builtinweb{opt('web')}; + } + if (opt('cmd')) { + local $opt{'use'} = 'cmd'; + printf "use=cmd, cmd=%s address is %s\n", opt('cmd'), define(get_ip('cmd'), 'NOT FOUND'); + } + exit 0 unless opt('debug'); +} +###################################################################### +## test_geturl - print (and save if -test) result of fetching a URL +###################################################################### +sub test_geturl { + my $url = shift; + + my $reply = geturl(opt('proxy'), $url, opt('login'), opt('password')); + print "URL $url\n";; + print defined($reply) ? $reply : "\n"; + exit; +} +###################################################################### +## load_file +###################################################################### +sub load_file { + my $file = shift; + my $buffer = ''; + + if (exists($ENV{'TEST_CASE'})) { + my $try = "$file-$ENV{'TEST_CASE'}"; + $file = $try if -f $try; + } + + local *FD; + if (open(FD, "< $file")) { + read(FD, $buffer, -s FD); + close(FD); + debug("Loaded %d bytes from %s", length($buffer), $file); + } else { + debug("Load failed from %s ($!)", $file); + } + return $buffer +} +###################################################################### +## save_file +###################################################################### +sub save_file { + my ($file, $buffer, $opt) = @_; + + $file .= "-$ENV{'TEST_CASE'}" if exists $ENV{'TEST_CASE'}; + if (defined $opt) { + my $i = 0; + while (-f "$file-$i") { + if ('unique' =~ /^$opt/i) { + my $a = join('\n', grep {!/^Date:/} split /\n/, $buffer); + my $b = join('\n', grep {!/^Date:/} split /\n/, load_file("$file-$i")); + last if $a eq $b; + } + $i++; + } + $file = "$file-$i"; + } + debug("Saving to %s", $file); + local *FD; + open(FD, "> $file") or return; + print FD $buffer; + close(FD); + return $buffer; +} +###################################################################### +## print_opt +## print_globals +## print_config +## print_cache +## print_info +###################################################################### +sub _print_hash { + my ($string, $ptr) = @_; + my $value = $ptr; + + if (! defined($ptr)) { + $value = ""; + } elsif (ref $ptr eq 'HASH') { + foreach my $key (sort keys %$ptr) { + _print_hash("${string}\{$key\}", $ptr->{$key}); + } + return; + } + printf "%-36s : %s\n", $string, $value; +} +sub print_hash { + my ($string, $hash) = @_; + printf "=== %s ====\n", $string; + _print_hash($string, $hash); +} +sub print_opt { print_hash("opt", \%opt); } +sub print_globals { print_hash("globals", \%globals); } +sub print_config { print_hash("config", \%config); } +sub print_cache { print_hash("cache", \%cache); } +sub print_info { + print_opt(); + print_globals(); + print_config(); + print_cache(); +} +###################################################################### +## pipecmd - run an external command +## logger +## sendmail +###################################################################### +sub pipecmd { + my $cmd = shift; + my $stdin = join("\n", @_); + my $ok = 0; + + ## remove trailing newlines + 1 while chomp($stdin); + + ## override when debugging. + $cmd = opt('exec') ? "| $cmd" : "> /dev/null"; + + ## execute the command. + local *FD; + if (! open(FD, $cmd)) { + printf STDERR "$program: cannot execute command %s.\n", $cmd; + + } elsif ($stdin && (! print FD "$stdin\n")) { + printf STDERR "$program: failed writting to %s.\n", $cmd; + close(FD); + + } elsif (! close(FD)) { + printf STDERR "$program: failed closing %s.($@)\n", $cmd; + + } elsif (opt('exec') && $?) { + printf STDERR "$program: failed %s. ($@)\n", $cmd; + + } else { + $ok = 1; + } + return $ok; +} +sub logger { + if (opt('syslog') && opt('facility') && opt('priority')) { + my $facility = opt('facility'); + my $priority = opt('priority'); + return pipecmd("logger -p$facility.$priority -t${program}\[$$\]", @_); + } + return 1; +} +sub sendmail { + my $recipients = opt('mail'); + + if (opt('mail-failure') && ($result ne 'OK')) { + $recipients = opt('mail-failure'); + } + if ($msgs && $recipients && $msgs ne $last_msgs) { + pipecmd("sendmail -oi $recipients", + "To: $recipients", + "Subject: status report from $program\@$hostname", + "\r\n", + $msgs, + "", + "regards,", + " $program\@$hostname (version $version)" + ); + } + $last_msgs = $msgs; + $msgs = ''; +} +###################################################################### +## split_by_comma +## merge +## default +## minimum +## opt +###################################################################### +sub split_by_comma { + my $string = shift; + + return split /\s*[, ]\s*/, $string if defined $string; + return (); +} +sub merge { + my %merged = (); + foreach my $h (@_) { + foreach my $k (keys %$h) { + $merged{$k} = $h->{$k} unless exists $merged{$k}; + } + } + return \%merged; +} +sub default { + my $v = shift; + return $variables{'merged'}{$v}{'default'}; +} +sub minimum { + my $v = shift; + return $variables{'merged'}{$v}{'minimum'}; +} +sub opt { + my $v = shift; + return $opt{$v} if defined $opt{$v}; + return $globals{$v} if defined $globals{$v}; + return default($v) if defined default($v); + return undef; +} +sub min { + my $min = shift; + foreach my $arg (@_) { + $min = $arg if $arg < $min; + } + return $min; +} +sub max { + my $max = shift; + foreach my $arg (@_) { + $max = $arg if $arg > $max; + } + return $max; +} +###################################################################### +## define +###################################################################### +sub define { + foreach (@_) { + return $_ if defined $_; + } + return undef; +} +###################################################################### +## ynu +###################################################################### +sub ynu { + my ($value, $yes, $no, $undef) = @_; + + return $no if !defined($value) || !$value; + return $yes if $value eq '1'; + foreach (qw(yes true)) { + return $yes if $_ =~ /^$value/i; + } + foreach (qw(no false)) { + return $no if $_ =~ /^$value/i; + } + return $undef; +} +###################################################################### +## msg +## debug +## warning +## fatal +###################################################################### +sub _msg { + my $log = shift; + my $prefix = shift; + my $format = shift; + my $buffer = sprintf $format, @_; + chomp($buffer); + + $prefix = sprintf "%-9s ", $prefix if $prefix; + if ($file) { + $prefix .= "file $file"; + $prefix .= ", line $lineno" if $lineno; + $prefix .= ": "; + } + if ($prefix) { + $buffer = "$prefix$buffer"; + $buffer =~ s/\n/\n$prefix /g; + } + $buffer .= "\n"; + print $buffer; + + $msgs .= $buffer if $log; + logger($buffer) if $log; + +} +sub msg { _msg(0, '', @_); } +sub verbose { _msg(1, @_) if opt('verbose'); } +sub info { _msg(1, 'INFO:', @_) if opt('verbose'); } +sub debug { _msg(0, 'DEBUG:', @_) if opt('debug'); } +sub debug2 { _msg(0, 'DEBUG:', @_) if opt('debug') && opt('verbose');} +sub warning { _msg(1, 'WARNING:', @_); } +sub fatal { _msg(1, 'FATAL:', @_); sendmail(); exit(1); } +sub success { _msg(1, 'SUCCESS:', @_); } +sub failed { _msg(1, 'FAILED:', @_); $result = 'FAILED'; } +sub prettytime { return scalar(localtime(shift)); } + +sub prettyinterval { + my $interval = shift; + use integer; + my $s = $interval % 60; $interval /= 60; + my $m = $interval % 60; $interval /= 60; + my $h = $interval % 24; $interval /= 24; + my $d = $interval; + + my $string = ""; + $string .= "$d day" if $d; + $string .= "s" if $d > 1; + $string .= ", " if $string && $h; + $string .= "$h hour" if $h; + $string .= "s" if $h > 1; + $string .= ", " if $string && $m; + $string .= "$m minute" if $m; + $string .= "s" if $m > 1; + $string .= ", " if $string && $s; + $string .= "$s second" if $s; + $string .= "s" if $s > 1; + return $string; +} +sub interval { + my $value = shift; + if ($value =~ /^(\d+)(seconds|s)/i) { + $value = $1; + } elsif ($value =~ /^(\d+)(minutes|m)/i) { + $value = $1 * 60; + } elsif ($value =~ /^(\d+)(hours|h)/i) { + $value = $1 * 60*60; + } elsif ($value =~ /^(\d+)(days|d)/i) { + $value = $1 * 60*60*24; + } elsif ($value !~ /^\d+$/) { + $value = undef; + } + return $value; +} +sub interval_expired { + my ($host, $time, $interval) = @_; + + return 1 if !exists $cache{$host}; + return 1 if !exists $cache{$host}{$time} || !$cache{$host}{$time}; + return 1 if !exists $config{$host}{$interval} || !$config{$host}{$interval}; + + return $now > ($cache{$host}{$time} + $config{$host}{$interval}); +} + + + +###################################################################### +## check_value +###################################################################### +sub check_value { + my ($value, $def) = @_; + my $type = $def->{'type'}; + my $min = $def->{'minimum'}; + my $required = $def->{'required'}; + + if (!defined $value && !$required) { + ; + + } elsif ($type eq T_DELAY) { + $value = interval($value); + $value = $min if defined($value) && defined($min) && $value < $min; + + } elsif ($type eq T_NUMBER) { + return undef if $value !~ /^\d+$/; + $value = $min if defined($min) && $value < $min; + + } elsif ($type eq T_BOOL) { + if ($value =~ /^y(es)?$|^t(true)?$|^1$/i) { + $value = 1; + } elsif ($value =~ /^n(o)?$|^f(alse)?$|^0$/i) { + $value = 0; + } else { + return undef; + } + } elsif ($type eq T_FQDN || $type eq T_OFQDN && $value ne '') { + $value = lc $value; + return undef if $value !~ /[^.]\.[^.]/; + + } elsif ($type eq T_FQDNP) { + $value = lc $value; + return undef if $value !~ /[^.]\.[^.].*(:\d+)?$/; + + } elsif ($type eq T_PROTO) { + $value = lc $value; + return undef if ! exists $services{$value}; + + } elsif ($type eq T_USE) { + $value = lc $value; + return undef if ! exists $ip_strategies{$value}; + + } elsif ($type eq T_FILE) { + return undef if $value eq ""; + + } elsif ($type eq T_IF) { + return undef if $value !~ /^[a-z0-9:_-]+$/; + + } elsif ($type eq T_PROG) { + return undef if $value eq ""; + + } elsif ($type eq T_LOGIN) { + return undef if $value eq ""; + +# } elsif ($type eq T_PASSWD) { +# return undef if $value =~ /:/; + + } elsif ($type eq T_IP) { + return undef if $value !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + } + return $value; +} +###################################################################### +## encode_base64 - from MIME::Base64 +###################################################################### +sub encode_base64 ($;$) { + my $res = ''; + my $eol = $_[1]; + $eol = "\n" unless defined $eol; + pos($_[0]) = 0; # ensure start at the beginning + while ($_[0] =~ /(.{1,45})/gs) { + $res .= substr(pack('u', $1), 1); + chop($res); + } + $res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs + + # fix padding at the end + my $padding = (3 - length($_[0]) % 3) % 3; + $res =~ s/.{$padding}$/'=' x $padding/e if $padding; + + # break encoded string into lines of no more than 76 characters each + if (length $eol) { + $res =~ s/(.{1,76})/$1$eol/g; + } + $res; +} +###################################################################### +## geturl +###################################################################### +sub geturl { + my $proxy = shift || ''; + my $url = shift || ''; + my $login = shift || ''; + my $password = shift || ''; + 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%^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 = $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"; + $request .= "Host: $server\n"; + + my $auth = encode_base64("${login}:${password}"); + $request .= "Authorization: Basic $auth" if $login || $password; + $request .= "User-Agent: ${program}/${version}\n"; + $request .= "Connection: close\n"; + $request .= "\n"; + + ## make sure newlines are for some pedantic proxy servers + ($rq = $request) =~ s/\n/\r\n/g; + + # local $^W = 0; + $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); + if (! opt('exec')) { + debug("skipped network connection"); + verbose("SENDING:", $request); + } elsif ($use_ssl) { + $sd = IO::Socket::SSL->new(PeerAddr => $peer, PeerPort => $port, Proto => 'tcp', MultiHomed => 1); + 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); + defined $sd or warning("cannot connect to $peer:$port socket: $@"); + } + + if (defined $sd) { + ## send the request to the http server + verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); + verbose("SENDING:", $request); + + $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); + my $result = syswrite $sd, $rq; + if ($result != length($rq)) { + warning("cannot send to $peer:$port ($!)."); + + } else { + my $timeout = 0; + local $SIG{'ALRM'} = sub { $timeout = 1; }; + + $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); + alarm(opt('timeout')) if opt('timeout') > 0; + while (!$timeout && ($_ = <$sd>)) { + $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); + verbose("RECEIVE:", "%s", define($_, "")); + $reply .= $_ if defined $_; + } + if (opt('timeout') > 0) { + alarm(0); + } + close($sd); + if ($timeout) { + warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); + $reply = ''; + } + $reply = '' if !defined $reply; + } + } + $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); + + ## during testing simulate reading the URL + if (opt('test')) { + my $filename = "$server/$url"; + $filename =~ s|/|%2F|g; + if (opt('exec')) { + $reply = save_file("${savedir}$filename", $reply, 'unique'); + } else { + $reply = load_file("${savedir}$filename"); + } + } + + $reply =~ s/\r//g if defined $reply; + return $reply; +} +###################################################################### +## get_ip +###################################################################### +sub get_ip { + my $use = lc shift; + my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); + $arg = '' unless $arg; + + if ($use eq 'ip') { + $ip = opt('ip'); + $arg = 'ip'; + + } elsif ($use eq 'if') { + $skip = opt('if-skip') || ''; + $reply = `ifconfig $arg 2> /dev/null`; + $reply = '' if $?; + + } elsif ($use eq 'cmd') { + if ($arg) { + $skip = opt('cmd-skip') || ''; + $reply = `$arg`; + $reply = '' if $?; + } + + } elsif ($use eq 'web') { + $url = opt('web') || ''; + $skip = opt('web-skip') || ''; + + if (exists $builtinweb{$url}) { + $skip = $builtinweb{$url}->{'skip'} unless $skip; + $url = $builtinweb{$url}->{'url'}; + } + $arg = $url; + + if ($url) { + $reply = geturl(opt('proxy'), $url) || ''; + } + + } elsif (($use eq 'cisco')) { + # Stuff added to support Cisco router ip http daemon + # User fw-login should only have level 1 access to prevent + # password theft. This is pretty harmless. + my $queryif = opt('if'); + $skip = opt('fw-skip') || ''; + + # Convert slashes to protected value "\/" + $queryif =~ s%\/%\\\/%g; + + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + + $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + $arg = $url; + + } else { + $url = opt('fw') || ''; + $skip = opt('fw-skip') || ''; + + if (exists $builtinfw{$use}) { + $skip = $builtinfw{$use}->{'skip'} unless $skip; + $url = "http://${url}" . $builtinfw{$use}->{'url'} unless $url =~ /\//; + } + $arg = $url; + + if ($url) { + $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + } + } + if (!defined $reply) { + $reply = ''; + } + if ($skip) { + $skip =~ s/ /\\s/is; + $reply =~ s/^.*?${skip}//is; + } + if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) { + $ip = $1; + } + if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) { + $ip = undef; + } + + debug("get_ip: using %s, %s reports %s", $use, $arg, define($ip, "")); + return $ip; +} + +###################################################################### +## group_hosts_by +###################################################################### +sub group_hosts_by { + my ($hosts, $attributes) = @_; + + my %groups = (); + foreach my $h (@$hosts) { + my @keys = @$attributes; + map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; + my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); + + push @{$groups{$sig}}, $h; + } + return %groups; +} +###################################################################### +## nic_examples +###################################################################### +sub nic_examples { + my $examples = ""; + my $separator = ""; + foreach my $s (sort keys %services) { + my $subr = $services{$s}{'examples'}; + my $example; + + if (defined($subr) && ($example = &$subr())) { + chomp($example); + $examples .= $example; + $examples .= "\n\n$separator"; + $separator = "\n"; + } + } + my $intro = < $now) { + warning("cannot update %s from %s to %s until after %s.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, + prettytime($cache{$host}{'wtime'}) + ); + + } elsif ($cache{$host}{'mtime'} && interval_expired($host, 'mtime', 'max-interval')) { + warning("forcing update of %s from %s to %s; %s since last update on %s.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, + prettyinterval($config{$host}{'max-interval'}), + prettytime($cache{$host}{'mtime'}) + ); + $update = 1; + + } elsif ($cache{$host}{'ip'} ne $ip) { + if (($cache{$host}{'status'} eq 'good') && !interval_expired($host, 'mtime', 'min-interval')) { + + warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), + $ip, + ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), + prettyinterval($config{$host}{'min-interval'}) + ) + if opt('verbose') || !define($cache{$host}{'warned-min-interval'}, 0); + + $cache{$host}{'warned-min-interval'} = $now; + + } elsif (($cache{$host}{'status'} ne 'good') && !interval_expired($host, 'atime', 'min-error-interval')) { + + warning("skipping update of %s from %s to %s.\nlast updated %s but last attempt on %s failed.\nWait at least %s between update attempts.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), + $ip, + ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), + ($cache{$host}{'atime'} ? prettytime($cache{$host}{'atime'}) : ''), + prettyinterval($config{$host}{'min-error-interval'}) + ) + if opt('verbose') || !define($cache{$host}{'warned-min-error-interval'}, 0); + + $cache{$host}{'warned-min-error-interval'} = $now; + + } else { + $update = 1; + } + + } elsif (defined($sub) && &$sub($host)) { + $update = 1; + + } else { + success("%s: skipped: IP address was already set to %s.", $host, $ip) + if opt('verbose'); + } + $config{$host}{'status'} = define($cache{$host}{'status'},''); + $config{$host}{'update'} = $update; + if ($update) { + $config{$host}{'status'} = 'noconnect'; + $config{$host}{'atime'} = $now; + $config{$host}{'wtime'} = 0; + $config{$host}{'warned-min-interval'} = 0; + $config{$host}{'warned-min-error-interval'} = 0; + + delete $cache{$host}{'warned-min-interval'}; + delete $cache{$host}{'warned-min-error-interval'}; + } + + return $update; +} +###################################################################### +## header_ok +###################################################################### +sub header_ok { + my ($host, $line) = @_; + my $ok = 0; + + if ($line =~ m%^s*HTTP/1.*\s+(\d+)%i) { + my $result = $1; + + if ($result eq '200') { + $ok = 1; + + } elsif ($result eq '401') { + failed("updating %s: authorization failed (%s)", $host, $line); + } + + } else { + failed("updating %s: unexpected line (%s)", $host, $line); + } + return $ok; +} +###################################################################### +## nic_dyndns1_examples +###################################################################### +sub nic_dyndns1_examples { + return <\s*(.*)\s*%i; + $return_code = $1 if $line =~ m%^return\s+code\s*:\s*(.*)\s*$%i; + $error_code = $1 if $line =~ m%^error\s+code\s*:\s*(.*)\s*$%i; + } + + if ($return_code ne 'NOERROR' || $error_code ne 'NOERROR' || !$title) { + $config{$h}{'status'} = 'failed'; + $title = "incomplete response from $config{$h}{server}" unless $title; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: %s", $h, $title); + + } else { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: %s: IP address set to %s (%s)", $h, $return_code, $ip, $title); + } + } +} +###################################################################### +## nic_dyndns2_updateable +###################################################################### +sub nic_dyndns2_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { + info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); + $update = 1; + + } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { + + info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); + $update = 1; + + } + return $update; +} +###################################################################### +## nic_dyndns2_examples +###################################################################### +sub nic_dyndns2_examples { + return < 'Bad authorization (username or password)', + 'badsys' => 'The system parameter given was not valid', + + 'notfqdn' => 'A Fully-Qualified Domain Name was not provided', + 'nohost' => 'The hostname specified does not exist in the database', + '!yours' => 'The hostname specified exists, but not under the username currently being used', + '!donator' => 'The offline setting was set, when the user is not a donator', + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', + 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', + + 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + ## Select the DynDNS system to update + my $url = "http://$config{$h}{'server'}/nic/update?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; +# warning("updating %s: 'custom' and 'offline' may not be used together. ('offline' ignored)", $hosts) +# if $config{$h}{'offline'}; + $url .= 'custom'; + + } elsif ($config{$h}{'static'}) { +# warning("updating %s: 'static' and 'offline' may not be used together. ('offline' ignored)", $hosts) +# if $config{$h}{'offline'}; + $url .= 'statdns'; + + } else { + $url .= 'dyndns'; + } + + $url .= "&hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + ## some args are not valid for a custom domain. + $url .= "&wildcard=ON" if ynu($config{$h}{'wildcard'}, 1, 0, 0); + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status, $ip) = split / /, lc $line; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### +## nic_concont_examples +###################################################################### +sub nic_concont_examples { + return </i, @reply) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } +} +###################################################################### +## nic_zoneedit1_examples +###################################################################### +sub nic_zoneedit1_examples { + return < +# +# +###################################################################### +sub nic_zoneedit1_update { + debug("\nnic_zoneedit1_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server) ]); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + my $url = ''; + $url .= "http://$config{$h}{'server'}/auth/dynamic.html"; + $url .= "?host=$hosts"; + $url .= "&dnsto=$ip" if $ip; + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + foreach my $line (@reply) { + if ($line =~ /^[^<]*<(SUCCESS|ERROR)\s+([^>]+)>(.*)/) { + my ($status, $assignments, $rest) = ($1, $2, $3); + my ($left, %var) = parse_assignments($assignments); + + if (keys %var) { + my ($status_code, $status_text, $status_ip) = ('999', '', $ip); + $status_code = $var{'CODE'} if exists $var{'CODE'}; + $status_text = $var{'TEXT'} if exists $var{'TEXT'}; + $status_ip = $var{'IP'} if exists $var{'IP'}; + + if ($status eq 'SUCCESS' || ($status eq 'ERROR' && $var{'CODE'} eq '707')) { + $config{$h}{'ip'} = $status_ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + success("updating %s: IP address set to %s (%s: %s)", $h, $ip, $status_code, $status_text); + + } else { + $config{$h}{'status'} = 'failed'; + failed("updating %s: %s: %s", $h, $status_code, $status_text); + } + shift @hosts; + $h = $hosts[0]; + $hosts = join(',', @hosts); + } + $line = $rest; + redo if $line; + } + } + failed("updating %s: no response from %s", $hosts, $config{$h}{'server'}) + if @hosts; + } +} +###################################################################### +## nic_easydns_updateable +###################################################################### +sub nic_easydns_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { + info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); + $update = 1; + + } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { + + info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); + $update = 1; + + } + return $update; +} +###################################################################### +## nic_easydns_examples +###################################################################### +sub nic_easydns_examples { + return < [ $_ ] } @_; + + my %errors = ( + 'NOACCESS' => 'Authentication failed. This happens if the username/password OR host or domain are wrong.', + 'NOSERVICE'=> 'Dynamic DNS is not turned on for this domain.', + 'ILLEGAL' => 'Client sent data that is not allowed in a dynamic DNS update.', + 'TOOSOON' => 'Update frequency is too short.', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' + + my $url; + $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; + $url .= "&host_id=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status) = $line =~ /^(\S*)\b.*/; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'NOERROR') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif ($status =~ /TOOSOON/) { + ## make sure we wait at least a little + my ($wait, $units) = (5, 'm'); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + failed("updating %s: %s: %s", $h, $line, $errors{$status}); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + last; + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### + +###################################################################### +## nic_dnspark_updateable +###################################################################### +sub nic_dnspark_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && ($config{$host}{'mxpri'} ne $cache{$host}{'mxpri'})) { + info("forcing updating %s because 'mxpri' has changed to %s.", $host, $config{$host}{'mxpri'}); + $update = 1; + } + return $update; +} +###################################################################### +## nic_dnspark_examples +###################################################################### +sub nic_dnspark_examples { + return < [ $_ ] } @_; + + my %errors = ( + 'nochange' => 'No changes made to the hostname(s). Continual updates with no changes lead to blocked clients.', + 'nofqdn' => 'No valid FQDN (fully qualified domain name) was specified', + 'nohost'=> 'An invalid hostname was specified. This due to the fact the hostname has not been created in the system. Creating new host names via clients is not supported.', + 'abuse' => 'The hostname specified has been blocked for abuse.', + 'unauth' => 'The username specified is not authorized to update this hostname and domain.', + 'blocked' => 'The dynamic update client (specified by the user-agent) has been blocked from the system.', + 'notdyn' => 'The hostname specified has not been marked as a dynamic host. Hosts must be marked as dynamic in the system in order to be updated via clients. This prevents unwanted or accidental updates.', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + #'http://www.dnspark.com:80/visitors/update.html?myip=10.20.30.40&hostname=test.burry.ca' + + my $url; + $url = "http://$config{$h}{'server'}/visitors/update.html"; + $url .= "?hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&mxpri=" . $config{$h}{'mxpri'}; + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status) = $line =~ /^(\S*)\b.*/; + my $h = pop @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'ok') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif ($status =~ /TOOSOON/) { + ## make sure we wait at least a little + my ($wait, $units) = (5, 'm'); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + failed("updating %s: %s: %s", $h, $line, $errors{$status}); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + last; + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} + +###################################################################### + +###################################################################### +## nic_namecheap_examples +###################################################################### +sub nic_namecheap_examples { + return <0/i, @reply) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } +} + +###################################################################### + + +###################################################################### + +###################################################################### +## nic_sitelutions_examples +###################################################################### +sub nic_sitelutions_examples { + return </dev/null 2>&1 + ;; +esac diff --git a/sample-etc_dhcpc_dhcpcd-eth0.exe b/sample-etc_dhcpc_dhcpcd-eth0.exe new file mode 100644 index 0000000..437e92e --- /dev/null +++ b/sample-etc_dhcpc_dhcpcd-eth0.exe @@ -0,0 +1,20 @@ +#!/bin/sh +###################################################################### +## $Id$ +###################################################################### +PATH=/usr/sbin:${PATH} + +## update the DNS server unless the IP address is a private address +## that may be used as an internal LAN address. This may be true if +## other interfaces are assigned private addresses from internal +## DHCP server. + +case "$1" in +10.*) ;; +172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; +192.168.*) ;; +*) + logger -t dhcpcd IP address changed to $1 + ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 + ;; +esac diff --git a/sample-etc_ppp_ip-up.local b/sample-etc_ppp_ip-up.local new file mode 100644 index 0000000..b7a9025 --- /dev/null +++ b/sample-etc_ppp_ip-up.local @@ -0,0 +1,40 @@ +#!/bin/sh +###################################################################### +## $Id$ +###################################################################### +## +## On my host, pppd invokes this script with args: +## /etc/ppp/ip-up.local ppp0 /dev/pts/1 115200 192.168.2.1 192.168.2.3 +## +## From the manual page for my pppd, these aguments are: +## scriptname interface-name tty-device speed local-IP-address remote-IP-address ipparam +## +## Some people have reported that their pppd returns their +## local-IP-address as $3. If that's also the case for you, +## you may need to change the $4 below to $3. This may not +## be necessary if your pppd also passes the local-ip-address +## in the environment as either PPP_LOCAL or IPLOCAL. +## +###################################################################### +PATH=/usr/sbin:${PATH} +IP= +IP=${IP:-$PPP_LOCAL} +IP=${IP:-$IPLOCAL} +IP=${IP:-$4} + +## update the DNS server unless the IP address is a private address +## that may be used as an internal LAN address (or PPtP tunnel). + +logger -t ddclient $0 $* +case "$IP" in +10.*) ;; +172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; +192.168.*) ;; +"") logger -t ddclient No local IP given so cannot update + ;; +*) ( + sleep 5 + ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 + ) & + ;; +esac diff --git a/sample-etc_rc.d_init.d_ddclient b/sample-etc_rc.d_init.d_ddclient new file mode 100755 index 0000000..0cc68d0 --- /dev/null +++ b/sample-etc_rc.d_init.d_ddclient @@ -0,0 +1,54 @@ +#!/bin/sh +# +# $Id$ +# +# ddclient This shell script takes care of starting and stopping +# ddclient. +# +# chkconfig: 2345 65 35 +# description: ddclient provides support for updating dynamic DNS services. + +[ -f /etc/ddclient/ddclient.conf ] || exit 0 + +PATH=/usr/sbin:${PATH} +COLUMNS=9999 +export PATH COLUMNS + +program=ddclient +# See how we were called. +case "$1" in + start) + # Start daemon. + echo -n "Starting ddclient: " + ddclient -daemon 300 + echo + ;; + stop) + # Stop daemon. + echo -n "Shutting down ddclient: " + kill `ps -aef | awk '/[ \/]perl.*ddclient/ { print $2}'` + echo + ;; + restart) + $0 stop + $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" + fi + ;; + *) + echo "Usage: ddclient {start|stop|restart|status}" + exit 1 +esac + +exit 0 + diff --git a/sample-etc_rc.d_init.d_ddclient.lsb b/sample-etc_rc.d_init.d_ddclient.lsb new file mode 100755 index 0000000..01f06e1 --- /dev/null +++ b/sample-etc_rc.d_init.d_ddclient.lsb @@ -0,0 +1,66 @@ +#!/bin/sh +# +# ddclient This shell script takes care of starting and stopping +# ddclient. +# +# chkconfig: 2345 65 35 +# description: ddclient provides support for updating dynamic DNS services. +# +# Above is for RedHat and now the LSB part +### BEGIN INIT INFO +# Provides: ddclient +# Required-Start: $syslog $remote_fs +# Should-Start: $time ypbind sendmail +# Required-Stop: $syslog $remote_fs +# Should-Stop: $time ypbind sendmail +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: ddclient provides support for updating dynamic DNS services +# Description: ddclient is a Perl client used to update dynamic DNS +# entries for accounts on many dynamic DNS services and +# can be used on many types of firewalls +### END INIT INFO +# +# $Id$ +# +### + +[ -f /etc/ddclient/ddclient.conf ] || exit 0 + +DDCLIENT_BIN=/usr/sbin/ddclient + +# +# LSB Standard (SuSE,RedHat,...) +# +if [ -f /lib/lsb/init-functions ] ; then + . /lib/lsb/init-functions +fi + +# See how we were called. +case "$1" in + start) + echo -n "Starting ddclient " + start_daemon $DDCLIENT_BIN -daemon 300 + rc_status -v + ;; + stop) + echo -n "Shutting down ddclient " + killproc -TERM `basename $DDCLIENT_BIN` + rc_status -v + ;; + restart) + $0 stop + $0 start + rc_status + ;; + status) + echo -n "Checking for service ddclient " + checkproc `basename $DDCLIENT_BIN`w + rc_status -v + ;; + *) + echo "Usage: ddclient {start|stop|restart|status}" + exit 1 +esac + +exit 0 diff --git a/sample-etc_rc.d_init.d_ddclient.redhat b/sample-etc_rc.d_init.d_ddclient.redhat new file mode 100755 index 0000000..a81b8cb --- /dev/null +++ b/sample-etc_rc.d_init.d_ddclient.redhat @@ -0,0 +1,41 @@ +#!/bin/sh +# $Id$ +# ddclient This shell script takes care of starting and stopping +# ddclient. +# +# chkconfig: 2345 65 35 +# description: ddclient provides support for updating dynamic DNS services. + +[ -f /etc/ddclient/ddclient.conf ] || exit 0 + +. /etc/rc.d/init.d/functions + +# See how we were called. +case "$1" in + start) + # Start daemon. + echo -n "Starting ddclient: " + touch /var/lock/subsys/ddclient + daemon ddclient -daemon 300 + echo + ;; + stop) + # Stop daemon. + echo -n "Shutting down ddclient: " + killproc ddclient + echo + rm -f /var/lock/subsys/ddclient + ;; + restart) + $0 stop + $0 start + ;; + status) + status ddclient + ;; + *) + echo "Usage: ddclient {start|stop|restart|status}" + exit 1 +esac + +exit 0 From a487e35755f4637f7e66a209e561c01737935180 Mon Sep 17 00:00:00 2001 From: ddfisher Date: Sat, 10 Jun 2006 01:47:41 +0000 Subject: [PATCH 002/231] See Changelog git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/svn@3 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 13 ++++++++++ ddclient | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 84 insertions(+), 5 deletions(-) diff --git a/Changelog b/Changelog index b1eeb93..7913842 100644 --- a/Changelog +++ b/Changelog @@ -6,6 +6,19 @@ cvs 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 +- added support for netgear-rp614 +- added support for watchguard-edge-x +- added support for dlink-524 +- added support for rtp300 +- added support for netgear-wpn824 +- added support for linksys-wcg200 +- added support for netgear-dg834g +- added support for netgear-wgt624 +- added support for sveasoft +- added support for smc-barricade-7004vbr +- added support for sitecom-dc202 +- fixed the error of stripping out '#' in the middle of password, bug #1465932 3.6.7 - modified sample-etc_rc.d_init.d_ddclient.lsb (bug #1231930) diff --git a/ddclient b/ddclient index 4e1af65..9d43731 100755 --- a/ddclient +++ b/ddclient @@ -1,5 +1,5 @@ -#!/usr/bin/perl -w #!/usr/local/bin/perl -w +#!/usr/bin/perl -w ###################################################################### # $Id$ # @@ -198,7 +198,71 @@ my %builtinfw = ( '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', + }, + '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}", @@ -814,10 +878,12 @@ sub _read_config { last; } warning("whitespace follows the \\ at the end-of-line.\nIf you meant to have a line continuation, remove the trailing whitespace.") - if /\\\s+$/; - $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$_"; From 179303adc95ac855298c44997c9e42eda7e83a8d Mon Sep 17 00:00:00 2001 From: ddfisher Date: Sat, 10 Jun 2006 01:55:14 +0000 Subject: [PATCH 003/231] updated changelog git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/svn@4 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Changelog b/Changelog index 7913842..ed9fe44 100644 --- a/Changelog +++ b/Changelog @@ -6,18 +6,18 @@ cvs 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 -- added support for netgear-rp614 -- added support for watchguard-edge-x -- added support for dlink-524 +- 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 -- added support for netgear-dg834g -- added support for netgear-wgt624 -- added support for sveasoft -- added support for smc-barricade-7004vbr -- added support for sitecom-dc202 +- 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 3.6.7 From 94c30b343461bb1e91e691057e62d678e3d1db6e Mon Sep 17 00:00:00 2001 From: ddfisher Date: Sun, 11 Jun 2006 08:30:49 +0000 Subject: [PATCH 004/231] see Changelog git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/svn@5 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 4 ++ ddclient | 50 ++++++++++++++++----- sample-etc_rc.d_init.d_ddclient | 77 ++++++++++++++++++++++++--------- 3 files changed, 99 insertions(+), 32 deletions(-) diff --git a/Changelog b/Changelog index ed9fe44..5496364 100644 --- a/Changelog +++ b/Changelog @@ -19,6 +19,10 @@ cvs - 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) diff --git a/ddclient b/ddclient index 9d43731..720e752 100755 --- a/ddclient +++ b/ddclient @@ -239,13 +239,13 @@ my %builtinfw = ( 'skip' => 'WAN.IP.*?Address', }, 'netgear-dg834g' => { - 'name 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' + 'url' => '/RST_st_dhcp.htm', 'skip' => 'IP Address', }, 'sveasoft' => { @@ -877,7 +877,9 @@ sub _read_config { 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+$/) { + warning("whitespace follows the \\ at the end-of-line.\nIf you meant to have a line continuation, remove the trailing whitespace."); + } $content .= "$_\n" unless /^#/; # lines contain passwords are a special case, we don't want to @@ -906,12 +908,19 @@ sub _read_config { 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}"; @@ -1679,11 +1688,23 @@ sub geturl { debug("skipped network connection"); verbose("SENDING:", $request); } elsif ($use_ssl) { - $sd = IO::Socket::SSL->new(PeerAddr => $peer, PeerPort => $port, Proto => 'tcp', MultiHomed => 1); - defined $sd or warning("cannot connect to $peer:$port socket: $@ " . IO::Socket::SSL::errstr()); + $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); - defined $sd or warning("cannot connect to $peer:$port socket: $@"); + $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) { @@ -3104,3 +3125,8 @@ sub nic_sitelutions_update { ###################################################################### # vim: ai ts=4 sw=4 tw=78 : + + +__END__ + + diff --git a/sample-etc_rc.d_init.d_ddclient b/sample-etc_rc.d_init.d_ddclient index 0cc68d0..ab6faf6 100755 --- a/sample-etc_rc.d_init.d_ddclient +++ b/sample-etc_rc.d_init.d_ddclient @@ -1,6 +1,4 @@ -#!/bin/sh -# -# $Id$ +#!/bin/bash # # ddclient This shell script takes care of starting and stopping # ddclient. @@ -8,25 +6,61 @@ # chkconfig: 2345 65 35 # description: ddclient provides support for updating dynamic DNS services. -[ -f /etc/ddclient/ddclient.conf ] || exit 0 - -PATH=/usr/sbin:${PATH} -COLUMNS=9999 -export PATH COLUMNS - +CONF=/etc/ddclient/ddclient.conf program=ddclient + +[ -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 + # 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) @@ -34,15 +68,18 @@ case "$1" in $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 ;; *) From 3db9527a8ddee989dfb245474caad93a92196c44 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 14 Jun 2006 19:28:49 +0000 Subject: [PATCH 005/231] Changed the order of perl and update of README.ssl git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/svn@6 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.ssl | 1 + ddclient | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.ssl b/README.ssl index 52a8d51..70f9ca0 100644 --- a/README.ssl +++ b/README.ssl @@ -5,5 +5,6 @@ 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 --git a/ddclient b/ddclient index 720e752..a1996a8 100755 --- a/ddclient +++ b/ddclient @@ -1,5 +1,5 @@ -#!/usr/local/bin/perl -w #!/usr/bin/perl -w +#!/usr/local/bin/perl -w ###################################################################### # $Id$ # From 787b76f4a3b3e98b1ec5c857f6859bc9b5af9400 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 14 Jun 2006 19:51:39 +0000 Subject: [PATCH 006/231] Created trunk and tags, moved directories to it git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@8 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/ddclient.css | 299 ++ html/index.php | 809 +++++ html/sinorca-print.css | 136 + html/sinorca-screen-alt.css | 292 ++ html/sinorca-screen.css | 289 ++ svn/COPYING | 340 +++ svn/COPYRIGHT | 19 + svn/Changelog | 258 ++ svn/README | 173 ++ svn/README.cisco | 35 + svn/README.ssl | 10 + svn/ddclient | 3132 ++++++++++++++++++++ svn/sample-etc_cron.d_ddclient | 17 + svn/sample-etc_ddclient.conf | 160 + svn/sample-etc_dhclient-exit-hooks | 17 + svn/sample-etc_dhcpc_dhcpcd-eth0.exe | 20 + svn/sample-etc_ppp_ip-up.local | 40 + svn/sample-etc_rc.d_init.d_ddclient | 91 + svn/sample-etc_rc.d_init.d_ddclient.lsb | 66 + svn/sample-etc_rc.d_init.d_ddclient.redhat | 41 + 20 files changed, 6244 insertions(+) create mode 100644 html/ddclient.css create mode 100644 html/index.php create mode 100644 html/sinorca-print.css create mode 100644 html/sinorca-screen-alt.css create mode 100644 html/sinorca-screen.css create mode 100644 svn/COPYING create mode 100644 svn/COPYRIGHT create mode 100644 svn/Changelog create mode 100644 svn/README create mode 100644 svn/README.cisco create mode 100644 svn/README.ssl create mode 100755 svn/ddclient create mode 100644 svn/sample-etc_cron.d_ddclient create mode 100644 svn/sample-etc_ddclient.conf create mode 100644 svn/sample-etc_dhclient-exit-hooks create mode 100644 svn/sample-etc_dhcpc_dhcpcd-eth0.exe create mode 100644 svn/sample-etc_ppp_ip-up.local create mode 100755 svn/sample-etc_rc.d_init.d_ddclient create mode 100755 svn/sample-etc_rc.d_init.d_ddclient.lsb create mode 100755 svn/sample-etc_rc.d_init.d_ddclient.redhat diff --git a/html/ddclient.css b/html/ddclient.css new file mode 100644 index 0000000..bcd68be --- /dev/null +++ b/html/ddclient.css @@ -0,0 +1,299 @@ +/************************************* + * TITLE: Sinorca Screen Stylesheet * + * URI : sinorca/sinorca-screen.css * + * MODIF: 2003-Apr-30 19:31 +0800 * + *************************************/ + + +/* ##### Common Styles ##### */ + +body { + color: black; + background-color: rgb(153,153,153); + font-family: verdana, helvetica, arial, sans-serif; + font-size: 71%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + +html > body { + font-size: 8.5pt; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +.doNotDisplay { + display: none; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + + +/* ##### Header ##### */ + +.superHeader { + color: white; + background-color: rgb(100,135,220); + height: 2em; +} + +.superHeader a { + color: white; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + color: rgb(255,255,102); + background-color: rgb(0,0,255); +} + +.headerTitle { + font-size: 337%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} + +.subHeader { + color: white; + background-color: rgb(0,51,153); + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: white; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + color: rgb(253,160,91); + background-color: transparent; +} + + +/* ##### Side Bar ##### */ + +#side-bar { + width: 15em; + float: left; + clear: left; + border-right: 1px solid rgb(153,153,153); +} + +#side-bar div { + border-bottom: 1px solid rgb(153,153,153); +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2.5mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 1.1em 0; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a, .thisPage { + color: rgb(51,51,204); + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.75em 1ex 0.75em 5mm; + display: block; +} + +.thisPage { + color: black; + background-color: white; + padding-left: 4mm; + border-top: 1px solid rgb(153,153,153); + border-bottom: 1px solid rgb(153,153,153); +} + +#side-bar a:hover { + color: white; + background-color: rgb(0,0,255); + text-decoration: none; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: rgb(204,204,204) +} + + +/* ##### Main Copy ##### */ + +#main-copy { + color: black; + background-color: white; + background-color: rgb(255,255,204); + + + text-align: justify; + line-height: 1.5em; + margin: 0 0 0 15em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid rgb(153,153,153); +} + +#main-copy .code { +border: 1px solid; +background: white; + padding: 0.5mm 0.5mm 0.5mm 5mm; +} + +#main-copy p { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +#main-copy a { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: underline; +} + +#main-copy a:hover { + text-decoration: none; +} + +#main-copy h1 { + color: white; + background-color: rgb(255,0,0); + + font-size: 100%; + font-weight: bold; + margin: 3em 0 0 0; + padding: 0.5ex 0 0.5ex 1ex; +} + +#main-copy .topOfPage { + color: white; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 2.5ex 1ex 0 0; /* For MSIE */ + padding: 0; + float: right; +} + +#main-copy > .topOfPage { + margin: 2.75ex 1ex 0 0; /* For fully standards-compliant user agents */ +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* ##### Footer ##### */ + +#footer { + color: rgb(255,255,151); + background-color: rgb(0,0,255); + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; +} + +#footer .left { + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: white; + background-color: transparent; + text-decoration: underline; +} + +#footer a:hover { + text-decoration: none; +} \ No newline at end of file diff --git a/html/index.php b/html/index.php new file mode 100644 index 0000000..dc04481 --- /dev/null +++ b/html/index.php @@ -0,0 +1,809 @@ + +'. + 'the ddclient project page on sourceforge'; +$link['download'] = ''. + 'sourceforge'."\n"; +$link['developers'] = "developers for ddclient on sourceforge"; + +// pages information; should be in a database + +// main +$pages[0]['nr'] = 0; +$pages[0]['title'] = "home"; +// documentation +$pages[1]['nr'] = 1; +$pages[1]['title'] = "usage"; + +$pages[2]['nr'] = 2; +$pages[2]['title'] = "supported protocols"; + +$pages[3]['nr'] = 3; +$pages[3]['title'] = "supported routers"; + +$curpage = isset($_GET['page'])?$_GET['page']:0; +$titleextra = $pages[$curpage]['title']; +$page = $pages[$curpage]['nr']; + +// filling the page; should be in a dbase to +if ($page == 0 ) { // home page +// Introduction +$text['id'] = "intro"; +$text['title'] = "Introduction"; +$text['menu'] = "Introduction"; +$text['body'] = + "

" . + "Ddclient is a Perl client used to update dynamic DNS entries for accounts " . + "on Dynamic DNS Network Services' free DNS service. It was origanally " . + "written by Paul Burry and is now maintaned by ".$link['developers'].". " . + "It has the capability to update more than only " . + "dyndns and it can fetch your WAN-ipaddress on a few different ways. Check the " . + "configuration pages to find how to do this." . + "

\n" . + "

\n" . + "According to cudeso.be:
" . + "DDclient is a small but full featured client requiring only Perl " . + "and no additional modules. It runs under most UNIX OSes and has " . + "been tested under GNU/Linux and FreeBSD. 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." . + "

"; +$main[] = $text; + +// install +$text['id'] = "install"; +$text['title'] = "How to install"; +$text['menu'] = "Quick Installation"; +$text['body'] = + "

\n +Ddclient doesn't have any automatic installation procedure. Get the tar-file +from " . $link['download'] . " and untar it. Copy the perl script to your +favorit location (ex. /usr/sbin) and create a /etc/ddclient/ddclient.conf +configuration file. +

+There are a few configuration examples provided which you can copy to +/etc/ddclient/ddclient.conf and modify. More info about the configuration +can be found on the usage page +

+A typical configuration like: +

+
+#
+# /etc/ddclient/ddclient.conf
+#
+protocol=dyndns2
+use=web
+login=mylogin
+password=mypassword
+myhost.dyndns.org
+
+
+

+

+You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" +and put it in your startup scripts. +

\n"; +$main[] = $text; + +// help part +$text['id'] = "help"; +$text['title'] = "Documentation and help"; +$text['menu'] = "Documentation"; +$text['body'] = " +

The documentation about the configuration has been splitted in three +sections. The usage page describes the most parts +of the configuration while the supported protocols +page describes the protocol-specific options. If you want to know how +to use ddclient with your router, check the +supported routers. +

+Debugging ddclient looks pretty hard but it isn't. First try to put \n". + "as less as necessary in your configuration. Try to run \n". + "`./ddclient -daemon=0 -noquiet -debug` and check the result. \n" . + "Try to add the features you need and check it again. Once \n". + "you're happy with the result, run it as a daemon.\n" . + "

\n" . + "

\n" . + "If this doesn't work for you, \n". + "there are a few places where you can look for help. If you need \n". + "any help in configuring ddclient, you could try ddclient --help. \n". + "It should give you all the possible configuration options so.\n" . + "

\n". + "

\n" . + "If you think your configuration is correct, but ddclient doesn't \n" . + "work as you expected, you can enable debug and verbose messages \n" . + "by running ddclient -daemon=0 -debug -verbose -noquiet.\n". + "

\n". + "

\n" . + "If this doesn't help for you, maybe \n" . + "\n" . + "the help forum on sourceforge can bring some help.\n" . + "I know the manual is not very clear, you have to read the example " . + "configurations included in the tar-file or you can run " . + ""ddclient --help" to get more help. " . + "If you lucky you can find some help on #ddclient on irc.freenode.net" . + "

\n" . + "

+More info about the ddclient project can be found on " . + $link['project'] . + "

"; +$main[] = $text; + + +} else if ($page == 1) { // documentation +// usage +$text['id'] = "introduction"; +$text['title'] = "Introduction"; +$text['menu'] = "intro"; +$text['body'] = + "

\n" . + "This page describes the configuration for ddclient. If you need\n". + "anymore info about supported routers or supported protocols, check the\n" . + "other pages. Other options are described here.\n" . + "\n" . + "

Normally you don't need many arguments when starting ddclient. " . + "You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" \n" . + "which should be enough for most configuration. You can put all the needed\n" . + "parameters in the configuration file.\n" . + "

\n" . + "

" . + "\n" . + "\n" . + "\n" . + "\n" . + "

\n" ; +$main[] = $text; + +$text['id'] = "usage"; +$text['title'] = "Usage"; +$text['menu'] = "usage"; +$text['body'] = + "usage: ddclient [options]
\n". + "options are:
\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "" . + "\n" . + + "\n" . + "\n" . + + "\n" . + "\n" . + + "\n" . + "\n" . + "\n" . + "\n" . + + "\n" . + "\n" . + + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
-daemon delay run as a daemon (default: 0).
-proxy host use 'host' as the HTTP proxy.
-server host update DNS information on 'host' (default: members.dyndns.org).
-protocol type update protocol used (default: dyndns2).
-file path load configuration information from 'path' (default: /etc/ddclient/ddclient.conf).
-cache path record address used in 'path' (default: /etc/ddclient/ddclient.cache).
-pid path record process id in 'path'.
-use which how the should IP address be obtained. (default: ip). \n" . + " More information about the possible use-arguments can be found on \n" . + " the supported routers page
-ip address set the IP address to 'address'.
-if interface obtain IP address from 'interface' (default: ppp0).
-if-skip pattern skip any IP addresses before 'pattern' in the output of ifconfig {if}.
-web provider|url obtain IP address from provider's IP checking page (default: dyndns).
-web-skip pattern skip any IP addresses before 'pattern' on the web provider|url.
-fw address|url obtain IP address from firewall at 'address'.
-fw-skip pattern skip any IP addresses before 'pattern' on the firewall address|url.
-fw-login login use 'login' when getting IP from fw.
-fw-password secret use password 'secret' when getting IP from fw.
-cmd program obtain IP address from by calling {program}.
-cmd-skip pattern skip any IP addresses before 'pattern' in the output of {cmd}.
-login user login as 'user'.
-password secret use password 'secret'.
-host host update DNS information for 'host'.
-{no}retry retry failed updates. (default: noretry).
-{no}force force an update even if the update may be unnecessary (default: noforce).
-timeout max wait at most 'max' seconds for the host to respond (default: 0).
-{no}syslog log messages to syslog (default: nosyslog).
-facility {type} log messages to syslog to facility {type} (default: daemon).
-priority {pri} log messages to syslog with priority {pri} (default: notice).
-mail address e-mail messages to {address}.
-mail-failure address e-mail messages for failed updates to {address}.
-{no}exec do {not} execute; just show what would be done (default: exec).
-{no}debug print {no} debugging information (default: nodebug).
-{no}verbose print {no} verbose information (default: noverbose).
-{no}quiet print {no} messages for unnecessary updates (default: noquiet).
-help this message (default: 0).
-{no}query print {no} ip addresses and exit.
\n" ; + +$main[] = $text; +// config +$text['id'] = "config"; +$text['title'] = "Configuring ddclient"; +$text['menu'] = "config"; +$text['body'] = + "

\n" . + "The configuration file, ddclient.conf, can be used to define the \n" . + "default behaviour and operation of ddclient. The file consists of \n" . + "sequences of global variable definitions and host definitions. \n" . + "Since version 3.6.5, ddclient.conf is located by default in \n" . + "/etc/ddclient/ddclient.conf. Another location can be forced \n" . + "by using the -file option" . + "

\n" . + "

\n" . + "Global definitions look like: \n" . + "name=value [,name=value]* \n" . + "

\n" . + "

\n" . + "Next example \n" . + "specifies that ddclient should operate as a daemon, checking the \n" . + "eth0 interface for an IP address change every 5 minutes and use the \n" . + "'dyndns2' protocol by default. \n" . + "

\n" . + "
\n" .
+  	"daemon=600                   \n" .
+  	"use=if, if=eth0              \n" .
+  	"proxy=proxy.myisp.com        \n" .
+  	"protocol=dyndns2 \n" .
+	"
\n" . + "
". + "

\n" . + "

Host definitions look like: \n" . + "[name=value [,name=value]*]* a.host.domain [,b.host.domain] [login] [password] \n" . + "

\n" . + "Next example specifies two host definitions. \n" . + "The first definition will use the hammernode1 protocol, \n" . + "my-hn-login and my-hn-password to update the ip-address of \n" . + "myhost.hn.org and my2ndhost.hn.org. \n" . + "

\n" . + "The second host definition will use the current default protocol \n" . + "('dyndns2'), my-login and my-password to update the ip-address of \n" . + "myhost.dyndns.org and my2ndhost.dyndns.org. \n" . + "

\n" . + "The order of this sequence is significant because the values of any \n" . + "global variable definitions are bound to a host definition when the \n" . + "host definition is encountered. \n" . + "

\n" . + "

\n" . + "
\n" .
+  	"protocol=hammernode1, \ \n" .
+  	"login=my-hn-login, password=my-hn-password  myhost.hn.org \n" .
+  	"login=my-login, password=my-password  myhost.dyndns.org,my2nd.dyndns.org \n" .
+	"
\n" . + "
". + "

See the sample-ddclient.conf file for further examples.

\n" ; + +$main[] = $text; + +} else if ($page == 2) { // supported sevices + $text['id'] = "intro"; + $text['title'] = "Introduction about the supported protocols"; + $text['menu'] = "Introduction"; + $text['body'] = "

". + "This is an incomplete list of the services supported by ddclient. ". + "If your favoriet dynamic dns provider isn't here, check the result " . + "ddclient --help with the most recent version of ddclient. If it's " . + "there, check the patches section on sf.net and if it's really not " . + "supported by ddclient you can try to modify ddclient yourself. " . + "

" . + "

+Since ddclient version 3.7, ddclient also supports https to update +your favorit provider. Use the ssl=yes option to use this feature. +

"; + + $main[] = $text; +// dnspark +$text['id'] = "dnspark"; +$text['title'] = "dnspark protocol"; +$text['menu'] = "dnspark"; +$text['body'] = + "

The 'dnspark' protocol is used by DNS service offered by www.dnspark.com.

\n ". + "

Configuration variables applicable to the 'easydns' protocol are:\n ". + "\n" . + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "
protocol=dnspark
server=fqdn.of.service defaults to www.dnspark.com
backupmx=no|yes indicates that DNSPark should be the secondary MX " . + "for this domain or host.
mx=any.host.domain a host MX'ing for this host or domain.
mxpri=priority MX priority.
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

\n" . + "
\n" . + "
\n" .
+  	"## single host update\n" .
+  	"protocol=dnspark,                                         \\\n" .
+  	"login=my-dnspark.com-login,                               \\\n" .
+  	"password=my-dnspark.com-password                          \\\n" .
+  	"myhost.dnspark.com \n" .
+	"\n" .
+  	"## multiple host update with wildcard'ing mx, and backupmx\n" .
+  	"protocol=dnspark,                                         \\\n" .
+  	"login=my-dnspark.com-login,                               \\\n" .
+  	"password=my-dnspark.com-password,                         \\\n" .
+  	"mx=a.host.willing.to.mx.for.me,                           \\\n" .
+  	"mxpri=10,                                                 \\\n" .
+  	"my-toplevel-domain.com,my-other-domain.com\n" .
+	"\n" .
+  	"## multiple host update to the custom DNS service\n" .
+  	"protocol=dnspark,                                         \\\n" .
+  	"login=my-dnspark.com-login,                               \\\n" .
+  	"password=my-dnspark.com-password                          \\\n" .
+  	"my-toplevel-domain.com,my-other-domain.com\n" .
+	"
\n" . 
+	"
\n" ; + +$main[] = $text; +// dslreports +$text['id'] = "dslreports"; +$text['title'] = "dslreports"; +$text['menu'] = "dslreports"; +$text['body'] = +"

The 'dslreports1' protocol is used by a free DSL monitoring service\n" . +"offered by www.dslreports.com.

\n" . + +"

Configuration variables applicable to the 'dslreports1' protocol are:

" . +"\n" . + "" . + "" . + "" . + "" . + "" . +"
protocol=dslreports1
server=fqdn.of.service defaults to www.dslreports.com
login=service-login login name and password registered with the service
password=service-password
unique-number the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=dslreports1,                                     \\\n" .
+  "server=www.dslreports.com,                                \\\n" .
+  "login=my-dslreports-login,                                \\\n" .
+  "password=my-dslreports-password                           \\\n" .
+  "123456\n" .
+"
\n" . +"\n" . + +"

Note: DSL Reports uses a unique number as the host name. This number\n" . +"can be found on the Monitor Control web page.

\n" ; +$main[] = $text; +$text['id'] = "dyndns1"; +$text['title'] = "dyndns1"; +$text['menu'] = "dyndns1"; +$text['body'] = +"

The 'dyndns1' protocol is a deprecated protocol used by the free dynamic \n". +"DNS service offered by www.dyndns.org. The 'dyndns2' should be used to \n". +"update the www.dyndns.org service. However, other services are also \n". +"using this protocol so support is still provided by ddclient.

\n". +" \n". +"Configuration variables applicable to the 'dyndns1' protocol are: \n". +"
\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . +"
protocol=dyndns1
server=fqdn.of.service defaults to members.dyndns.org
backupmx=no|yes indicates that this host is the primary MX for the domain.
mx=any.host.domain a host MX'ing for this host definition.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" . 
+  "protocol=dyndns1,                                         \\\n" . 
+  "login=my-dyndns.org-login,                                \\\n" . 
+  "password=my-dyndns.org-password                           \\\n" . 
+  "myhost.dyndns.org \n" . 
+"\n" . 
+  "## multiple host update with wildcard'ing mx, and backupmx\n" . 
+  "protocol=dyndns1,                                         \\\n" . 
+  "login=my-dyndns.org-login,                                \\\n" . 
+  "password=my-dyndns.org-password,                          \\\n" . 
+  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" . 
+  "myhost.dyndns.org,my2ndhost.dyndns.org \n" . 
+  "
\n" . + "\n" . + "

Note: you only need one of the examples

\n"; + +$main[] = $text; +// dyndns2 +$text['id'] = "dyndns2"; +$text['title'] = "dyndns2"; +$text['menu'] = "dyndns2"; +$text['body'] = +"

The 'dyndns2' protocol is a newer low-bandwidth protocol used by a\n" . +"free dynamic DNS service offered by www.dyndns.org. It supports\n" . +"features of the older 'dyndns1' in addition to others. [These will be\n" . +"supported in a future version of ddclient.]

\n" . +"\n". +"

Configuration variables applicable to the 'dyndns2' protocol are:

\n" . +"\n". + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . +"
protocol=dyndns2
server=fqdn.of.service defaults to members.dyndns.org
backupmx=no|yes indicates that this host is the primary MX for the domain.
static=no|yes indicates that this host has a static IP address.
custom=no|yes indicates that this host is a 'custom' top-level domain name.
mx=any.host.domain a host MX'ing for this host definition.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=dyndns2,                                         \\\n" .
+  "login=my-dyndns.org-login,                                \\\n" .
+  "password=my-dyndns.org-password                           \\\n" .
+  "myhost.dyndns.org \n" .
+"\n" .
+  "## multiple host update with wildcard'ing mx, and backupmx\n" .
+  "protocol=dyndns2,                                         \\\n" .
+  "login=my-dyndns.org-login,                                \\\n" .
+  "password=my-dyndns.org-password,                          \\\n" .
+  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" .
+  "myhost.dyndns.org,my2ndhost.dyndns.org \n" .
+"\n" .
+  "## multiple host update to the custom DNS service\n" .
+  "protocol=dyndns2,                                         \\\n" .
+  "login=my-dyndns.org-login,                                \\\n" .
+  "password=my-dyndns.org-password                           \\\n" .
+  "my-toplevel-domain.com,my-other-domain.com\n" .
+	"
\n" . + "
\n" . + "

Note: you only need one of the examples

\n"; + +$main[] = $text; +// easydns +$text['id'] = "easydns"; +$text['title'] = "easydns"; +$text['menu'] = "easydns"; +$text['body'] = +"

The 'easydns' protocol is used by the for fee DNS service offered \n" . +"by www.easydns.com.

\n" . + +"

Configuration variables applicable to the 'easydns' protocol are:\n". +"\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
protocol=easydns
server=fqdn.of.service defaults to members.easydns.com
backupmx=no|yes indicates that EasyDNS should be the secondary MX for this domain or host.
mx=any.host.domain a host MX'ing for this host or domain.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.

\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=easydns,                                         \\\n" .
+  "login=my-easydns.com-login,                               \\\n" .
+  "password=my-easydns.com-password                          \\\n" .
+  "myhost.easydns.com \n" .
+"\n" .
+  "## multiple host update with wildcard'ing mx, and backupmx\n" .
+  "protocol=easydns,                                         \\\n" .
+  "login=my-easydns.com-login,                               \\\n" .
+  "password=my-easydns.com-password,                         \\\n" .
+  "mx=a.host.willing.to.mx.for.me,                           \\\n" .
+  "backupmx=yes,                                             \\\n" .
+  "wildcard=yes                                              \\\n" .
+  "my-toplevel-domain.com,my-other-domain.com\n" .
+"\n" .
+  "## multiple host update to the custom DNS service\n" .
+  "protocol=easydns,                                         \\\n" .
+  "login=my-easydns.com-login,                               \\\n" .
+  "password=my-easydns.com-password                          \\\n" .
+  "my-toplevel-domain.com,my-other-domain.com\n" .
+  "
\n" . + "
\n" . + "

"; +$main[] = $text; +// hammernode +$text['id'] = "hammernode"; +$text['title'] = "hammernode"; +$text['menu'] = "hammernode"; +$text['body'] = +"

" . +"The 'hammernode1' protocol is the protocol used by the free dynamic \n" . +"DNS service offered by Hammernode at www.hn.org

\n" . + +"Configuration variables applicable to the 'hammernode1' protocol are:

\n" . +"\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
protocol=hammernode1
server=fqdn.of.service defaults to members.dyndns.org
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

\n" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=hammernode1,                                 \\\n" .
+  "login=my-hn.org-login,                                \\\n" .
+  "password=my-hn.org-password                           \\\n" .
+  "myhost.hn.org \n" .
+"\n" .
+  "## multiple host update\n" .
+  "protocol=hammernode1,                                 \\\n" .
+  "login=my-hn.org-login,                                \\\n" .
+  "password=my-hn.org-password,                          \\\n" .
+  "myhost.hn.org,my2ndhost.hn.org\n" .
+  "
\n" . + "
\n" . + ""; + +$main[] = $text; +// namecheap +$text['id'] = "namecheap"; +$text['title'] = "namecheap"; +$text['menu'] = "namecheap"; +$text['body'] = +"

The 'namecheap' protocol is used by DNS service offered by www.namecheap.com.

\n" . +"\n" . +"

Configuration variables applicable to the 'easydns' protocol are:

\n" . +"\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . +"
protocol=namecheap
server=fqdn.of.service defaults to dynamicdns.park-your-domain.com
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

". + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=namecheap,                                         \\\n" .
+  "login=my-namecheap.com-login,                               \\\n" .
+  "password=my-namecheap.com-password                          \\\n" .
+  "myhost.namecheap.com \n" .
+    "
\n" . + "
\n" . + "

"; + + +$main[] = $text; +$text['id'] = "zoneedit1"; +$text['title'] = "zoneedit1"; +$text['menu'] = "zoneedit1"; +$text['body'] = +"

The 'zoneedit1' protocol is used by a DNS service offered by +www.zoneedit.com.

\n" . + +"

Configuration variables applicable to the 'zoneedit1' protocol are:

\n" . + "protocol=zoneedit1 \n" . + "server=fqdn.of.service defaults to www.zoneedit.com\n" . + "login=service-login login name and password registered with the service\n" . + "password=service-password \n" . + "your.domain.name the host registered with the service.\n" . + +"

Example ddclient.conf file entries:

\n" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=zoneedit1,                                     \\\n" .
+  "server=www.zoneedit.com,                                \\\n" .
+  "login=my-zoneedit-login,                                \\\n" .
+  "password=my-zoneedit-password                           \\\n" .
+  "my.domain.name\n" .
+  "\n" .
+  "## multiple host update                                 \\\n" .
+  "protocol=zoneedit1,                                     \\\n" .
+  "server=www.zoneedit.com,                                \\\n" .
+  "login=my-zoneedit-login,                                \\\n" .
+  "password=my-zoneedit-password                           \\\n" .
+  "my.domain.name,my2nd.domain.com\n" .
+    "
\n" . + "
\n" . + "

"; +$main[] = $text; +} else if ($page == 3) { // supported routers + $text['id'] = "intro"; + $text['title'] = "Introduction about the -use option"; + $text['menu'] = "introduction"; + $text['body'] = + "

". + "Ddclient can get the needed IP-address on a lot of different\n". + "ways. By default, it fetches it's IP from the internet but \n". + "you can it also from a router or specify it yourself.\n". + "

\n". + "

Ddclient supports a lot of different routers. To configure ". + "your favorit router, modify your use-line in your configuration ". + "to something like -use=linksys-ver2. Don't forget to put your ". + "router password and login in the configuration.". + "

". + "

". + "If your favorit router isn't here, try to run ddclient --help. \n". + "This list is rather incomplete so there are a few more routers \n". + "supported by the most recent version of ddclient. \n". + "

"; + $main[] = $text; + + $text['id'] = "nonrouter"; + $text['title'] = "Non router option"; + $text['menu'] = "Non router"; + $text['body'] = + "" . + "\n" . + "" . + "\n" . + "" . + "" . + "
-use=web obtain IP from an IP discovery page on the web. This is the default way if none is specified
-use=if obtain IP from the -if {interface}.
-use=ip obtain IP from -ip {address}.
-use=cmd obtain IP from the -cmd {external-command}.
-use=fw obtain IP from the firewall specified by -fw {type|address}.
"; + $main[] = $text; + + $text['title'] = "Incomplete list of supported routers"; + $text['menu'] = "routers"; + $text['body'] = + "". + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
-use=3com-3c886a obtain IP from 3com 3c886a 56k Lan Modem at the -fw {address}.
-use=3com-oc-remote812 obtain IP from 3com OfficeConnect Remote 812 at the -fw {address}.
-use=alcatel-stp obtain IP from Alcatel Speed Touch Pro at the -fw {address}.
-use=allnet-1298 obtain IP from Allnet 1298 at the -fw {address}.
-use=cayman-3220h obtain IP from Cayman 3220-H DSL at the -fw {address}.
-use=cisco obtain IP from Cisco FW at the -fw {address}.
-use=dlink-604 obtain IP from D-Link DI-604 at the -fw {address}.
-use=dlink-614 obtain IP from D-Link DI-614+ at the -fw {address}.
-use=e-tech obtain IP from E-tech Router at the -fw {address}.
-use=elsa-lancom-dsl10 obtain IP from ELSA LanCom DSL/10 DSL FW at the -fw {address}.
-use=elsa-lancom-dsl10-ch01 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
-use=elsa-lancom-dsl10-ch02 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
-use=linksys obtain IP from Linksys FW at the -fw {address}.
-use=linksys2 obtain IP from Linksys FW ver 2 at the -fw {address}.
-use=maxgate-ugate3x00 obtain IP from MaxGate UGATE-3x00 FW at the -fw {address}.
-use=netgear-rt3xx obtain IP from Netgear FW at the -fw {address}.
-use=netopia-r910 obtain IP from Netopia R910 FW at the -fw {address}.
-use=smc-barricade obtain IP from SMC Barricade FW at the -fw {address}.
-use=sohoware-nbg800 obtain IP from SOHOWare BroadGuard NBG800 at the -fw {address}.
-use=vigor-2200usb obtain IP from Vigor 2200 USB at the -fw {address}.
-use=watchguard-soho obtain IP from Watchguard SOHO FW at the -fw {address}.
-use=xsense-aero obtain IP from Xsense Aero at the -fw {address}.
". + "

Remember, if your router isn't here, check the result of ddclient --help

"; + $main[] = $text; + +} +?> + + + + + + + + + + <?php echo "$title $titleextra" ?> + + + + + + + + + + + + + + + + +
+^ TOP\n"); +printf("

%s

\n",$text['id'],$text['title']); +printf("%s\n",$text['body']); +} +?> +
+ + + + + + diff --git a/html/sinorca-print.css b/html/sinorca-print.css new file mode 100644 index 0000000..996a9ec --- /dev/null +++ b/html/sinorca-print.css @@ -0,0 +1,136 @@ +/************************************ + * TITLE: Sinorca Print Stylesheet * + * URI : sinorca/sinorca-print.css * + * MODIF: 2003-May-01 19:30 +0800 * + ************************************/ + + +/* ##### Common Styles ##### */ + +body { + color: black; + background-color: white; + font-family: "times new roman", times, roman, serif; + font-size: 12pt; + margin: 0; + padding: 0; +} + +acronym, .titleTip { + font-style: italic; + border-bottom: none; +} + +acronym:after, .titleTip:after { /* Prints titles after the acronyms/titletips. Doesn't work in MSIE */ + content: "(" attr(title) ")"; + font-size: 90%; + font-style: normal; + padding-left: 1ex; +} + +.doNotPrint { + display: none !important; +} + + +/* ##### Header ##### */ + +#header { + margin: 0; + padding: 0; + border-bottom: 1px solid black; +} + +.superHeader { + display: none; +} + +.headerTitle { + color: black; + background-color: transparent; + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-size: 200%; + font-weight: normal; + text-decoration: none; + margin: 0; + padding: 0 0 0.5ex 0; +} + +.subHeader { + display: none; +} + + +/* ##### Side Bar ##### */ + +#side-bar { + display: none; +} + + +/* ##### Main Copy ##### */ + +#main-copy { + text-align: justify; + margin: 0; + padding: 0; +} + +#main-copy h1 { + font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; + font-size: 120%; + margin: 2ex 0 1ex 0; + padding: 0; +} + +#main-copy a { + color: black; + background-color: transparent; + text-decoration: none; +} + +#main-copy a:after { /* Prints the links' URIs after the links' texts. Doesn't work in MSIE */ + content: "<" attr(href) ">"; + font-size: 90%; + padding-left: 1ex; +} + +p { + margin: 0 0 2ex 0; + padding: 0; +} + +dl { + margin: 0; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0; + padding: 0 0 1ex 0; +} + +dd { + margin: 0 0 2ex 1.5em; + padding: 0; +} + +.topOfPage { + display: none; +} + + +/* ##### Footer ##### */ + +#footer { + margin: 2em 0 0 0; + padding: 1ex 0 0 0; + border-top: 1px solid black; +} + +#footer a { + color: black; + background-color: transparent; + text-decoration: none; +} \ No newline at end of file diff --git a/html/sinorca-screen-alt.css b/html/sinorca-screen-alt.css new file mode 100644 index 0000000..5553665 --- /dev/null +++ b/html/sinorca-screen-alt.css @@ -0,0 +1,292 @@ +/*********************************************** + * TITLE: Sinorca Alterative Screen Stylesheet * + * URI : sinorca/sinorca-screen-alt.css * + * MODIF: 2003-May-13 18:48 +0800 * + ***********************************************/ + + +/* ##### Common Styles ##### */ + +body { + color: black; + background-color: white; + font-family: verdana, helvetica, arial, sans-serif; + font-size: 71%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + +html > body { + font-size: 8.5pt; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +.doNotDisplay { + display: none; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + + +/* ##### Header ##### */ + +.superHeader { + color: white; + background-color: rgb(100,135,220); + height: 2em; +} + +.superHeader a { + color: white; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + color: rgb(39,78,144); + background-color: rgb(140,170,230); +} + +.headerTitle { + font-size: 337%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} + +.subHeader { + color: white; + background-color: rgb(0,51,153); + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: white; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + color: rgb(253,160,91); + background-color: transparent; +} + + +/* ##### Side Boxes ##### */ + +#side-bar { + width: 14em; + margin: 2.5em 0 0 1.25mm; + float: left; + clear: left; +} + +body > #side-bar { + margin-left: 2.5mm; /* Circumvents a rendering bug in MSIE (6.0) */ +} + +.sideBarTitle { + color: white; + background-color: rgb(100,135,220); + font-weight: bold; + margin: 0; + padding: 0.4ex 0 0.4ex 0.6ex; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 2.25em 0; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE (6.0) */ +} + +#side-bar a, .thisPage { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 1.3ex 2ex; + display: block; +} + +.thisPage { + color: black; + background-color: transparent; +} + +#side-bar a:hover { + color: white; + background-color: rgb(100,135,220); + text-decoration: none; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 2.5em 0; + padding: 1ex 0.5ex 0 0.5ex; + display: block; +} + +.sideBarText + .sideBarText { /* Not recognised by MSIE (6.0) */ + margin-top: -1.5em; +} + +#side-bar .sideBarText a { + text-decoration: underline; + font-weight: normal; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: none; +} + + +/* ##### Main Copy ##### */ + +#main-copy { + color: black; + background-color: transparent; + text-align: justify; + line-height: 1.5em; + margin: -1em 0 0 15em; + padding: 0.5mm 5mm 5mm 5mm; +} + +#bodyText { + margin: 0 0 0 15.5em; + padding: 2mm 5mm 2mm 5mm; +} + + +#main-copy p { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +#main-copy a { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: underline; +} + +#main-copy a:hover { + text-decoration: none; +} + +#main-copy h1 { + color: rgb(0,102,204); + background-color: transparent; + font-size: 145.5%; + font-weight: bold; + margin: 2em 0 0 0; + padding: 0.5ex 0 0.5ex 0.6ex; + border-bottom: 1px solid rgb(0,102,204); +} + +#main-copy .topOfPage { + color: rgb(0,102,204); + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 3ex 1ex 0 0; + padding: 0; + float: right; +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* ##### Footer ##### */ + +#footer { + color: white; + background-color: rgb(100,135,220); + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; +} + +#footer .left { + text-align: left; + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: white; + background-color: transparent; + text-decoration: underline; +} + +#footer a:hover { + text-decoration: none; +} \ No newline at end of file diff --git a/html/sinorca-screen.css b/html/sinorca-screen.css new file mode 100644 index 0000000..cfbb56c --- /dev/null +++ b/html/sinorca-screen.css @@ -0,0 +1,289 @@ +/************************************* + * TITLE: Sinorca Screen Stylesheet * + * URI : sinorca/sinorca-screen.css * + * MODIF: 2003-Apr-30 19:31 +0800 * + *************************************/ + + +/* ##### Common Styles ##### */ + +body { + color: black; + background-color: rgb(240,240,240); + font-family: verdana, helvetica, arial, sans-serif; + font-size: 71%; /* Enables font size scaling in MSIE */ + margin: 0; + padding: 0; +} + +html > body { + font-size: 8.5pt; +} + +acronym, .titleTip { + border-bottom: 1px dotted rgb(153,153,153); + cursor: help; + margin: 0; + padding: 0 0 0.4px 0; +} + +.doNotDisplay { + display: none; +} + +.smallCaps { + font-size: 110%; + font-variant: small-caps; +} + + +/* ##### Header ##### */ + +.superHeader { + color: white; + background-color: rgb(100,135,220); + height: 2em; +} + +.superHeader a { + color: white; + background-color: transparent; + text-decoration: none; + font-size: 91%; + margin: 0; + padding: 0 0.5ex 0 0.25ex; +} + +.superHeader a:hover { + text-decoration: underline; +} + +.superHeader .left { + position: absolute; + left: 1.5mm; + top: 0.75ex; +} + +.superHeader .right { + position: absolute; + right: 1.5mm; + top: 0.75ex; +} + +.midHeader { + color: rgb(39,78,144); + background-color: rgb(140,170,230); +} + +.headerTitle { + font-size: 337%; + font-weight: normal; + margin: 0 0 0 4mm; + padding: 0.25ex 0; +} + +.subHeader { + color: white; + background-color: rgb(0,51,153); + margin: 0; + padding: 1ex 1ex 1ex 1.5mm; +} + +.subHeader a { + color: white; + background-color: transparent; + text-decoration: none; + font-weight: bold; + margin: 0; + padding: 0 0.75ex 0 0.5ex; +} + +.subHeader a:hover { + text-decoration: underline; +} + +.superHeader .highlight, .subHeader .highlight { + color: rgb(253,160,91); + background-color: transparent; +} + + +/* ##### Side Bar ##### */ + +#side-bar { + width: 15em; + float: left; + clear: left; + border-right: 1px solid rgb(153,153,153); +} + +#side-bar div { + border-bottom: 1px solid rgb(153,153,153); +} + +.sideBarTitle { + font-weight: bold; + margin: 0 0 0.5em 2.5mm; + padding: 1em 0 0 0; +} + +#side-bar ul { + list-style-type: none; + list-style-position: outside; + margin: 0; + padding: 0 0 1.1em 0; +} + +#side-bar li { + margin: 0; + padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ +} + +#side-bar a, .thisPage { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: none; + margin: 0; + padding: 0.75em 1ex 0.75em 5mm; + display: block; +} + +.thisPage { + color: black; + background-color: white; + padding-left: 4mm; + border-top: 1px solid rgb(153,153,153); + border-bottom: 1px solid rgb(153,153,153); +} + +#side-bar a:hover { + color: white; + background-color: rgb(100,135,220); + text-decoration: none; +} + +.sideBarText { + line-height: 1.5em; + margin: 0 0 1em 0; + padding: 0 1.5ex 0 2.5mm; + display: block; +} + +#side-bar .sideBarText a { + text-decoration: underline; + margin: 0; + padding: 0; + display: inline; +} + +#side-bar .sideBarText a:hover { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: none; +} + +.lighterBackground { + color: inherit; + background-color: white; +} + + +/* ##### Main Copy ##### */ + +#main-copy { + color: black; + background-color: white; + text-align: justify; + line-height: 1.5em; + margin: 0 0 0 15em; + padding: 0.5mm 5mm 5mm 5mm; + border-left: 1px solid rgb(153,153,153); +} + +#main-copy p { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +#main-copy a { + color: rgb(0,102,204); + background-color: transparent; + text-decoration: underline; +} + +#main-copy a:hover { + text-decoration: none; +} + +#main-copy h1 { + color: white; + background-color: rgb(100,135,220); + font-size: 100%; + font-weight: bold; + margin: 3em 0 0 0; + padding: 0.5ex 0 0.5ex 1ex; +} + +#main-copy .topOfPage { + color: white; + background-color: transparent; + font-size: 91%; + font-weight: bold; + text-decoration: none; + margin: 2.5ex 1ex 0 0; /* For MSIE */ + padding: 0; + float: right; +} + +#main-copy > .topOfPage { + margin: 2.75ex 1ex 0 0; /* For fully standards-compliant user agents */ +} + +dl { + margin: 1em 1ex 2em 1ex; + padding: 0; +} + +dt { + font-weight: bold; + margin: 0 0 0 0; + padding: 0; +} + +dd { + margin: 0 0 2em 2em; + padding: 0; +} + + +/* ##### Footer ##### */ + +#footer { + color: white; + background-color: rgb(100,135,220); + font-size: 91%; + margin: 0; + padding: 1em 2.5mm 2.5ex 2.5mm; + clear: both; +} + +#footer .left { + line-height: 1.45em; + float: left; + clear: left; +} + +#footer .right { + text-align: right; + line-height: 1.45em; +} + +#footer a { + color: white; + background-color: transparent; + text-decoration: underline; +} + +#footer a:hover { + text-decoration: none; +} \ No newline at end of file diff --git a/svn/COPYING b/svn/COPYING new file mode 100644 index 0000000..60549be --- /dev/null +++ b/svn/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/svn/COPYRIGHT b/svn/COPYRIGHT new file mode 100644 index 0000000..57342b6 --- /dev/null +++ b/svn/COPYRIGHT @@ -0,0 +1,19 @@ +ddclient - update client for www.dyndns.org accounts + +Copyright (C) 1999 Paul Burry (paul@burry.ca) +Copyright (C) 2000 Paul Burry (paul@burry.ca) +Copyright (C) 2001 Paul Burry (paul@burry.ca) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/svn/Changelog b/svn/Changelog new file mode 100644 index 0000000..5496364 --- /dev/null +++ b/svn/Changelog @@ -0,0 +1,258 @@ +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 +- corrected a few writing mistakes +- support for 'NetComm NB3' adsl modem (submitted by crazyprog) +- Added Sitelutions DynDNS, fixed minor Namecheap bug (patch #1346867) + +3.6.6 +- support for olitec-SX200 +- added sample-etc_rc.d_init.d_ddclient.lsb as a sample script for lsb-compliant systems. +- support for linksys wrt854g (thanks to Nick Triantos) +- support for linksys ver 3 +- support for Thomson (Alcatel) SpeedTouch 510 (thanks to Aldoir) +- Cosmetic fixes submitted by John Owens + +3.6.5 +- there was a bug in the linksys-ver2 +- support for postscript (thanks to Larry Hendrickson) +- Changelog out of README +- modified all documentation to use /etc/ddclient/ddclient.conf (notified by nicolasmartin in bug [1070646]) + +3.6.4 +- added support for NameCheap service (thanks to Dan Boardman) +- added support for linksys ver2 (thanks to Dan Perik) + +3.6.3 +- renamed sample-etc_dhclient-enter-hooks to sample-etc_dhclient-exit-hooks +- add support for the Allnet 1298 Router +- add -a to ifconfig to query all interfaces (for Solaris and OpenBSD) +- update the process status to reflect what is happening. +- add a To: line when sending e-mail +- add mail-failure to send mail on failures only +- try all addresses for multihomed hosts (like check.dyndns.org) +- add support for dnspark +- add sample for OrgDNS.org + +3.6.2 +- add support for Xsense Aero +- add support for Alcatel Speedtouch Pro +- do authentication when either the login or password are defined. +- fix parsing of web status pages + +- 3.6 +- add support for EasyDNS (see easydns.com) +- add warning for possible incorrect continuation lines in the .conf file. +- add if-skip with the default as was used before. +- add cmd-skip. + +- 3.5.4 +- added !active result code for DynDNS.org + +- 3.5.2 +- avoid undefined variable in get_ip + +- 3.5.1 +- fix parsing of quoted strings in .conf file +- add filename and line number to any warnings regarding files. + +- 3.5 +- allow any url to be specified for -fw {address|url} + use -fw-skip {pattern} to specify a string preceding the IP address at the URL's page +- allow any url to be specified for -web {address|url} + use -web-skip {pattern} to specify a string preceding the IP address at the URL's page +- modify -test to display any IP addresses that could be obtained from + any interfaces, builtin fw definitions, or web status pages. + +- 3.4.6 (not released) +- fix errors in -help +- allow non-FQDNs as hosts; dslreports requires this. +- handle german ifconfig output +- try to get english messages from ifconfig so other languages are handled too. +- added support for com 3c886a 56k Lan Modem + +- 3.4.5 +- handle french ifconfig output + +- 3.4.4 +- added support for obtaining the IP address from a Cisco DHCP interface. + (Thanks, Tim) + +- 3.4.2 +- update last modified time when nochg is returned from dyndns +- add example regarding fw-login and fw-password's required by some + home routers + +- 3.4.1 +- add option (-pid) to record process id in a file. This option should be + defined in the .conf file as it is done in the sample. +- add detection of SIGHUP. When this signal is received, ddclient will + wake up immediately, reload it's configuration file, and update + the IP addresses if necessary. + +- 3.4 +- ALL PEOPLE USING THIS CLIENT ARE URGED TO UPGRADE TO 3.4 or better. +- fixed several timer related bugs. +- reformatted some messages. + +- 3.3.8 +- added support for the ISDN channels on ELSA LANCOM DSL/10 router + +- 3.3.7 +- suppress repeated identical e-mail messages. + +- 3.3.6 +- added support for the ELSA LANCOM DSL/10 router +- ignore 0.0.0.0 when obtained from any FW/router. + +- 3.3.5 +- fixed sample ddclient.conf. fw-ip= should be fw= +- fixed problem getting status pages for some routers + +- 3.3.4 +- added support for the MaxGate's UGATE-3x00 routers + +- 3.3.3 +- sample* correct checks for private addresses +- add redhat specific sample-etc_rc.d_init.d_ddclient.redhat +- make daemon-mode be the default when named ddclientd +- added support for the Linksys BEF* Internet Routers + +- 3.3.2 +- (sample-etc_rc.d_init.d_ddclient) set COLUMNS to a large number so that + 'ps -aef' will not prematurely truncate the CMD. + +- 3.3 +- added rpm (thanks to Bo Forslund) +- added support for the Netgear RT3xx Internet Routers +- modified sample-etc_rc.d_init.d_ddclient to work with other Unix beside RedHat. +- avoid rewritting the ddclient.cache file unnecessarily +- fixed other minor bugs + +- 3.2.0 +- add support for DynDNS's custom domain service. +- change suggested directory to /usr/sbin + +- 3.1.0 +- clean up; fix minor bugs. +- removed -refresh +- add min-interval to avoid too frequent update attempts. +- add min-error-interval to avoid too frequent update attempts when the + service is unavailable. + +- 3.0.1 +- make all values case sensitive (ie. passwords) + +- 3.0 +- new release! +- new ddclient.conf format +- rewritten to support DynDNS's NIC2 and other dynamic DNS services +- added Hammernode (hn.org) +- added ZoneEdit (zoneedit.com) +- added DSLreports (dslreports.com) host monitoring +- added support for obtaining IP addresses from +- interfaces, +- commands, +- web, +- external commands, +- Watchguard's SOHO router +- Netopia's R910 router +- and SMC's Barracade +- added daemon mode +- added logging msgs to syslog and e-mail + +- 2.3.7 +- add -refresh to the sample scripts so default arguments are obtained from the cache +- added local-ip script for obtaining the address of an interface +- added public-ip script for obtaining the ip address as seen from a public web page + +- 2.3.6 +- fixed bug the broke enabling retrying when members.dyndns.org was down. + +- 2.3.5 +- prevent warnings from earlier versions of Perl. + +- 2.3.4 +- added sample-etc_dhclient-enter-hooks for those using the ISC DHCP client (dhclient) + +- 2.3.3 +- make sure that ddclient.conf is only readable by the owner so that no one +- else can see the password (courtesy of Steve Greenland). +-- NOTE: you will need to change the permissions on ddclient.conf to prevent +-- others from obtaining viewing your password. +-- ie. chmod go-rwx /etc/ddclient.conf + +- 2.3.2 +- make sure 'quiet' messages are printed when -verbose or -debug is enabled +- fix error messages for those people using proxies. + +- 2.3 +- fixed a problem reading in cached entries + + +- 2.2.1 +- sample-etc_ppp_ip-up.local - local ip address is $4 or $PPP_LOCAL (for debian) +- use as the line terminator (some proxies are strict about this) + +- 2.2 +- added support (-static) for updating static DNS (thanks Marc Sira) +- changed ddclient.cache format (old style is still read) +- sample-etc_ppp_ip-up.local - detect improper calling sequences +- sample-etc_ppp_ip-up.local - local ip address is $3 or $PPP_LOCAL (for debian) + +- 2.1.2 +- updated README + +- 2.1.1 +- make sure result code reflects any failures +- optionally (-quiet) omit messages for unnecessary updates +- update sample-etc_cron.d_ddclient to use -quiet + +- 2.1 +- avoid unnecessary updates by recording the last hosts updated in a + cache file (default /etc/ddclient.cache) + +- optionally (-force) force an update, even if it may be unnecessary. + + This can be used to prevent dyndns.org from deleting a host that has not + required an update for a long period of time. + +- optionally (-refresh), reissue all host updates. + + This can be used together with cron to periodically update DynDNS. + See sample-etc-cron.d-ddclient for details. + +- optionally (-retry) save failed updates for future processing. + + This feature can be used to reissue updates that may have failed due to + network connectivity problems or a DynDNS server outage + +------------------------------------------------------------------------------- +$Id$ diff --git a/svn/README b/svn/README new file mode 100644 index 0000000..f70e0c9 --- /dev/null +++ b/svn/README @@ -0,0 +1,173 @@ +=============================================================================== +DDCLIENT v3.6.7 + +ddclient is a Perl client used to update dynamic DNS entries for accounts +on many dynamic DNS services. + +IMPORTANT: The format and options used by ddclient have CHANGED. + Please examine the sample configuration file. + It is highly recommended that you take advantage of the + new daemon mode of operation. + +IMPORTANT: The installation location for the ddclient script has changed from + /root/bin/ + to + /usr/sbin/ + +=============================================================================== + +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 +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: use the forums on + http://sourceforge.net/projects/ddclient/ + +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 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 + +------------------------------------------------------------------------------- +INSTALLATION: + + cp ddclient /usr/sbin/ + mkdir /etc/ddclient + cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf + vi /etc/ddclient/ddclient.conf + -- and change hostnames, logins, and passwords appropriately + + ## For those using Redhat style rc files and using daemon-mode: + cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient + ## enable automatic startup when booting + /sbin/chkconfig --add ddclient + ## start the first time by hand + /etc/rc.d/init.d/ddclient start + + ## If you are not using daemon-mode, configure cron and dhcp or ppp + ## as described below. + +------------------------------------------------------------------------------- +TROUBLESHOOTING: + + 1. enable debugging and verbose messages. + $ ddclient -daemon=0 -debug -verbose -noquiet + + 2. Do you need to specify a proxy? + If so, just add a + proxy=your.isp.proxy + to the ddclient.conf file. + + 3. Define the IP address of your router with fw=xxx.xxx.xxx.xxx in + /etc/ddclient/ddclient.conf and then try + $ ddclient -daemon=0 -query + to see if the router status web page can be understood. + + 4. Need support for another router/firewall? + Define the router status page yourself with: + fw=url-to-your-router's-status-page + fw-skip=any-string-preceding-your-IP-address + + ddclient does something like this to provide builtin support for + common routers. + For example, the Linksys routers could have been added with: + fw=192.168.1.1/Status.htm + fw-skip=WAN.*?IP Address + + OR + Send me the output from: + $ ddclient -geturl {fw-ip-status-url} [-login login [-password password]] + and I'll add it to the next release! + + ie. for my fw/router I used: + $ ddclient -geturl 192.168.1.254/status.htm + + 5. Some broadband routers require the use of a password when ddclient + accesses its status page to determine the router's WAN IP address. + If this is the case for your router, add + fw-login=your-router-login + fw-password=your-router-password + to the beginning of your ddclient.conf file. + Note that some routers use either 'root' or 'admin' as their login + while some others accept anything. + +------------------------------------------------------------------------------- +USING DDCLIENT WITH ppp + +If you are using a ppp connection, you can easily update your DynDNS +entry with each connection, with: + ## configure pppd to update DynDNS with each connection + cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local + +Alternatively, you may just configure ddclient to operate as a daemon +and monitor your ppp interface. + +------------------------------------------------------------------------------- +USING DDCLIENT WITH cron + +If you have not configured ddclient to use daemon-mode, you'll need to +configure cron to force an update once a month so that the dns entry will +not become stale. + + ## configure cron to force an update twice a month + cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient + vi /etc/cron.d/ddclient + +------------------------------------------------------------------------------- +USING DDCLIENT WITH dhcpcd-1.3.17 + +If you are using dhcpcd-1.3.17 or thereabouts, you can easily update +your DynDNS entry automatically every time your lease is obtained +or renewed by creating an executable file named: + /etc/dhcpc/dhcpcd-{your-interface}.exe +ie.: + cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe + +In my case, it is named dhcpcd-eth0.exe and contains the lines: + #!/bin/sh + PATH=/usr/sbin:/root/bin:${PATH} + logger -t dhcpcd IP address changed to $1 + ddclient -proxy fasthttp.sympatico.ca -wildcard -ip $1 | logger -t ddclient + exit 0 + +Other DHCP clients may have another method of calling out to programs +for updating DNS entries. + +Alternatively, you may just configure ddclient to operate as a daemon +and monitor your ethernet interface. + +------------------------------------------------------------------------------- +USING DDCLIENT WITH dhclient + +If you are using the ISC DHCP client (dhclient), you can update +your DynDNS entry automatically every time your lease is obtained +or renewed by creating an executable file named: + /etc/dhclient-exit-hooks +ie.: + cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks + +Edit /etc/dhclient-exit-hooks to change any options required. + +Alternatively, you may just configure ddclient to operate as a daemon +and monitor your ethernet interface. + +------------------------------------------------------------------------------- +$Id$ diff --git a/svn/README.cisco b/svn/README.cisco new file mode 100644 index 0000000..2d7e337 --- /dev/null +++ b/svn/README.cisco @@ -0,0 +1,35 @@ +$Id$ +Method 1 ------------------------------------------------------ + +The following config will allow the Linux machine (10.1.1.2) to read +the IP address from the DHCP interface on the Cisco router (eth0) as +user ddclient. Since ddclient is configured with a priv level of 1 it +cannot do anything except look at the routers stats, ip addresses, +etc. This should be pretty harmless even if ddclient's password were +to be discovered. + +This has been tested with Cisco IOS 12.1(5)T5 running on a Cisco 2621 +router. + +Cisco Router Config (Assuming eth0 is DHCP interface) +----------------------------------------------------- +user ddclient password password +user ddclient priv 1 +ip http auth local +ip http access-class 99 +ip http port 1021 +ip http server +access-list 99 permit host 10.1.1.2 + +DDClient Config +--------------------------------------------------- +use=cisco, fw=10.1.1.1, if=eth0, fw-login=ddclient, fw-password=password + + +Method 2 ------------------------------------------------------ + +use=fw +fw=192.168.1.1/exec/show/interfaces/CR +fw-skip=FastEthernet0/0 +fw-login=ddclient +fw-password=xxxxxxxx diff --git a/svn/README.ssl b/svn/README.ssl new file mode 100644 index 0000000..70f9ca0 --- /dev/null +++ b/svn/README.ssl @@ -0,0 +1,10 @@ +$Id$ + +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 --git a/svn/ddclient b/svn/ddclient new file mode 100755 index 0000000..a1996a8 --- /dev/null +++ b/svn/ddclient @@ -0,0 +1,3132 @@ +#!/usr/bin/perl -w +#!/usr/local/bin/perl -w +###################################################################### +# $Id$ +# +# DDCLIENT - a Perl client for updating DynDNS information +# +# Author: Paul Burry (paul+ddclient@burry.ca) +# ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817 +###################################################################### +require 5.004; +use strict; +use Getopt::Long; +use Sys::Hostname; +use IO::Socket; + +my $version = "3.7.0-pre"; +my $programd = $0; +$programd =~ s%^.*/%%; +my $program = $programd; +$program =~ s/d$//; +my $now = time; +my $hostname = hostname(); +my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; +my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; +my $msgs = ''; +my $last_msgs = ''; + +use vars qw($file $lineno); +local $file = ''; +local $lineno = ''; + +$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:"; + +sub T_ANY {'any'}; +sub T_STRING {'string'}; +sub T_EMAIL {'e-mail address'}; +sub T_NUMBER {'number'}; +sub T_DELAY {'time delay (ie. 1d, 1hour, 1m)'}; +sub T_LOGIN {'login'}; +sub T_PASSWD {'password'}; +sub T_BOOL {'boolean value'}; +sub T_FQDN {'fully qualified host name'}; +sub T_OFQDN {'optional fully qualified host name'}; +sub T_FILE {'file name'}; +sub T_FQDNP {'fully qualified host name and optional port number'}; +sub T_PROTO {'protocol'} +sub T_USE {'ip strategy'} +sub T_IF {'interface'} +sub T_PROG {'program name'} +sub T_IP {'ip'} +sub T_POSTS {'postscript'}; + +## strategies for obtaining an ip address. +my %builtinweb = ( + 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, + 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, +); +my %builtinfw = ( + 'watchguard-soho' => { + 'name' => 'Watchguard SOHO FW', + 'url' => '/pubnet.htm', + 'skip' => 'NAME=IPAddress VALUE=', + }, + 'netopia-r910' => { + 'name' => 'Netopia R910 FW', + 'url' => '/WanEvtLog', + 'skip' => 'local:', + }, + 'smc-barricade' => { + 'name' => 'SMC Barricade FW', + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, + 'netgear-rt3xx' => { + 'name' => 'Netgear FW', + 'url' => '/mtenSysStatus.html', + 'skip' => 'IP Address', + }, + 'elsa-lancom-dsl10' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address', + }, + 'elsa-lancom-dsl10-ch01' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address.*?CH01', + }, + 'elsa-lancom-dsl10-ch02' => { + 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', + 'url' => '/config/1/6/8/3/', + 'skip' => 'IP.Address.*?CH02', + }, + 'linksys' => { + 'name' => 'Linksys FW', + 'url' => '/Status.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-ver2' => { + 'name' => 'Linksys FW version 2', + 'url' => '/RouterStatus.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-ver3' => { + 'name' => 'Linksys FW version 3', + 'url' => '/Status_Router.htm', + 'skip' => 'WAN.*?Address', + }, + 'linksys-wrt854g' => { + 'name' => 'Linksys WRT854G FW', + 'url' => '/Status_Router.asp', + 'skip' => 'IP Address:', + }, + 'maxgate-ugate3x00' => { + 'name' => 'MaxGate UGATE-3x00 FW', + 'url' => '/Status.htm', + 'skip' => 'WAN.*?IP Address', + }, + 'netcomm-nb3' => { + 'name' => 'NetComm NB3', + 'url' => '/MainPage?id=6', + 'skip' => 'ppp-0', + }, + '3com-3c886a' => { + 'name' => '3com 3c886a 56k Lan Modem', + 'url' => '/stat3.htm', + 'skip' => 'IP address in use', + }, + 'sohoware-nbg800' => { + 'name' => 'SOHOWare BroadGuard NBG800', + 'url' => '/status.htm', + 'skip' => 'Internet IP', + }, + 'xsense-aero' => { + 'name' => 'Xsense Aero', + 'url' => '/A_SysInfo.htm', + 'skip' => 'WAN.*?IP Address', + }, + 'alcatel-stp' => { + 'name' => 'Alcatel Speed Touch Pro', + 'url' => '/cgi/router/', + 'skip' => 'Brt', + }, + 'alcatel-510' => { + 'name' => 'Alcatel Speed Touch 510', + 'url' => '/cgi/ip/', + 'skip' => 'ppp', + }, + 'allnet-1298' => { + 'name' => 'Allnet 1298', + 'url' => '/cgi/router/', + 'skip' => 'WAN', + }, + '3com-oc-remote812' => { + 'name' => '3com OfficeConnect Remote 812', + 'url' => '/callEvent', + 'skip' => '.*IP address in use', + }, + 'e-tech' => { + 'name' => 'E-tech Router', + 'url' => '/Status.htm', + 'skip' => 'Public IP Address', + }, + 'cayman-3220h' => { + 'name' => 'Cayman 3220-H DSL', + 'url' => '/shell/show+ip+interfaces', + 'skip' => '.*inet', + }, + 'vigor-2200usb' => { + 'name' => 'Vigor 2200 USB', + 'url' => '/doc/online.sht', + 'skip' => 'PPPoA', +# 'skip' => 'PPPoA
', + }, + 'dlink-614' => { + 'name' => 'D-Link DI-614+', + 'url' => '/st_devic.html', + 'skip' => 'WAN', + }, + 'dlink-604' => { + 'name' => 'D-Link DI-604', + 'url' => '/st_devic.html', + 'skip' => 'WAN.*?IP.*Address', + }, + 'olitec-SX200' => { + 'name' => 'olitec-SX200', + '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', + }, + '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}", + 'web' => ": obtain IP from an IP discovery page on the web", + 'fw' => ": obtain IP from the firewall specified by -fw {type|address}", + 'if' => ": obtain IP from the -if {interface}", + 'cmd' => ": obtain IP from the -cmd {external-command}", + 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", + map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, +); +sub ip_strategies_usage { + return map { sprintf(" -use=%-22s %s.", $_, $ip_strategies{$_}) } sort keys %ip_strategies; +} + +my %web_strategies = ( + 'dyndns'=> 1, + 'dnspark'=> 1, +); + +sub setv { + return { + 'type' => shift, + 'required' => shift, + 'cache' => shift, + 'config' => shift, + 'default' => shift, + 'minimum' => shift, + }; +}; +my %variables = ( + 'global-defaults' => { + 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), + 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), + 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), + 'pid' => setv(T_FILE, 0, 0, 1, "", undef), + 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), + 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), + + 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), + 'ip' => setv(T_IP, 0, 0, 1, undef, undef), + 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), + 'if-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), + 'web-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw' => setv(T_ANY, 0, 0, 1, '', undef), + 'fw-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw-login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'fw-password' => setv(T_PASSWD,1, 0, 1, '', undef), + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), + + '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), + 'priority' => setv(T_STRING,0, 0, 1, 'notice', undef), + 'mail' => setv(T_EMAIL, 0, 0, 1, '', undef), + 'mail-failure' => setv(T_EMAIL, 0, 0, 1, '', undef), + + 'exec' => setv(T_BOOL, 0, 0, 1, 1, undef), + 'debug' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'verbose' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'quiet' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'help' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'test' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'geturl' => setv(T_STRING,0, 0, 0, '', undef), + + 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), + }, + 'service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, + 'dyndns-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'dnspark-common-defaults' => { + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), + }, +); +my %services = ( + 'dyndns1' => { + 'updateable' => \&nic_dyndns2_updateable, + 'update' => \&nic_dyndns1_update, + 'examples' => \&nic_dyndns1_examples, + 'variables' => merge( + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'dyndns2' => { + 'updateable' => \&nic_dyndns2_updateable, + 'update' => \&nic_dyndns2_update, + 'examples' => \&nic_dyndns2_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, +# { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'concont' => { + 'updateable' => undef, + 'update' => \&nic_concont_update, + 'examples' => \&nic_concont_examples, + 'variables' => merge( + $variables{'service-common-defaults'}, + { 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), }, + { 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + ), + }, + 'dslreports1' => { + 'updateable' => undef, + 'update' => \&nic_dslreports1_update, + 'examples' => \&nic_dslreports1_examples, + 'variables' => merge( + { 'host' => setv(T_NUMBER, 1, 1, 1, 0, undef) }, + $variables{'service-common-defaults'}, + ), + }, + 'hammernode1' => { + 'updateable' => undef, + 'update' => \&nic_hammernode1_update, + 'examples' => \&nic_hammernode1_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dup.hn.org', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'zoneedit1' => { + 'updateable' => undef, + 'update' => \&nic_zoneedit1_update, + 'examples' => \&nic_zoneedit1_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.zoneedit.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'easydns' => { + 'updateable' => undef, + 'update' => \&nic_easydns_update, + 'examples' => \&nic_easydns_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'service-common-defaults'}, + ), + }, + 'dnspark' => { + 'updateable' => undef, + 'update' => \&nic_dnspark_update, + 'examples' => \&nic_dnspark_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'dnspark-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, + 'namecheap' => { + 'updateable' => undef, + 'update' => \&nic_namecheap_update, + 'examples' => \&nic_namecheap_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamicdns.park-your-domain.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, + 'sitelutions' => { + 'updateable' => undef, + 'update' => \&nic_sitelutions_update, + 'examples' => \&nic_sitelutions_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.sitelutions.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, +); +$variables{'merged'} = merge($variables{'global-defaults'}, + $variables{'service-common-defaults'}, + $variables{'dyndns-common-defaults'}, + map { $services{$_}{'variables'} } keys %services, +); + +my @opt = ( + "usage: ${program} [options]", + "options are:", + [ "daemon", "=s", "-daemon delay : run as a daemon" ], + [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], + [ "server", "=s", "-server host : update DNS information on 'host'" ], + [ "protocol", "=s", "-protocol type : update protocol used" ], + [ "file", "=s", "-file path : load configuration information from 'path'" ], + [ "cache", "=s", "-cache path : record address used in 'path'" ], + [ "pid", "=s", "-pid path : record process id in 'path'" ], + "", + [ "use", "=s", "-use which : how the should IP address be obtained." ], + &ip_strategies_usage(), + "", + [ "ip", "=s", "-ip address : set the IP address to 'address'" ], + "", + [ "if", "=s", "-if interface : obtain IP address from 'interface'" ], + [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ], + "", + [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ], + [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ], + "", + [ "fw", "=s", "-fw address|url : obtain IP address from firewall at 'address'" ], + [ "fw-skip", "=s", "-fw-skip pattern : skip any IP addresses before 'pattern' on the firewall address|url" ], + [ "fw-login", "=s", "-fw-login login : use 'login' when getting IP from fw" ], + [ "fw-password", "=s", "-fw-password secret : use password 'secret' when getting IP from fw" ], + "", + [ "cmd", "=s", "-cmd program : obtain IP address from by calling {program}" ], + [ "cmd-skip", "=s", "-cmd-skip pattern : skip any IP addresses before 'pattern' in the output of {cmd}" ], + "", + [ "login", "=s", "-login user : login as 'user'" ], + [ "password", "=s", "-password secret : use password 'secret'" ], + [ "host", "=s", "-host host : update DNS information for 'host'" ], + "", + [ "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" ], + + [ "syslog", "!", "-{no}syslog : log messages to syslog" ], + [ "facility", "=s", "-facility {type} : log messages to syslog to facility {type}" ], + [ "priority", "=s", "-priority {pri} : log messages to syslog with priority {pri}" ], + [ "mail", "=s", "-mail address : e-mail messages to {address}" ], + [ "mail-failure","=s", "-mail-failure address : e-mail messages for failed updates to {address}" ], + [ "exec", "!", "-{no}exec : do {not} execute; just show what would be done" ], + [ "debug", "!", "-{no}debug : print {no} debugging information" ], + [ "verbose", "!", "-{no}verbose : print {no} verbose information" ], + [ "quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates" ], + [ "help", "", "-help : this message" ], + + [ "query", "!", "-{no}query : print {no} ip addresses and exit" ], + [ "test", "!", "" ], ## hidden + [ "geturl", "=s", "" ], ## hidden + "", + nic_examples(), + "$program version $version, ", + " originally written by Paul Burry, paul+ddclient\@burry.ca", + " maintained by WimPunk" +); + +## process args +my ($opt_usage, %opt) = process_args(@opt); +my ($result, %config, %globals, %cache); +my $saved_cache = ''; +my %saved_opt = %opt; +$result = 'OK'; + +test_geturl(opt('geturl')) if opt('geturl'); + +## read config file because 'daemon' mode may be defined there. +read_config(define($opt{'file'}, default('file')), \%config, \%globals); +init_config(); +test_possible_ip() if opt('query'); + +if (!opt('daemon') && $programd =~ /d$/) { + $opt{'daemon'} = minimum('daemon'); +} +my $caught_hup = 0; +my $caught_term = 0; +$SIG{'HUP'} = sub { $caught_hup = 1; }; +$SIG{'TERM'} = sub { $caught_term = 1; }; +if (opt('daemon') && !opt('force')) { + $SIG{'CHLD'} = 'IGNORE'; + my $pid = fork; + if ($pid < 0) { + print STDERR "${program}: can not fork ($!)\n"; + exit -1; + } elsif ($pid) { + exit 0; + } + $SIG{'CHLD'} = 'DEFAULT'; + $opt{'syslog'} = 1; + open(STDOUT, ">/dev/null"); + open(STDERR, ">/dev/null"); + open(STDIN, " 0) && !$caught_hup && !$caught_term) { + my $delay = $left > 10 ? 10 : $left; + + $0 = sprintf("%s - sleeping for %s seconds", $program, $left); + $left -= sleep $delay; + } + $caught_hup = 0; + $result = 0; + + } elsif (! scalar(%config)) { + warning("no hosts to update.") unless !opt('quiet') || opt('verbose') || !$daemon; + $result = 1; + + } else { + $result = $result eq 'OK' ? 0 : 1; + } +} while ($daemon && !$result && !$caught_term); + +warning("caught SIGTERM; exiting") if $caught_term; +unlink_pid(); +sendmail(); + +exit($result); + +###################################################################### +## runpostscript +###################################################################### + +sub runpostscript { + my ($ip) = @_; + + if ( defined $globals{postscript} ) { + if ( -x $globals{postscript}) { + system ("$globals{postscript} $ip &"); + } else { + warning ("Can not execute post script: %s", $globals{postscript}); + } + } +} + +###################################################################### +## update_nics +###################################################################### +sub update_nics { + my %examined = (); + + foreach my $s (sort keys %services) { + my @hosts = (); + my $updateable = $services{$s}{'updateable'}; + my $update = $services{$s}{'update'}; + + foreach my $h (sort keys %config) { + next if $config{$h}{'protocol'} ne lc($s); + $examined{$h} = 1; + next if !nic_updateable($h, $updateable); + push @hosts, $h; + } + if (@hosts) { + $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); + &$update(@hosts); + runpostscript($ip); + } + } + foreach my $h (sort keys %config) { + if (!exists $examined{$h}) { + failed("%s was not updated because protocol %s is not supported.", + $h, define($config{$h}{'protocol'}, '') + ); + } + } + write_cache(opt('cache')); +} +###################################################################### +## unlink_pid() +###################################################################### +sub unlink_pid { + if (opt('pid') && opt('daemon')) { + unlink opt('pid'); + } +} + +###################################################################### +## write_pid() +###################################################################### +sub write_pid { + my $file = opt('pid'); + + if ($file && opt('daemon')) { + local *FD; + if (! open(FD, "> $file")) { + warning("Cannot create file '%s'. ($!)", $file); + + } else { + printf FD "$$\n"; + close(FD); + } + } +} + +###################################################################### +## write_cache($file) +###################################################################### +sub write_cache { + my ($file) = @_; + + ## merge the updated host entries into the cache. + foreach my $h (keys %config) { + if (! exists $cache{$h} || $config{$h}{'update'}) { + map {$cache{$h}{$_} = $config{$h}{$_} } @{$config{$h}{'cacheable'}}; + + } else { + map {$cache{$h}{$_} = $config{$h}{$_} } qw(atime wtime status); + } + } + + ## construct the cache file. + my $cache = ""; + foreach my $h (sort keys %cache) { + my $opt = join(',', map { "$_=".define($cache{$h}{$_},'') } sort keys %{$cache{$h}}); + + $cache .= sprintf "%s%s%s\n", $opt, ($opt ? ' ' : ''), $h; + } + $file = '' if defined($saved_cache) && $cache eq $saved_cache; + + ## write the updates and other entries to the cache file. + if ($file) { + $saved_cache = undef; + local *FD; + if (! open(FD, "> $file")) { + fatal("Cannot create file '%s'. ($!)", $file); + } + printf FD "## $program-$version\n"; + printf FD "## last updated at %s (%d)\n", prettytime($now), $now; + printf FD $cache; + + close(FD); + } +} +###################################################################### +## read_cache($file) - called before reading the .conf +###################################################################### +sub read_cache { + my $file = shift; + my $config = shift; + my $globals = {}; + + %{$config} = (); + ## read the cache file ignoring anything on the command-line. + if (-e $file) { + my %saved = %opt; + %opt = (); + $saved_cache = _read_config($config, $globals, "##\\s*$program-$version\\s*", $file); + %opt = %saved; + + foreach my $h (keys %cache) { + if (exists $config{$h}) { + foreach (qw(atime mtime wtime ip status)) { + $config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; + } + } + } + } +} +###################################################################### +## parse_assignments(string) return (rest, %variables) +## parse_assignment(string) return (name, value, rest) +###################################################################### +sub parse_assignments { + my $rest = shift; + my @args = @_; + my %variables = (); + my ($name, $value); + + while (1) { + $rest =~ s/^\s+//; + ($name, $value, $rest) = parse_assignment($rest, @args); + if (defined $name) { + $variables{$name} = $value; + } else { + last; + } + } + return ($rest, %variables); +} +sub parse_assignment { + my $rest = shift; + my $stop = @_ ? shift : '[\n\s,]'; + my ($c, $name, $value); + my ($escape, $quote) = (0, ''); + + if ($rest =~ /^\s*([a-z][a-z_-]*)=(.*)/i) { + ($name, $rest, $value) = ($1, $2, ''); + + while (length($c = substr($rest,0,1))) { + $rest = substr($rest,1); + if ($escape) { + $value .= $c; + $escape = 0; + } elsif ($c eq "\\") { + $escape = 1; + } elsif ($quote && $c eq $quote) { + $quote = '' + } elsif (!$quote && $c =~ /[\'\"]/) { + $quote = $c; + } elsif (!$quote && $c =~ /^${stop}/) { + last; + } else { + $value .= $c; + } + } + } + warning("assignment ended with an open quote") if $quote; + return ($name, $value, $rest); +} +###################################################################### +## read_config +###################################################################### +sub read_config { + my $file = shift; + my $config = shift; + my $globals = shift; + my %globals = (); + + _read_config($config, $globals, '', $file, %globals); +} +sub _read_config { + my $config = shift; + my $globals = shift; + my $stamp = shift; + local $file = shift; + my %globals = @_; + my %config = (); + my $content = ''; + + local *FD; + if (! open(FD, "< $file")) { + # fatal("Cannot open file '%s'. ($!)", $file); + warning("Cannot open file '%s'. ($!)", $file); + } + # Check for only owner has any access to config file + my ($dev, $ino, $mode, @statrest) = stat(FD); + if ($mode & 077) { + if (-f FD && (chmod 0600, $file)) { + warning("file $file must be accessible only by its owner (fixed)."); + } else { + # fatal("file $file must be accessible only by its owner."); + warning("file $file must be accessible only by its owner."); + } + } + + local $lineno = 0; + my $continuation = ''; + while () { + s/[\r\n]//g; + + $lineno++; + + ## check for the program version stamp + if (($. == 1) && $stamp && ($_ !~ /^$stamp$/i)) { + warning("program version mismatch; ignoring %s", $file); + last; + } + 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 /^#/; + # 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$_"; + if (/\\$/) { + chop; + $continuation = $_; + next; + } + $continuation = ''; + + s/^\s+//; # remove leading white space + s/\s+$//; # remove trailing white space + s/\s+/ /g; # canonify + next if /^$/; + + ## expected configuration line is: + ## [opt=value,opt=..] [host [login [password]]] + my %locals; + ($_, %locals) = parse_assignments($_); + s/\s*,\s*/,/g; + my @args = split; + + ## 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}; + } 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}"; + } + ## accumulate globals + if ($#args < 0) { + map { $globals{$_} = $locals{$_} } keys %locals; + } + + ## process this host definition + if (@args) { + my ($host, $login, $password) = @args; + + ## add in any globals.. + %locals = %{ merge(\%locals, \%globals) }; + + ## override login and password if specified the old way. + $locals{'login'} = $login if defined $login; + $locals{'password'} = $password if defined $password; + + ## allow {host} to be a comma separated list of hosts + foreach my $h (split_by_comma($host)) { + ## save a copy of the current globals + $config{$h} = { %locals }; + $config{$h}{'host'} = $h; + } + } + } + close(FD); + + warning("file ends while expecting a continuation line.") + if $continuation; + + %$globals = %globals; + %$config = %config; + + return $content; +} +###################################################################### +## init_config - +###################################################################### +sub init_config { + %opt = %saved_opt; + + ## + $opt{'quiet'} = 0 if opt('verbose'); + + ## infer the IP strategy if possible + $opt{'use'} = 'ip' if !define($opt{'use'}) && defined($opt{'ip'}); + $opt{'use'} = 'if' if !define($opt{'use'}) && defined($opt{'if'}); + $opt{'use'} = 'web' if !define($opt{'use'}) && defined($opt{'web'}); + + ## sanity check + $opt{'max-interval'} = max(interval(opt('max-interval')), interval(default('max-interval'))); + $opt{'min-interval'} = max(interval(opt('min-interval')), interval(default('min-interval'))); + $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); + + $opt{'timeout'} = 0 if opt('timeout') < 0; + $opt{'daemon'} = minimum('daemon') + if define($opt{'daemon'},$globals{'daemon'},0) + && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { + ## collect cmdline configuration options. + my %options = (); + foreach my $opt (split_by_comma($opt{'options'})) { + my ($name,$var) = split /\s*=\s*/, $opt; + $options{$name} = $var; + } + ## determine hosts specified with -host + my @hosts = (); + if (exists $opt{'host'}) { + foreach my $h (split_by_comma($opt{'host'})) { + push @hosts, $h; + } + } + ## and those in -options=... + if (exists $options{'host'}) { + foreach my $h (split_by_comma($options{'host'})) { + push @hosts, $h; + } + delete $options{'host'}; + } + ## merge options into host definitions or globals + if (@hosts) { + foreach my $h (@hosts) { + $config{$h} = %{ merge(\%options, $config{$h}) }; + } + $opt{'host'} = join(',', @hosts); + } else { + %globals = %{ merge(\%options, \%globals) }; + } + } + + ## override global options with those on the command-line. + foreach my $o (keys %opt) { + if (defined $opt{$o} && exists $variables{'global-defaults'}{$o}) { + $globals{$o} = $opt{$o}; + } + } + + ## sanity check + if (defined $opt{'host'} && defined $opt{'retry'}) { + usage("options -retry and -host (or -option host=..) are mutually exclusive"); + } + + ## determine hosts to update (those on the cmd-line, config-file, or failed cached) + my @hosts = keys %config; + if (opt('host')) { + @hosts = split_by_comma($opt{'host'}); + } + if (opt('retry')) { + @hosts = map { $_ if $cache{$_}{'status'} ne 'good' } keys %cache; + } + + ## remove any other hosts + my %hosts; + map { $hosts{$_} = undef } @hosts; + map { delete $config{$_} unless exists $hosts{$_} } keys %config; + + ## collect the cacheable variables. + foreach my $proto (keys %services) { + my @cacheable = (); + foreach my $k (keys %{$services{$proto}{'variables'}}) { + push @cacheable, $k if $services{$proto}{'variables'}{$k}{'cache'}; + } + $services{$proto}{'cacheable'} = [ @cacheable ]; + } + + ## sanity check.. + ## make sure config entries have all defaults and they meet minimums + ## first the globals... + foreach my $k (keys %globals) { + my $def = $variables{'merged'}{$k}; + my $ovalue = define($globals{$k}, $def->{'default'}); + my $value = check_value($ovalue, $def); + if ($def->{'required'} && !defined $value) { + $value = default($k); + warning("'%s=%s' is an invalid %s. (using default of %s)", $k, $ovalue, $def->{'type'}, $value); + } + $globals{$k} = $value; + } + + ## now the host definitions... + HOST: + foreach my $h (keys %config) { + my $proto; + $proto = $config{$h}{'protocol'}; + $proto = opt('protocol') if !defined($proto); + + if (!exists($services{$proto})) { + warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); + delete $config{$h}; + + } else { + my $svars = $services{$proto}{'variables'}; + my $conf = { 'protocol' => $proto }; + + foreach my $k (keys %$svars) { + my $def = $svars->{$k}; + my $ovalue = define($config{$h}{$k}, $def->{'default'}); + my $value = check_value($ovalue, $def); + if ($def->{'required'} && !defined $value) { + warning("skipping host: %s: '%s=%s' is an invalid %s.", $h, $k, $ovalue, $def->{'type'}); + delete $config{$h}; + next HOST; + } + $conf->{$k} = $value; + + } + $config{$h} = $conf; + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } + if (opt('help')) { + *STDERR = *STDOUT; + usage(); + } +} + +###################################################################### +## usage +###################################################################### +sub usage { + my $msg = ''; + if (@_) { + my $format = shift; + $msg .= sprintf $format, @_; + 1 while chomp($msg); + $msg .= "\n"; + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); + exit 1; +} + +###################################################################### +## process_args - +###################################################################### +sub process_args { + my @spec = (); + my $usage = ""; + my %opts = (); + + foreach (@_) { + if (ref $_) { + my ($key, $specifier, $arg_usage) = @$_; + my $value = default($key); + + ## add a option specifier + push @spec, $key . $specifier; + + ## define the default value which can be overwritten later + $opt{$key} = undef; + + next unless $arg_usage; + + ## add a line to the usage; + $usage .= " $arg_usage"; + if (defined($value) && $value ne '') { + $usage .= " (default: "; + if ($specifier eq '!') { + $usage .= "no" if ($specifier eq '!') && !$value; + $usage .= $key; + } else { + $usage .= $value; + } + $usage .= ")"; + } + $usage .= "."; + } else { + $usage .= $_; + } + $usage .= "\n"; + } + ## process the arguments + if (! GetOptions(\%opt, @spec)) { + $opt{"help"} = 1; + } + return ($usage, %opt); +} +###################################################################### +## test_possible_ip - print possible IPs +###################################################################### +sub test_possible_ip { + local $opt{'debug'} = 0; + + printf "use=ip, ip=%s address is %s\n", opt('ip'), define(get_ip('ip'), 'NOT FOUND') + if defined opt('ip'); + + { + local $opt{'use'} = 'if'; + foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) { + $if =~ s/:?\s.*//is; + local $opt{'if'} = $if; + printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND'); + } + } + if (opt('fw')) { + if (opt('fw') !~ m%/%) { + foreach my $fw (sort keys %builtinfw) { + local $opt{'use'} = $fw; + printf "use=$fw address is %s\n", define(get_ip($fw), 'NOT FOUND'); + } + } + local $opt{'use'} = 'fw'; + printf "use=fw, fw=%s address is %s\n", opt('fw'), define(get_ip(opt('fw')), 'NOT FOUND') + if ! exists $builtinfw{opt('fw')}; + + } + { + local $opt{'use'} = 'web'; + foreach my $web (sort keys %builtinweb) { + local $opt{'web'} = $web; + printf "use=web, web=$web address is %s\n", define(get_ip('web'), 'NOT FOUND'); + } + printf "use=web, web=%s address is %s\n", opt('web'), define(get_ip('web'), 'NOT FOUND') + if ! exists $builtinweb{opt('web')}; + } + if (opt('cmd')) { + local $opt{'use'} = 'cmd'; + printf "use=cmd, cmd=%s address is %s\n", opt('cmd'), define(get_ip('cmd'), 'NOT FOUND'); + } + exit 0 unless opt('debug'); +} +###################################################################### +## test_geturl - print (and save if -test) result of fetching a URL +###################################################################### +sub test_geturl { + my $url = shift; + + my $reply = geturl(opt('proxy'), $url, opt('login'), opt('password')); + print "URL $url\n";; + print defined($reply) ? $reply : "\n"; + exit; +} +###################################################################### +## load_file +###################################################################### +sub load_file { + my $file = shift; + my $buffer = ''; + + if (exists($ENV{'TEST_CASE'})) { + my $try = "$file-$ENV{'TEST_CASE'}"; + $file = $try if -f $try; + } + + local *FD; + if (open(FD, "< $file")) { + read(FD, $buffer, -s FD); + close(FD); + debug("Loaded %d bytes from %s", length($buffer), $file); + } else { + debug("Load failed from %s ($!)", $file); + } + return $buffer +} +###################################################################### +## save_file +###################################################################### +sub save_file { + my ($file, $buffer, $opt) = @_; + + $file .= "-$ENV{'TEST_CASE'}" if exists $ENV{'TEST_CASE'}; + if (defined $opt) { + my $i = 0; + while (-f "$file-$i") { + if ('unique' =~ /^$opt/i) { + my $a = join('\n', grep {!/^Date:/} split /\n/, $buffer); + my $b = join('\n', grep {!/^Date:/} split /\n/, load_file("$file-$i")); + last if $a eq $b; + } + $i++; + } + $file = "$file-$i"; + } + debug("Saving to %s", $file); + local *FD; + open(FD, "> $file") or return; + print FD $buffer; + close(FD); + return $buffer; +} +###################################################################### +## print_opt +## print_globals +## print_config +## print_cache +## print_info +###################################################################### +sub _print_hash { + my ($string, $ptr) = @_; + my $value = $ptr; + + if (! defined($ptr)) { + $value = ""; + } elsif (ref $ptr eq 'HASH') { + foreach my $key (sort keys %$ptr) { + _print_hash("${string}\{$key\}", $ptr->{$key}); + } + return; + } + printf "%-36s : %s\n", $string, $value; +} +sub print_hash { + my ($string, $hash) = @_; + printf "=== %s ====\n", $string; + _print_hash($string, $hash); +} +sub print_opt { print_hash("opt", \%opt); } +sub print_globals { print_hash("globals", \%globals); } +sub print_config { print_hash("config", \%config); } +sub print_cache { print_hash("cache", \%cache); } +sub print_info { + print_opt(); + print_globals(); + print_config(); + print_cache(); +} +###################################################################### +## pipecmd - run an external command +## logger +## sendmail +###################################################################### +sub pipecmd { + my $cmd = shift; + my $stdin = join("\n", @_); + my $ok = 0; + + ## remove trailing newlines + 1 while chomp($stdin); + + ## override when debugging. + $cmd = opt('exec') ? "| $cmd" : "> /dev/null"; + + ## execute the command. + local *FD; + if (! open(FD, $cmd)) { + printf STDERR "$program: cannot execute command %s.\n", $cmd; + + } elsif ($stdin && (! print FD "$stdin\n")) { + printf STDERR "$program: failed writting to %s.\n", $cmd; + close(FD); + + } elsif (! close(FD)) { + printf STDERR "$program: failed closing %s.($@)\n", $cmd; + + } elsif (opt('exec') && $?) { + printf STDERR "$program: failed %s. ($@)\n", $cmd; + + } else { + $ok = 1; + } + return $ok; +} +sub logger { + if (opt('syslog') && opt('facility') && opt('priority')) { + my $facility = opt('facility'); + my $priority = opt('priority'); + return pipecmd("logger -p$facility.$priority -t${program}\[$$\]", @_); + } + return 1; +} +sub sendmail { + my $recipients = opt('mail'); + + if (opt('mail-failure') && ($result ne 'OK')) { + $recipients = opt('mail-failure'); + } + if ($msgs && $recipients && $msgs ne $last_msgs) { + pipecmd("sendmail -oi $recipients", + "To: $recipients", + "Subject: status report from $program\@$hostname", + "\r\n", + $msgs, + "", + "regards,", + " $program\@$hostname (version $version)" + ); + } + $last_msgs = $msgs; + $msgs = ''; +} +###################################################################### +## split_by_comma +## merge +## default +## minimum +## opt +###################################################################### +sub split_by_comma { + my $string = shift; + + return split /\s*[, ]\s*/, $string if defined $string; + return (); +} +sub merge { + my %merged = (); + foreach my $h (@_) { + foreach my $k (keys %$h) { + $merged{$k} = $h->{$k} unless exists $merged{$k}; + } + } + return \%merged; +} +sub default { + my $v = shift; + return $variables{'merged'}{$v}{'default'}; +} +sub minimum { + my $v = shift; + return $variables{'merged'}{$v}{'minimum'}; +} +sub opt { + my $v = shift; + return $opt{$v} if defined $opt{$v}; + return $globals{$v} if defined $globals{$v}; + return default($v) if defined default($v); + return undef; +} +sub min { + my $min = shift; + foreach my $arg (@_) { + $min = $arg if $arg < $min; + } + return $min; +} +sub max { + my $max = shift; + foreach my $arg (@_) { + $max = $arg if $arg > $max; + } + return $max; +} +###################################################################### +## define +###################################################################### +sub define { + foreach (@_) { + return $_ if defined $_; + } + return undef; +} +###################################################################### +## ynu +###################################################################### +sub ynu { + my ($value, $yes, $no, $undef) = @_; + + return $no if !defined($value) || !$value; + return $yes if $value eq '1'; + foreach (qw(yes true)) { + return $yes if $_ =~ /^$value/i; + } + foreach (qw(no false)) { + return $no if $_ =~ /^$value/i; + } + return $undef; +} +###################################################################### +## msg +## debug +## warning +## fatal +###################################################################### +sub _msg { + my $log = shift; + my $prefix = shift; + my $format = shift; + my $buffer = sprintf $format, @_; + chomp($buffer); + + $prefix = sprintf "%-9s ", $prefix if $prefix; + if ($file) { + $prefix .= "file $file"; + $prefix .= ", line $lineno" if $lineno; + $prefix .= ": "; + } + if ($prefix) { + $buffer = "$prefix$buffer"; + $buffer =~ s/\n/\n$prefix /g; + } + $buffer .= "\n"; + print $buffer; + + $msgs .= $buffer if $log; + logger($buffer) if $log; + +} +sub msg { _msg(0, '', @_); } +sub verbose { _msg(1, @_) if opt('verbose'); } +sub info { _msg(1, 'INFO:', @_) if opt('verbose'); } +sub debug { _msg(0, 'DEBUG:', @_) if opt('debug'); } +sub debug2 { _msg(0, 'DEBUG:', @_) if opt('debug') && opt('verbose');} +sub warning { _msg(1, 'WARNING:', @_); } +sub fatal { _msg(1, 'FATAL:', @_); sendmail(); exit(1); } +sub success { _msg(1, 'SUCCESS:', @_); } +sub failed { _msg(1, 'FAILED:', @_); $result = 'FAILED'; } +sub prettytime { return scalar(localtime(shift)); } + +sub prettyinterval { + my $interval = shift; + use integer; + my $s = $interval % 60; $interval /= 60; + my $m = $interval % 60; $interval /= 60; + my $h = $interval % 24; $interval /= 24; + my $d = $interval; + + my $string = ""; + $string .= "$d day" if $d; + $string .= "s" if $d > 1; + $string .= ", " if $string && $h; + $string .= "$h hour" if $h; + $string .= "s" if $h > 1; + $string .= ", " if $string && $m; + $string .= "$m minute" if $m; + $string .= "s" if $m > 1; + $string .= ", " if $string && $s; + $string .= "$s second" if $s; + $string .= "s" if $s > 1; + return $string; +} +sub interval { + my $value = shift; + if ($value =~ /^(\d+)(seconds|s)/i) { + $value = $1; + } elsif ($value =~ /^(\d+)(minutes|m)/i) { + $value = $1 * 60; + } elsif ($value =~ /^(\d+)(hours|h)/i) { + $value = $1 * 60*60; + } elsif ($value =~ /^(\d+)(days|d)/i) { + $value = $1 * 60*60*24; + } elsif ($value !~ /^\d+$/) { + $value = undef; + } + return $value; +} +sub interval_expired { + my ($host, $time, $interval) = @_; + + return 1 if !exists $cache{$host}; + return 1 if !exists $cache{$host}{$time} || !$cache{$host}{$time}; + return 1 if !exists $config{$host}{$interval} || !$config{$host}{$interval}; + + return $now > ($cache{$host}{$time} + $config{$host}{$interval}); +} + + + +###################################################################### +## check_value +###################################################################### +sub check_value { + my ($value, $def) = @_; + my $type = $def->{'type'}; + my $min = $def->{'minimum'}; + my $required = $def->{'required'}; + + if (!defined $value && !$required) { + ; + + } elsif ($type eq T_DELAY) { + $value = interval($value); + $value = $min if defined($value) && defined($min) && $value < $min; + + } elsif ($type eq T_NUMBER) { + return undef if $value !~ /^\d+$/; + $value = $min if defined($min) && $value < $min; + + } elsif ($type eq T_BOOL) { + if ($value =~ /^y(es)?$|^t(true)?$|^1$/i) { + $value = 1; + } elsif ($value =~ /^n(o)?$|^f(alse)?$|^0$/i) { + $value = 0; + } else { + return undef; + } + } elsif ($type eq T_FQDN || $type eq T_OFQDN && $value ne '') { + $value = lc $value; + return undef if $value !~ /[^.]\.[^.]/; + + } elsif ($type eq T_FQDNP) { + $value = lc $value; + return undef if $value !~ /[^.]\.[^.].*(:\d+)?$/; + + } elsif ($type eq T_PROTO) { + $value = lc $value; + return undef if ! exists $services{$value}; + + } elsif ($type eq T_USE) { + $value = lc $value; + return undef if ! exists $ip_strategies{$value}; + + } elsif ($type eq T_FILE) { + return undef if $value eq ""; + + } elsif ($type eq T_IF) { + return undef if $value !~ /^[a-z0-9:_-]+$/; + + } elsif ($type eq T_PROG) { + return undef if $value eq ""; + + } elsif ($type eq T_LOGIN) { + return undef if $value eq ""; + +# } elsif ($type eq T_PASSWD) { +# return undef if $value =~ /:/; + + } elsif ($type eq T_IP) { + return undef if $value !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + } + return $value; +} +###################################################################### +## encode_base64 - from MIME::Base64 +###################################################################### +sub encode_base64 ($;$) { + my $res = ''; + my $eol = $_[1]; + $eol = "\n" unless defined $eol; + pos($_[0]) = 0; # ensure start at the beginning + while ($_[0] =~ /(.{1,45})/gs) { + $res .= substr(pack('u', $1), 1); + chop($res); + } + $res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs + + # fix padding at the end + my $padding = (3 - length($_[0]) % 3) % 3; + $res =~ s/.{$padding}$/'=' x $padding/e if $padding; + + # break encoded string into lines of no more than 76 characters each + if (length $eol) { + $res =~ s/(.{1,76})/$1$eol/g; + } + $res; +} +###################################################################### +## geturl +###################################################################### +sub geturl { + my $proxy = shift || ''; + my $url = shift || ''; + my $login = shift || ''; + my $password = shift || ''; + 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%^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 = $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"; + $request .= "Host: $server\n"; + + my $auth = encode_base64("${login}:${password}"); + $request .= "Authorization: Basic $auth" if $login || $password; + $request .= "User-Agent: ${program}/${version}\n"; + $request .= "Connection: close\n"; + $request .= "\n"; + + ## make sure newlines are for some pedantic proxy servers + ($rq = $request) =~ s/\n/\r\n/g; + + # local $^W = 0; + $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); + if (! opt('exec')) { + debug("skipped network connection"); + verbose("SENDING:", $request); + } 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: ", $use_ssl ? 'using SSL' : 'using HTTP'); + verbose("SENDING:", $request); + + $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); + my $result = syswrite $sd, $rq; + if ($result != length($rq)) { + warning("cannot send to $peer:$port ($!)."); + + } else { + my $timeout = 0; + local $SIG{'ALRM'} = sub { $timeout = 1; }; + + $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); + alarm(opt('timeout')) if opt('timeout') > 0; + while (!$timeout && ($_ = <$sd>)) { + $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); + verbose("RECEIVE:", "%s", define($_, "")); + $reply .= $_ if defined $_; + } + if (opt('timeout') > 0) { + alarm(0); + } + close($sd); + if ($timeout) { + warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); + $reply = ''; + } + $reply = '' if !defined $reply; + } + } + $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); + + ## during testing simulate reading the URL + if (opt('test')) { + my $filename = "$server/$url"; + $filename =~ s|/|%2F|g; + if (opt('exec')) { + $reply = save_file("${savedir}$filename", $reply, 'unique'); + } else { + $reply = load_file("${savedir}$filename"); + } + } + + $reply =~ s/\r//g if defined $reply; + return $reply; +} +###################################################################### +## get_ip +###################################################################### +sub get_ip { + my $use = lc shift; + my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); + $arg = '' unless $arg; + + if ($use eq 'ip') { + $ip = opt('ip'); + $arg = 'ip'; + + } elsif ($use eq 'if') { + $skip = opt('if-skip') || ''; + $reply = `ifconfig $arg 2> /dev/null`; + $reply = '' if $?; + + } elsif ($use eq 'cmd') { + if ($arg) { + $skip = opt('cmd-skip') || ''; + $reply = `$arg`; + $reply = '' if $?; + } + + } elsif ($use eq 'web') { + $url = opt('web') || ''; + $skip = opt('web-skip') || ''; + + if (exists $builtinweb{$url}) { + $skip = $builtinweb{$url}->{'skip'} unless $skip; + $url = $builtinweb{$url}->{'url'}; + } + $arg = $url; + + if ($url) { + $reply = geturl(opt('proxy'), $url) || ''; + } + + } elsif (($use eq 'cisco')) { + # Stuff added to support Cisco router ip http daemon + # User fw-login should only have level 1 access to prevent + # password theft. This is pretty harmless. + my $queryif = opt('if'); + $skip = opt('fw-skip') || ''; + + # Convert slashes to protected value "\/" + $queryif =~ s%\/%\\\/%g; + + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + + $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + $arg = $url; + + } else { + $url = opt('fw') || ''; + $skip = opt('fw-skip') || ''; + + if (exists $builtinfw{$use}) { + $skip = $builtinfw{$use}->{'skip'} unless $skip; + $url = "http://${url}" . $builtinfw{$use}->{'url'} unless $url =~ /\//; + } + $arg = $url; + + if ($url) { + $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + } + } + if (!defined $reply) { + $reply = ''; + } + if ($skip) { + $skip =~ s/ /\\s/is; + $reply =~ s/^.*?${skip}//is; + } + if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) { + $ip = $1; + } + if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) { + $ip = undef; + } + + debug("get_ip: using %s, %s reports %s", $use, $arg, define($ip, "")); + return $ip; +} + +###################################################################### +## group_hosts_by +###################################################################### +sub group_hosts_by { + my ($hosts, $attributes) = @_; + + my %groups = (); + foreach my $h (@$hosts) { + my @keys = @$attributes; + map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; + my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); + + push @{$groups{$sig}}, $h; + } + return %groups; +} +###################################################################### +## nic_examples +###################################################################### +sub nic_examples { + my $examples = ""; + my $separator = ""; + foreach my $s (sort keys %services) { + my $subr = $services{$s}{'examples'}; + my $example; + + if (defined($subr) && ($example = &$subr())) { + chomp($example); + $examples .= $example; + $examples .= "\n\n$separator"; + $separator = "\n"; + } + } + my $intro = < $now) { + warning("cannot update %s from %s to %s until after %s.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, + prettytime($cache{$host}{'wtime'}) + ); + + } elsif ($cache{$host}{'mtime'} && interval_expired($host, 'mtime', 'max-interval')) { + warning("forcing update of %s from %s to %s; %s since last update on %s.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, + prettyinterval($config{$host}{'max-interval'}), + prettytime($cache{$host}{'mtime'}) + ); + $update = 1; + + } elsif ($cache{$host}{'ip'} ne $ip) { + if (($cache{$host}{'status'} eq 'good') && !interval_expired($host, 'mtime', 'min-interval')) { + + warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), + $ip, + ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), + prettyinterval($config{$host}{'min-interval'}) + ) + if opt('verbose') || !define($cache{$host}{'warned-min-interval'}, 0); + + $cache{$host}{'warned-min-interval'} = $now; + + } elsif (($cache{$host}{'status'} ne 'good') && !interval_expired($host, 'atime', 'min-error-interval')) { + + warning("skipping update of %s from %s to %s.\nlast updated %s but last attempt on %s failed.\nWait at least %s between update attempts.", + $host, + ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), + $ip, + ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), + ($cache{$host}{'atime'} ? prettytime($cache{$host}{'atime'}) : ''), + prettyinterval($config{$host}{'min-error-interval'}) + ) + if opt('verbose') || !define($cache{$host}{'warned-min-error-interval'}, 0); + + $cache{$host}{'warned-min-error-interval'} = $now; + + } else { + $update = 1; + } + + } elsif (defined($sub) && &$sub($host)) { + $update = 1; + + } else { + success("%s: skipped: IP address was already set to %s.", $host, $ip) + if opt('verbose'); + } + $config{$host}{'status'} = define($cache{$host}{'status'},''); + $config{$host}{'update'} = $update; + if ($update) { + $config{$host}{'status'} = 'noconnect'; + $config{$host}{'atime'} = $now; + $config{$host}{'wtime'} = 0; + $config{$host}{'warned-min-interval'} = 0; + $config{$host}{'warned-min-error-interval'} = 0; + + delete $cache{$host}{'warned-min-interval'}; + delete $cache{$host}{'warned-min-error-interval'}; + } + + return $update; +} +###################################################################### +## header_ok +###################################################################### +sub header_ok { + my ($host, $line) = @_; + my $ok = 0; + + if ($line =~ m%^s*HTTP/1.*\s+(\d+)%i) { + my $result = $1; + + if ($result eq '200') { + $ok = 1; + + } elsif ($result eq '401') { + failed("updating %s: authorization failed (%s)", $host, $line); + } + + } else { + failed("updating %s: unexpected line (%s)", $host, $line); + } + return $ok; +} +###################################################################### +## nic_dyndns1_examples +###################################################################### +sub nic_dyndns1_examples { + return <\s*(.*)\s*%i; + $return_code = $1 if $line =~ m%^return\s+code\s*:\s*(.*)\s*$%i; + $error_code = $1 if $line =~ m%^error\s+code\s*:\s*(.*)\s*$%i; + } + + if ($return_code ne 'NOERROR' || $error_code ne 'NOERROR' || !$title) { + $config{$h}{'status'} = 'failed'; + $title = "incomplete response from $config{$h}{server}" unless $title; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: %s", $h, $title); + + } else { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: %s: IP address set to %s (%s)", $h, $return_code, $ip, $title); + } + } +} +###################################################################### +## nic_dyndns2_updateable +###################################################################### +sub nic_dyndns2_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { + info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); + $update = 1; + + } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { + + info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); + $update = 1; + + } + return $update; +} +###################################################################### +## nic_dyndns2_examples +###################################################################### +sub nic_dyndns2_examples { + return < 'Bad authorization (username or password)', + 'badsys' => 'The system parameter given was not valid', + + 'notfqdn' => 'A Fully-Qualified Domain Name was not provided', + 'nohost' => 'The hostname specified does not exist in the database', + '!yours' => 'The hostname specified exists, but not under the username currently being used', + '!donator' => 'The offline setting was set, when the user is not a donator', + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', + 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', + + 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + ## Select the DynDNS system to update + my $url = "http://$config{$h}{'server'}/nic/update?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; +# warning("updating %s: 'custom' and 'offline' may not be used together. ('offline' ignored)", $hosts) +# if $config{$h}{'offline'}; + $url .= 'custom'; + + } elsif ($config{$h}{'static'}) { +# warning("updating %s: 'static' and 'offline' may not be used together. ('offline' ignored)", $hosts) +# if $config{$h}{'offline'}; + $url .= 'statdns'; + + } else { + $url .= 'dyndns'; + } + + $url .= "&hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + ## some args are not valid for a custom domain. + $url .= "&wildcard=ON" if ynu($config{$h}{'wildcard'}, 1, 0, 0); + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status, $ip) = split / /, lc $line; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### +## nic_concont_examples +###################################################################### +sub nic_concont_examples { + return </i, @reply) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } +} +###################################################################### +## nic_zoneedit1_examples +###################################################################### +sub nic_zoneedit1_examples { + return < +# +# +###################################################################### +sub nic_zoneedit1_update { + debug("\nnic_zoneedit1_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server) ]); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + my $url = ''; + $url .= "http://$config{$h}{'server'}/auth/dynamic.html"; + $url .= "?host=$hosts"; + $url .= "&dnsto=$ip" if $ip; + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + foreach my $line (@reply) { + if ($line =~ /^[^<]*<(SUCCESS|ERROR)\s+([^>]+)>(.*)/) { + my ($status, $assignments, $rest) = ($1, $2, $3); + my ($left, %var) = parse_assignments($assignments); + + if (keys %var) { + my ($status_code, $status_text, $status_ip) = ('999', '', $ip); + $status_code = $var{'CODE'} if exists $var{'CODE'}; + $status_text = $var{'TEXT'} if exists $var{'TEXT'}; + $status_ip = $var{'IP'} if exists $var{'IP'}; + + if ($status eq 'SUCCESS' || ($status eq 'ERROR' && $var{'CODE'} eq '707')) { + $config{$h}{'ip'} = $status_ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + success("updating %s: IP address set to %s (%s: %s)", $h, $ip, $status_code, $status_text); + + } else { + $config{$h}{'status'} = 'failed'; + failed("updating %s: %s: %s", $h, $status_code, $status_text); + } + shift @hosts; + $h = $hosts[0]; + $hosts = join(',', @hosts); + } + $line = $rest; + redo if $line; + } + } + failed("updating %s: no response from %s", $hosts, $config{$h}{'server'}) + if @hosts; + } +} +###################################################################### +## nic_easydns_updateable +###################################################################### +sub nic_easydns_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { + info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); + $update = 1; + + } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { + + info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); + $update = 1; + + } + return $update; +} +###################################################################### +## nic_easydns_examples +###################################################################### +sub nic_easydns_examples { + return < [ $_ ] } @_; + + my %errors = ( + 'NOACCESS' => 'Authentication failed. This happens if the username/password OR host or domain are wrong.', + 'NOSERVICE'=> 'Dynamic DNS is not turned on for this domain.', + 'ILLEGAL' => 'Client sent data that is not allowed in a dynamic DNS update.', + 'TOOSOON' => 'Update frequency is too short.', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' + + my $url; + $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; + $url .= "&host_id=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status) = $line =~ /^(\S*)\b.*/; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'NOERROR') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif ($status =~ /TOOSOON/) { + ## make sure we wait at least a little + my ($wait, $units) = (5, 'm'); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + failed("updating %s: %s: %s", $h, $line, $errors{$status}); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + last; + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### + +###################################################################### +## nic_dnspark_updateable +###################################################################### +sub nic_dnspark_updateable { + my $host = shift; + my $update = 0; + + if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { + info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); + $update = 1; + + } elsif ($config{$host}{'mx'} && ($config{$host}{'mxpri'} ne $cache{$host}{'mxpri'})) { + info("forcing updating %s because 'mxpri' has changed to %s.", $host, $config{$host}{'mxpri'}); + $update = 1; + } + return $update; +} +###################################################################### +## nic_dnspark_examples +###################################################################### +sub nic_dnspark_examples { + return < [ $_ ] } @_; + + my %errors = ( + 'nochange' => 'No changes made to the hostname(s). Continual updates with no changes lead to blocked clients.', + 'nofqdn' => 'No valid FQDN (fully qualified domain name) was specified', + 'nohost'=> 'An invalid hostname was specified. This due to the fact the hostname has not been created in the system. Creating new host names via clients is not supported.', + 'abuse' => 'The hostname specified has been blocked for abuse.', + 'unauth' => 'The username specified is not authorized to update this hostname and domain.', + 'blocked' => 'The dynamic update client (specified by the user-agent) has been blocked from the system.', + 'notdyn' => 'The hostname specified has not been marked as a dynamic host. Hosts must be marked as dynamic in the system in order to be updated via clients. This prevents unwanted or accidental updates.', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + #'http://www.dnspark.com:80/visitors/update.html?myip=10.20.30.40&hostname=test.burry.ca' + + my $url; + $url = "http://$config{$h}{'server'}/visitors/update.html"; + $url .= "?hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&mxpri=" . $config{$h}{'mxpri'}; + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status) = $line =~ /^(\S*)\b.*/; + my $h = pop @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'ok') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif ($status =~ /TOOSOON/) { + ## make sure we wait at least a little + my ($wait, $units) = (5, 'm'); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + failed("updating %s: %s: %s", $h, $line, $errors{$status}); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + last; + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} + +###################################################################### + +###################################################################### +## nic_namecheap_examples +###################################################################### +sub nic_namecheap_examples { + return <0/i, @reply) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $url) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } +} + +###################################################################### + + +###################################################################### + +###################################################################### +## nic_sitelutions_examples +###################################################################### +sub nic_sitelutions_examples { + return </dev/null 2>&1 + ;; +esac diff --git a/svn/sample-etc_dhcpc_dhcpcd-eth0.exe b/svn/sample-etc_dhcpc_dhcpcd-eth0.exe new file mode 100644 index 0000000..437e92e --- /dev/null +++ b/svn/sample-etc_dhcpc_dhcpcd-eth0.exe @@ -0,0 +1,20 @@ +#!/bin/sh +###################################################################### +## $Id$ +###################################################################### +PATH=/usr/sbin:${PATH} + +## update the DNS server unless the IP address is a private address +## that may be used as an internal LAN address. This may be true if +## other interfaces are assigned private addresses from internal +## DHCP server. + +case "$1" in +10.*) ;; +172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; +192.168.*) ;; +*) + logger -t dhcpcd IP address changed to $1 + ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 + ;; +esac diff --git a/svn/sample-etc_ppp_ip-up.local b/svn/sample-etc_ppp_ip-up.local new file mode 100644 index 0000000..b7a9025 --- /dev/null +++ b/svn/sample-etc_ppp_ip-up.local @@ -0,0 +1,40 @@ +#!/bin/sh +###################################################################### +## $Id$ +###################################################################### +## +## On my host, pppd invokes this script with args: +## /etc/ppp/ip-up.local ppp0 /dev/pts/1 115200 192.168.2.1 192.168.2.3 +## +## From the manual page for my pppd, these aguments are: +## scriptname interface-name tty-device speed local-IP-address remote-IP-address ipparam +## +## Some people have reported that their pppd returns their +## local-IP-address as $3. If that's also the case for you, +## you may need to change the $4 below to $3. This may not +## be necessary if your pppd also passes the local-ip-address +## in the environment as either PPP_LOCAL or IPLOCAL. +## +###################################################################### +PATH=/usr/sbin:${PATH} +IP= +IP=${IP:-$PPP_LOCAL} +IP=${IP:-$IPLOCAL} +IP=${IP:-$4} + +## update the DNS server unless the IP address is a private address +## that may be used as an internal LAN address (or PPtP tunnel). + +logger -t ddclient $0 $* +case "$IP" in +10.*) ;; +172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; +192.168.*) ;; +"") logger -t ddclient No local IP given so cannot update + ;; +*) ( + sleep 5 + ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 + ) & + ;; +esac diff --git a/svn/sample-etc_rc.d_init.d_ddclient b/svn/sample-etc_rc.d_init.d_ddclient new file mode 100755 index 0000000..ab6faf6 --- /dev/null +++ b/svn/sample-etc_rc.d_init.d_ddclient @@ -0,0 +1,91 @@ +#!/bin/bash +# +# ddclient This shell script takes care of starting and stopping +# ddclient. +# +# chkconfig: 2345 65 35 +# description: ddclient provides support for updating dynamic DNS services. + +CONF=/etc/ddclient/ddclient.conf +program=ddclient + +[ -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 + +# 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: " + if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then + daemon $program $DELAY + else + ddclient $DELAY + fi + echo + ;; + stop) + # Stop daemon. + echo -n "Shutting down ddclient: " + 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) + $0 stop + $0 start + ;; + status) + 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 + ;; + *) + echo "Usage: ddclient {start|stop|restart|status}" + exit 1 +esac + +exit 0 + diff --git a/svn/sample-etc_rc.d_init.d_ddclient.lsb b/svn/sample-etc_rc.d_init.d_ddclient.lsb new file mode 100755 index 0000000..01f06e1 --- /dev/null +++ b/svn/sample-etc_rc.d_init.d_ddclient.lsb @@ -0,0 +1,66 @@ +#!/bin/sh +# +# ddclient This shell script takes care of starting and stopping +# ddclient. +# +# chkconfig: 2345 65 35 +# description: ddclient provides support for updating dynamic DNS services. +# +# Above is for RedHat and now the LSB part +### BEGIN INIT INFO +# Provides: ddclient +# Required-Start: $syslog $remote_fs +# Should-Start: $time ypbind sendmail +# Required-Stop: $syslog $remote_fs +# Should-Stop: $time ypbind sendmail +# Default-Start: 3 5 +# Default-Stop: 0 1 2 6 +# Short-Description: ddclient provides support for updating dynamic DNS services +# Description: ddclient is a Perl client used to update dynamic DNS +# entries for accounts on many dynamic DNS services and +# can be used on many types of firewalls +### END INIT INFO +# +# $Id$ +# +### + +[ -f /etc/ddclient/ddclient.conf ] || exit 0 + +DDCLIENT_BIN=/usr/sbin/ddclient + +# +# LSB Standard (SuSE,RedHat,...) +# +if [ -f /lib/lsb/init-functions ] ; then + . /lib/lsb/init-functions +fi + +# See how we were called. +case "$1" in + start) + echo -n "Starting ddclient " + start_daemon $DDCLIENT_BIN -daemon 300 + rc_status -v + ;; + stop) + echo -n "Shutting down ddclient " + killproc -TERM `basename $DDCLIENT_BIN` + rc_status -v + ;; + restart) + $0 stop + $0 start + rc_status + ;; + status) + echo -n "Checking for service ddclient " + checkproc `basename $DDCLIENT_BIN`w + rc_status -v + ;; + *) + echo "Usage: ddclient {start|stop|restart|status}" + exit 1 +esac + +exit 0 diff --git a/svn/sample-etc_rc.d_init.d_ddclient.redhat b/svn/sample-etc_rc.d_init.d_ddclient.redhat new file mode 100755 index 0000000..a81b8cb --- /dev/null +++ b/svn/sample-etc_rc.d_init.d_ddclient.redhat @@ -0,0 +1,41 @@ +#!/bin/sh +# $Id$ +# ddclient This shell script takes care of starting and stopping +# ddclient. +# +# chkconfig: 2345 65 35 +# description: ddclient provides support for updating dynamic DNS services. + +[ -f /etc/ddclient/ddclient.conf ] || exit 0 + +. /etc/rc.d/init.d/functions + +# See how we were called. +case "$1" in + start) + # Start daemon. + echo -n "Starting ddclient: " + touch /var/lock/subsys/ddclient + daemon ddclient -daemon 300 + echo + ;; + stop) + # Stop daemon. + echo -n "Shutting down ddclient: " + killproc ddclient + echo + rm -f /var/lock/subsys/ddclient + ;; + restart) + $0 stop + $0 start + ;; + status) + status ddclient + ;; + *) + echo "Usage: ddclient {start|stop|restart|status}" + exit 1 +esac + +exit 0 From cbd2c978b4a86db14aaf46c3c70da4bf72fdbe28 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 14 Jun 2006 19:51:39 +0000 Subject: [PATCH 007/231] Created trunk and tags, moved directories to it git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@8 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 0bf9df0a6531234bdc03444e271ef0ac427961ad Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 14 Jun 2006 20:53:35 +0000 Subject: [PATCH 008/231] Changed version number git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@11 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 4 +++- svn/ddclient | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/svn/Changelog b/svn/Changelog index 5496364..078718b 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -1,6 +1,8 @@ Changelog -cvs +3.7.1 + +3.7.0 - Added vi tag - Added support for 2Wire 1701HG Gateway (see https://sourceforge.net/forum/message.php?msg_id=3496041 submitted by hemo) diff --git a/svn/ddclient b/svn/ddclient index a1996a8..e1b29b2 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -14,7 +14,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.0-pre"; +my $version = "3.7.1"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From 3e3f3efa6109d7642940bc730f973ff6ebce5e09 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 14 Jun 2006 20:53:35 +0000 Subject: [PATCH 009/231] Changed version number git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@11 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 4 +++- ddclient | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 5496364..078718b 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,8 @@ Changelog -cvs +3.7.1 + +3.7.0 - Added vi tag - Added support for 2Wire 1701HG Gateway (see https://sourceforge.net/forum/message.php?msg_id=3496041 submitted by hemo) diff --git a/ddclient b/ddclient index a1996a8..e1b29b2 100755 --- a/ddclient +++ b/ddclient @@ -14,7 +14,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.0-pre"; +my $version = "3.7.1"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From 5cdb05bfef2d554292063fccd7e092175970e8b9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 19 Jun 2006 10:23:50 +0000 Subject: [PATCH 010/231] Debuginformation added. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@12 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/index.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/html/index.php b/html/index.php index dc04481..698943d 100644 --- a/html/index.php +++ b/html/index.php @@ -1,3 +1,4 @@ + developers for ddclient on sourceforge"; +// Setting debugshit +if (isset($_REQUEST['debug'])) { + $debug = !($_REQUEST['debug'] == 0); +} else if (isset($_SESSION['debug'])) { + $debug = $_SESSION['debug']; +} else { + $debug = 0; +} +$_SESSION['debug'] = $debug; + // pages information; should be in a database // main @@ -31,6 +42,7 @@ $pages[2]['title'] = "supported protocols"; $pages[3]['nr'] = 3; $pages[3]['title'] = "supported routers"; + $curpage = isset($_GET['page'])?$_GET['page']:0; $titleextra = $pages[$curpage]['title']; $page = $pages[$curpage]['nr']; From d29bee992f21a6fa9f6c0ea1fac692d6dcdd458e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 19 Jun 2006 10:28:43 +0000 Subject: [PATCH 011/231] Added xml.php for debugging git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@13 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/index.php | 7 +++++++ html/xml.php | 0 2 files changed, 7 insertions(+) create mode 100644 html/xml.php diff --git a/html/index.php b/html/index.php index 698943d..02edfbc 100644 --- a/html/index.php +++ b/html/index.php @@ -42,6 +42,11 @@ $pages[2]['title'] = "supported protocols"; $pages[3]['nr'] = 3; $pages[3]['title'] = "supported routers"; +if ($debug) { + $pages[4]['nr'] = 4; +$pages[4]['title'] = "xml"; +} + $curpage = isset($_GET['page'])?$_GET['page']:0; $titleextra = $pages[$curpage]['title']; @@ -687,6 +692,8 @@ $main[] = $text; "

Remember, if your router isn't here, check the result of ddclient --help

"; $main[] = $text; +} else if ($page == 4) { // documentation + require("xml.php"); } ?> diff --git a/html/xml.php b/html/xml.php new file mode 100644 index 0000000..e69de29 From e28475fbc5843b5649eac8afb16a9b0a4c478680 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 19 Jun 2006 10:47:23 +0000 Subject: [PATCH 012/231] Splitted index.php in different files git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@14 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/doc.php | 135 ++++++++++ html/home.php | 105 ++++++++ html/index.php | 651 +--------------------------------------------- html/protocol.php | 333 ++++++++++++++++++++++++ html/router.php | 65 +++++ 5 files changed, 646 insertions(+), 643 deletions(-) create mode 100644 html/doc.php create mode 100644 html/home.php create mode 100644 html/protocol.php create mode 100644 html/router.php diff --git a/html/doc.php b/html/doc.php new file mode 100644 index 0000000..9f42d2c --- /dev/null +++ b/html/doc.php @@ -0,0 +1,135 @@ +\n" . + "This page describes the configuration for ddclient. If you need\n". + "anymore info about supported routers or supported protocols, check the\n" . + "other pages. Other options are described here.\n" . + "\n" . + "

Normally you don't need many arguments when starting ddclient. " . + "You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" \n" . + "which should be enough for most configuration. You can put all the needed\n" . + "parameters in the configuration file.\n" . + "

\n" . + "

" . + "\n" . + "\n" . + "\n" . + "\n" . + "

\n" ; +$main[] = $text; + +$text['id'] = "usage"; +$text['title'] = "Usage"; +$text['menu'] = "usage"; +$text['body'] = + "usage: ddclient [options]
\n". + "options are:
\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "" . + "\n" . + + "\n" . + "\n" . + + "\n" . + "\n" . + + "\n" . + "\n" . + "\n" . + "\n" . + + "\n" . + "\n" . + + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
-daemon delay run as a daemon (default: 0).
-proxy host use 'host' as the HTTP proxy.
-server host update DNS information on 'host' (default: members.dyndns.org).
-protocol type update protocol used (default: dyndns2).
-file path load configuration information from 'path' (default: /etc/ddclient/ddclient.conf).
-cache path record address used in 'path' (default: /etc/ddclient/ddclient.cache).
-pid path record process id in 'path'.
-use which how the should IP address be obtained. (default: ip). \n" . + " More information about the possible use-arguments can be found on \n" . + " the supported routers page
-ip address set the IP address to 'address'.
-if interface obtain IP address from 'interface' (default: ppp0).
-if-skip pattern skip any IP addresses before 'pattern' in the output of ifconfig {if}.
-web provider|url obtain IP address from provider's IP checking page (default: dyndns).
-web-skip pattern skip any IP addresses before 'pattern' on the web provider|url.
-fw address|url obtain IP address from firewall at 'address'.
-fw-skip pattern skip any IP addresses before 'pattern' on the firewall address|url.
-fw-login login use 'login' when getting IP from fw.
-fw-password secret use password 'secret' when getting IP from fw.
-cmd program obtain IP address from by calling {program}.
-cmd-skip pattern skip any IP addresses before 'pattern' in the output of {cmd}.
-login user login as 'user'.
-password secret use password 'secret'.
-host host update DNS information for 'host'.
-{no}retry retry failed updates. (default: noretry).
-{no}force force an update even if the update may be unnecessary (default: noforce).
-timeout max wait at most 'max' seconds for the host to respond (default: 0).
-{no}syslog log messages to syslog (default: nosyslog).
-facility {type} log messages to syslog to facility {type} (default: daemon).
-priority {pri} log messages to syslog with priority {pri} (default: notice).
-mail address e-mail messages to {address}.
-mail-failure address e-mail messages for failed updates to {address}.
-{no}exec do {not} execute; just show what would be done (default: exec).
-{no}debug print {no} debugging information (default: nodebug).
-{no}verbose print {no} verbose information (default: noverbose).
-{no}quiet print {no} messages for unnecessary updates (default: noquiet).
-help this message (default: 0).
-{no}query print {no} ip addresses and exit.
\n" ; + +$main[] = $text; +// config +$text['id'] = "config"; +$text['title'] = "Configuring ddclient"; +$text['menu'] = "config"; +$text['body'] = + "

\n" . + "The configuration file, ddclient.conf, can be used to define the \n" . + "default behaviour and operation of ddclient. The file consists of \n" . + "sequences of global variable definitions and host definitions. \n" . + "Since version 3.6.5, ddclient.conf is located by default in \n" . + "/etc/ddclient/ddclient.conf. Another location can be forced \n" . + "by using the -file option" . + "

\n" . + "

\n" . + "Global definitions look like: \n" . + "name=value [,name=value]* \n" . + "

\n" . + "

\n" . + "Next example \n" . + "specifies that ddclient should operate as a daemon, checking the \n" . + "eth0 interface for an IP address change every 5 minutes and use the \n" . + "'dyndns2' protocol by default. \n" . + "

\n" . + "
\n" .
+  	"daemon=600                   \n" .
+  	"use=if, if=eth0              \n" .
+  	"proxy=proxy.myisp.com        \n" .
+  	"protocol=dyndns2 \n" .
+	"
\n" . + "
". + "

\n" . + "

Host definitions look like: \n" . + "[name=value [,name=value]*]* a.host.domain [,b.host.domain] [login] [password] \n" . + "

\n" . + "Next example specifies two host definitions. \n" . + "The first definition will use the hammernode1 protocol, \n" . + "my-hn-login and my-hn-password to update the ip-address of \n" . + "myhost.hn.org and my2ndhost.hn.org. \n" . + "

\n" . + "The second host definition will use the current default protocol \n" . + "('dyndns2'), my-login and my-password to update the ip-address of \n" . + "myhost.dyndns.org and my2ndhost.dyndns.org. \n" . + "

\n" . + "The order of this sequence is significant because the values of any \n" . + "global variable definitions are bound to a host definition when the \n" . + "host definition is encountered. \n" . + "

\n" . + "

\n" . + "
\n" .
+  	"protocol=hammernode1, \ \n" .
+  	"login=my-hn-login, password=my-hn-password  myhost.hn.org \n" .
+  	"login=my-login, password=my-password  myhost.dyndns.org,my2nd.dyndns.org \n" .
+	"
\n" . + "
". + "

See the sample-ddclient.conf file for further examples.

\n" ; + +$main[] = $text; +?> diff --git a/html/home.php b/html/home.php new file mode 100644 index 0000000..522b687 --- /dev/null +++ b/html/home.php @@ -0,0 +1,105 @@ +" . + "Ddclient is a Perl client used to update dynamic DNS entries for accounts " . + "on Dynamic DNS Network Services' free DNS service. It was origanally " . + "written by Paul Burry and is now maintaned by ".$link['developers'].". " . + "It has the capability to update more than only " . + "dyndns and it can fetch your WAN-ipaddress on a few different ways. Check the " . + "configuration pages to find how to do this." . + "

\n" . + "

\n" . + "According to cudeso.be:
" . + "DDclient is a small but full featured client requiring only Perl " . + "and no additional modules. It runs under most UNIX OSes and has " . + "been tested under GNU/Linux and FreeBSD. 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." . + "

"; +$main[] = $text; + +// install +$text['id'] = "install"; +$text['title'] = "How to install"; +$text['menu'] = "Quick Installation"; +$text['body'] = + "

\n +Ddclient doesn't have any automatic installation procedure. Get the tar-file +from " . $link['download'] . " and untar it. Copy the perl script to your +favorit location (ex. /usr/sbin) and create a /etc/ddclient/ddclient.conf +configuration file. +

+There are a few configuration examples provided which you can copy to +/etc/ddclient/ddclient.conf and modify. More info about the configuration +can be found on the usage page +

+A typical configuration like: +

+
+#
+# /etc/ddclient/ddclient.conf
+#
+protocol=dyndns2
+use=web
+login=mylogin
+password=mypassword
+myhost.dyndns.org
+
+
+

+

+You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" +and put it in your startup scripts. +

\n"; +$main[] = $text; + +// help part +$text['id'] = "help"; +$text['title'] = "Documentation and help"; +$text['menu'] = "Documentation"; +$text['body'] = " +

The documentation about the configuration has been splitted in three +sections. The usage page describes the most parts +of the configuration while the supported protocols +page describes the protocol-specific options. If you want to know how +to use ddclient with your router, check the +supported routers. +

+Debugging ddclient looks pretty hard but it isn't. First try to put \n". + "as less as necessary in your configuration. Try to run \n". + "`./ddclient -daemon=0 -noquiet -debug` and check the result. \n" . + "Try to add the features you need and check it again. Once \n". + "you're happy with the result, run it as a daemon.\n" . + "

\n" . + "

\n" . + "If this doesn't work for you, \n". + "there are a few places where you can look for help. If you need \n". + "any help in configuring ddclient, you could try ddclient --help. \n". + "It should give you all the possible configuration options so.\n" . + "

\n". + "

\n" . + "If you think your configuration is correct, but ddclient doesn't \n" . + "work as you expected, you can enable debug and verbose messages \n" . + "by running ddclient -daemon=0 -debug -verbose -noquiet.\n". + "

\n". + "

\n" . + "If this doesn't help for you, maybe \n" . + "\n" . + "the help forum on sourceforge can bring some help.\n" . + "I know the manual is not very clear, you have to read the example " . + "configurations included in the tar-file or you can run " . + ""ddclient --help" to get more help. " . + "If you lucky you can find some help on #ddclient on irc.freenode.net" . + "

\n" . + "

+More info about the ddclient project can be found on " . + $link['project'] . + "

"; +$main[] = $text; +?> diff --git a/html/index.php b/html/index.php index 02edfbc..77b7feb 100644 --- a/html/index.php +++ b/html/index.php @@ -32,19 +32,25 @@ $_SESSION['debug'] = $debug; // main $pages[0]['nr'] = 0; $pages[0]['title'] = "home"; +$pages[0]['php'] = "home.php"; + // documentation $pages[1]['nr'] = 1; $pages[1]['title'] = "usage"; +$pages[1]['php'] = "doc.php"; $pages[2]['nr'] = 2; $pages[2]['title'] = "supported protocols"; +$pages[2]['php'] = "protocol.php"; $pages[3]['nr'] = 3; $pages[3]['title'] = "supported routers"; +$pages[3]['php'] = "router.php"; if ($debug) { $pages[4]['nr'] = 4; -$pages[4]['title'] = "xml"; + $pages[4]['title'] = "xml"; + $pages[4]['php'] = "xml.php"; } @@ -52,649 +58,8 @@ $curpage = isset($_GET['page'])?$_GET['page']:0; $titleextra = $pages[$curpage]['title']; $page = $pages[$curpage]['nr']; -// filling the page; should be in a dbase to -if ($page == 0 ) { // home page -// Introduction -$text['id'] = "intro"; -$text['title'] = "Introduction"; -$text['menu'] = "Introduction"; -$text['body'] = - "

" . - "Ddclient is a Perl client used to update dynamic DNS entries for accounts " . - "on Dynamic DNS Network Services' free DNS service. It was origanally " . - "written by Paul Burry and is now maintaned by ".$link['developers'].". " . - "It has the capability to update more than only " . - "dyndns and it can fetch your WAN-ipaddress on a few different ways. Check the " . - "configuration pages to find how to do this." . - "

\n" . - "

\n" . - "According to cudeso.be:
" . - "DDclient is a small but full featured client requiring only Perl " . - "and no additional modules. It runs under most UNIX OSes and has " . - "been tested under GNU/Linux and FreeBSD. 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." . - "

"; -$main[] = $text; +require($pages[$page]['php']); -// install -$text['id'] = "install"; -$text['title'] = "How to install"; -$text['menu'] = "Quick Installation"; -$text['body'] = - "

\n -Ddclient doesn't have any automatic installation procedure. Get the tar-file -from " . $link['download'] . " and untar it. Copy the perl script to your -favorit location (ex. /usr/sbin) and create a /etc/ddclient/ddclient.conf -configuration file. -

-There are a few configuration examples provided which you can copy to -/etc/ddclient/ddclient.conf and modify. More info about the configuration -can be found on the usage page -

-A typical configuration like: -

-
-#
-# /etc/ddclient/ddclient.conf
-#
-protocol=dyndns2
-use=web
-login=mylogin
-password=mypassword
-myhost.dyndns.org
-
-
-

-

-You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" -and put it in your startup scripts. -

\n"; -$main[] = $text; - -// help part -$text['id'] = "help"; -$text['title'] = "Documentation and help"; -$text['menu'] = "Documentation"; -$text['body'] = " -

The documentation about the configuration has been splitted in three -sections. The usage page describes the most parts -of the configuration while the supported protocols -page describes the protocol-specific options. If you want to know how -to use ddclient with your router, check the -supported routers. -

-Debugging ddclient looks pretty hard but it isn't. First try to put \n". - "as less as necessary in your configuration. Try to run \n". - "`./ddclient -daemon=0 -noquiet -debug` and check the result. \n" . - "Try to add the features you need and check it again. Once \n". - "you're happy with the result, run it as a daemon.\n" . - "

\n" . - "

\n" . - "If this doesn't work for you, \n". - "there are a few places where you can look for help. If you need \n". - "any help in configuring ddclient, you could try ddclient --help. \n". - "It should give you all the possible configuration options so.\n" . - "

\n". - "

\n" . - "If you think your configuration is correct, but ddclient doesn't \n" . - "work as you expected, you can enable debug and verbose messages \n" . - "by running ddclient -daemon=0 -debug -verbose -noquiet.\n". - "

\n". - "

\n" . - "If this doesn't help for you, maybe \n" . - "\n" . - "the help forum on sourceforge can bring some help.\n" . - "I know the manual is not very clear, you have to read the example " . - "configurations included in the tar-file or you can run " . - ""ddclient --help" to get more help. " . - "If you lucky you can find some help on #ddclient on irc.freenode.net" . - "

\n" . - "

-More info about the ddclient project can be found on " . - $link['project'] . - "

"; -$main[] = $text; - - -} else if ($page == 1) { // documentation -// usage -$text['id'] = "introduction"; -$text['title'] = "Introduction"; -$text['menu'] = "intro"; -$text['body'] = - "

\n" . - "This page describes the configuration for ddclient. If you need\n". - "anymore info about supported routers or supported protocols, check the\n" . - "other pages. Other options are described here.\n" . - "\n" . - "

Normally you don't need many arguments when starting ddclient. " . - "You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" \n" . - "which should be enough for most configuration. You can put all the needed\n" . - "parameters in the configuration file.\n" . - "

\n" . - "

" . - "\n" . - "\n" . - "\n" . - "\n" . - "

\n" ; -$main[] = $text; - -$text['id'] = "usage"; -$text['title'] = "Usage"; -$text['menu'] = "usage"; -$text['body'] = - "usage: ddclient [options]
\n". - "options are:
\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "" . - "\n" . - - "\n" . - "\n" . - - "\n" . - "\n" . - - "\n" . - "\n" . - "\n" . - "\n" . - - "\n" . - "\n" . - - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
-daemon delay run as a daemon (default: 0).
-proxy host use 'host' as the HTTP proxy.
-server host update DNS information on 'host' (default: members.dyndns.org).
-protocol type update protocol used (default: dyndns2).
-file path load configuration information from 'path' (default: /etc/ddclient/ddclient.conf).
-cache path record address used in 'path' (default: /etc/ddclient/ddclient.cache).
-pid path record process id in 'path'.
-use which how the should IP address be obtained. (default: ip). \n" . - " More information about the possible use-arguments can be found on \n" . - " the supported routers page
-ip address set the IP address to 'address'.
-if interface obtain IP address from 'interface' (default: ppp0).
-if-skip pattern skip any IP addresses before 'pattern' in the output of ifconfig {if}.
-web provider|url obtain IP address from provider's IP checking page (default: dyndns).
-web-skip pattern skip any IP addresses before 'pattern' on the web provider|url.
-fw address|url obtain IP address from firewall at 'address'.
-fw-skip pattern skip any IP addresses before 'pattern' on the firewall address|url.
-fw-login login use 'login' when getting IP from fw.
-fw-password secret use password 'secret' when getting IP from fw.
-cmd program obtain IP address from by calling {program}.
-cmd-skip pattern skip any IP addresses before 'pattern' in the output of {cmd}.
-login user login as 'user'.
-password secret use password 'secret'.
-host host update DNS information for 'host'.
-{no}retry retry failed updates. (default: noretry).
-{no}force force an update even if the update may be unnecessary (default: noforce).
-timeout max wait at most 'max' seconds for the host to respond (default: 0).
-{no}syslog log messages to syslog (default: nosyslog).
-facility {type} log messages to syslog to facility {type} (default: daemon).
-priority {pri} log messages to syslog with priority {pri} (default: notice).
-mail address e-mail messages to {address}.
-mail-failure address e-mail messages for failed updates to {address}.
-{no}exec do {not} execute; just show what would be done (default: exec).
-{no}debug print {no} debugging information (default: nodebug).
-{no}verbose print {no} verbose information (default: noverbose).
-{no}quiet print {no} messages for unnecessary updates (default: noquiet).
-help this message (default: 0).
-{no}query print {no} ip addresses and exit.
\n" ; - -$main[] = $text; -// config -$text['id'] = "config"; -$text['title'] = "Configuring ddclient"; -$text['menu'] = "config"; -$text['body'] = - "

\n" . - "The configuration file, ddclient.conf, can be used to define the \n" . - "default behaviour and operation of ddclient. The file consists of \n" . - "sequences of global variable definitions and host definitions. \n" . - "Since version 3.6.5, ddclient.conf is located by default in \n" . - "/etc/ddclient/ddclient.conf. Another location can be forced \n" . - "by using the -file option" . - "

\n" . - "

\n" . - "Global definitions look like: \n" . - "name=value [,name=value]* \n" . - "

\n" . - "

\n" . - "Next example \n" . - "specifies that ddclient should operate as a daemon, checking the \n" . - "eth0 interface for an IP address change every 5 minutes and use the \n" . - "'dyndns2' protocol by default. \n" . - "

\n" . - "
\n" .
-  	"daemon=600                   \n" .
-  	"use=if, if=eth0              \n" .
-  	"proxy=proxy.myisp.com        \n" .
-  	"protocol=dyndns2 \n" .
-	"
\n" . - "
". - "

\n" . - "

Host definitions look like: \n" . - "[name=value [,name=value]*]* a.host.domain [,b.host.domain] [login] [password] \n" . - "

\n" . - "Next example specifies two host definitions. \n" . - "The first definition will use the hammernode1 protocol, \n" . - "my-hn-login and my-hn-password to update the ip-address of \n" . - "myhost.hn.org and my2ndhost.hn.org. \n" . - "

\n" . - "The second host definition will use the current default protocol \n" . - "('dyndns2'), my-login and my-password to update the ip-address of \n" . - "myhost.dyndns.org and my2ndhost.dyndns.org. \n" . - "

\n" . - "The order of this sequence is significant because the values of any \n" . - "global variable definitions are bound to a host definition when the \n" . - "host definition is encountered. \n" . - "

\n" . - "

\n" . - "
\n" .
-  	"protocol=hammernode1, \ \n" .
-  	"login=my-hn-login, password=my-hn-password  myhost.hn.org \n" .
-  	"login=my-login, password=my-password  myhost.dyndns.org,my2nd.dyndns.org \n" .
-	"
\n" . - "
". - "

See the sample-ddclient.conf file for further examples.

\n" ; - -$main[] = $text; - -} else if ($page == 2) { // supported sevices - $text['id'] = "intro"; - $text['title'] = "Introduction about the supported protocols"; - $text['menu'] = "Introduction"; - $text['body'] = "

". - "This is an incomplete list of the services supported by ddclient. ". - "If your favoriet dynamic dns provider isn't here, check the result " . - "ddclient --help with the most recent version of ddclient. If it's " . - "there, check the patches section on sf.net and if it's really not " . - "supported by ddclient you can try to modify ddclient yourself. " . - "

" . - "

-Since ddclient version 3.7, ddclient also supports https to update -your favorit provider. Use the ssl=yes option to use this feature. -

"; - - $main[] = $text; -// dnspark -$text['id'] = "dnspark"; -$text['title'] = "dnspark protocol"; -$text['menu'] = "dnspark"; -$text['body'] = - "

The 'dnspark' protocol is used by DNS service offered by www.dnspark.com.

\n ". - "

Configuration variables applicable to the 'easydns' protocol are:\n ". - "\n" . - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "
protocol=dnspark
server=fqdn.of.service defaults to www.dnspark.com
backupmx=no|yes indicates that DNSPark should be the secondary MX " . - "for this domain or host.
mx=any.host.domain a host MX'ing for this host or domain.
mxpri=priority MX priority.
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . - -"

Example ddclient.conf file entries:

\n" . - "
\n" . - "
\n" .
-  	"## single host update\n" .
-  	"protocol=dnspark,                                         \\\n" .
-  	"login=my-dnspark.com-login,                               \\\n" .
-  	"password=my-dnspark.com-password                          \\\n" .
-  	"myhost.dnspark.com \n" .
-	"\n" .
-  	"## multiple host update with wildcard'ing mx, and backupmx\n" .
-  	"protocol=dnspark,                                         \\\n" .
-  	"login=my-dnspark.com-login,                               \\\n" .
-  	"password=my-dnspark.com-password,                         \\\n" .
-  	"mx=a.host.willing.to.mx.for.me,                           \\\n" .
-  	"mxpri=10,                                                 \\\n" .
-  	"my-toplevel-domain.com,my-other-domain.com\n" .
-	"\n" .
-  	"## multiple host update to the custom DNS service\n" .
-  	"protocol=dnspark,                                         \\\n" .
-  	"login=my-dnspark.com-login,                               \\\n" .
-  	"password=my-dnspark.com-password                          \\\n" .
-  	"my-toplevel-domain.com,my-other-domain.com\n" .
-	"
\n" . 
-	"
\n" ; - -$main[] = $text; -// dslreports -$text['id'] = "dslreports"; -$text['title'] = "dslreports"; -$text['menu'] = "dslreports"; -$text['body'] = -"

The 'dslreports1' protocol is used by a free DSL monitoring service\n" . -"offered by www.dslreports.com.

\n" . - -"

Configuration variables applicable to the 'dslreports1' protocol are:

" . -"\n" . - "" . - "" . - "" . - "" . - "" . -"
protocol=dslreports1
server=fqdn.of.service defaults to www.dslreports.com
login=service-login login name and password registered with the service
password=service-password
unique-number the host registered with the service.
\n" . - -"

Example ddclient.conf file entries:

" . - "
\n" . - "
\n" .
-  "## single host update\n" .
-  "protocol=dslreports1,                                     \\\n" .
-  "server=www.dslreports.com,                                \\\n" .
-  "login=my-dslreports-login,                                \\\n" .
-  "password=my-dslreports-password                           \\\n" .
-  "123456\n" .
-"
\n" . -"\n" . - -"

Note: DSL Reports uses a unique number as the host name. This number\n" . -"can be found on the Monitor Control web page.

\n" ; -$main[] = $text; -$text['id'] = "dyndns1"; -$text['title'] = "dyndns1"; -$text['menu'] = "dyndns1"; -$text['body'] = -"

The 'dyndns1' protocol is a deprecated protocol used by the free dynamic \n". -"DNS service offered by www.dyndns.org. The 'dyndns2' should be used to \n". -"update the www.dyndns.org service. However, other services are also \n". -"using this protocol so support is still provided by ddclient.

\n". -" \n". -"Configuration variables applicable to the 'dyndns1' protocol are: \n". -"
\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . -"
protocol=dyndns1
server=fqdn.of.service defaults to members.dyndns.org
backupmx=no|yes indicates that this host is the primary MX for the domain.
mx=any.host.domain a host MX'ing for this host definition.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . - -"

Example ddclient.conf file entries:

" . - "
\n" . - "
\n" .
-  "## single host update\n" . 
-  "protocol=dyndns1,                                         \\\n" . 
-  "login=my-dyndns.org-login,                                \\\n" . 
-  "password=my-dyndns.org-password                           \\\n" . 
-  "myhost.dyndns.org \n" . 
-"\n" . 
-  "## multiple host update with wildcard'ing mx, and backupmx\n" . 
-  "protocol=dyndns1,                                         \\\n" . 
-  "login=my-dyndns.org-login,                                \\\n" . 
-  "password=my-dyndns.org-password,                          \\\n" . 
-  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" . 
-  "myhost.dyndns.org,my2ndhost.dyndns.org \n" . 
-  "
\n" . - "\n" . - "

Note: you only need one of the examples

\n"; - -$main[] = $text; -// dyndns2 -$text['id'] = "dyndns2"; -$text['title'] = "dyndns2"; -$text['menu'] = "dyndns2"; -$text['body'] = -"

The 'dyndns2' protocol is a newer low-bandwidth protocol used by a\n" . -"free dynamic DNS service offered by www.dyndns.org. It supports\n" . -"features of the older 'dyndns1' in addition to others. [These will be\n" . -"supported in a future version of ddclient.]

\n" . -"\n". -"

Configuration variables applicable to the 'dyndns2' protocol are:

\n" . -"\n". - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . -"
protocol=dyndns2
server=fqdn.of.service defaults to members.dyndns.org
backupmx=no|yes indicates that this host is the primary MX for the domain.
static=no|yes indicates that this host has a static IP address.
custom=no|yes indicates that this host is a 'custom' top-level domain name.
mx=any.host.domain a host MX'ing for this host definition.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . - -"

Example ddclient.conf file entries:

" . - "
\n" . - "
\n" .
-  "## single host update\n" .
-  "protocol=dyndns2,                                         \\\n" .
-  "login=my-dyndns.org-login,                                \\\n" .
-  "password=my-dyndns.org-password                           \\\n" .
-  "myhost.dyndns.org \n" .
-"\n" .
-  "## multiple host update with wildcard'ing mx, and backupmx\n" .
-  "protocol=dyndns2,                                         \\\n" .
-  "login=my-dyndns.org-login,                                \\\n" .
-  "password=my-dyndns.org-password,                          \\\n" .
-  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" .
-  "myhost.dyndns.org,my2ndhost.dyndns.org \n" .
-"\n" .
-  "## multiple host update to the custom DNS service\n" .
-  "protocol=dyndns2,                                         \\\n" .
-  "login=my-dyndns.org-login,                                \\\n" .
-  "password=my-dyndns.org-password                           \\\n" .
-  "my-toplevel-domain.com,my-other-domain.com\n" .
-	"
\n" . - "
\n" . - "

Note: you only need one of the examples

\n"; - -$main[] = $text; -// easydns -$text['id'] = "easydns"; -$text['title'] = "easydns"; -$text['menu'] = "easydns"; -$text['body'] = -"

The 'easydns' protocol is used by the for fee DNS service offered \n" . -"by www.easydns.com.

\n" . - -"

Configuration variables applicable to the 'easydns' protocol are:\n". -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
protocol=easydns
server=fqdn.of.service defaults to members.easydns.com
backupmx=no|yes indicates that EasyDNS should be the secondary MX for this domain or host.
mx=any.host.domain a host MX'ing for this host or domain.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.

\n" . - -"

Example ddclient.conf file entries:

" . - "
\n" . - "
\n" .
-  "## single host update\n" .
-  "protocol=easydns,                                         \\\n" .
-  "login=my-easydns.com-login,                               \\\n" .
-  "password=my-easydns.com-password                          \\\n" .
-  "myhost.easydns.com \n" .
-"\n" .
-  "## multiple host update with wildcard'ing mx, and backupmx\n" .
-  "protocol=easydns,                                         \\\n" .
-  "login=my-easydns.com-login,                               \\\n" .
-  "password=my-easydns.com-password,                         \\\n" .
-  "mx=a.host.willing.to.mx.for.me,                           \\\n" .
-  "backupmx=yes,                                             \\\n" .
-  "wildcard=yes                                              \\\n" .
-  "my-toplevel-domain.com,my-other-domain.com\n" .
-"\n" .
-  "## multiple host update to the custom DNS service\n" .
-  "protocol=easydns,                                         \\\n" .
-  "login=my-easydns.com-login,                               \\\n" .
-  "password=my-easydns.com-password                          \\\n" .
-  "my-toplevel-domain.com,my-other-domain.com\n" .
-  "
\n" . - "
\n" . - "

"; -$main[] = $text; -// hammernode -$text['id'] = "hammernode"; -$text['title'] = "hammernode"; -$text['menu'] = "hammernode"; -$text['body'] = -"

" . -"The 'hammernode1' protocol is the protocol used by the free dynamic \n" . -"DNS service offered by Hammernode at www.hn.org

\n" . - -"Configuration variables applicable to the 'hammernode1' protocol are:

\n" . -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
protocol=hammernode1
server=fqdn.of.service defaults to members.dyndns.org
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . - -"

Example ddclient.conf file entries:

\n" . - "
\n" . - "
\n" .
-  "## single host update\n" .
-  "protocol=hammernode1,                                 \\\n" .
-  "login=my-hn.org-login,                                \\\n" .
-  "password=my-hn.org-password                           \\\n" .
-  "myhost.hn.org \n" .
-"\n" .
-  "## multiple host update\n" .
-  "protocol=hammernode1,                                 \\\n" .
-  "login=my-hn.org-login,                                \\\n" .
-  "password=my-hn.org-password,                          \\\n" .
-  "myhost.hn.org,my2ndhost.hn.org\n" .
-  "
\n" . - "
\n" . - ""; - -$main[] = $text; -// namecheap -$text['id'] = "namecheap"; -$text['title'] = "namecheap"; -$text['menu'] = "namecheap"; -$text['body'] = -"

The 'namecheap' protocol is used by DNS service offered by www.namecheap.com.

\n" . -"\n" . -"

Configuration variables applicable to the 'easydns' protocol are:

\n" . -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . -"
protocol=namecheap
server=fqdn.of.service defaults to dynamicdns.park-your-domain.com
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . - -"

Example ddclient.conf file entries:

". - "
\n" . - "
\n" .
-  "## single host update\n" .
-  "protocol=namecheap,                                         \\\n" .
-  "login=my-namecheap.com-login,                               \\\n" .
-  "password=my-namecheap.com-password                          \\\n" .
-  "myhost.namecheap.com \n" .
-    "
\n" . - "
\n" . - "

"; - - -$main[] = $text; -$text['id'] = "zoneedit1"; -$text['title'] = "zoneedit1"; -$text['menu'] = "zoneedit1"; -$text['body'] = -"

The 'zoneedit1' protocol is used by a DNS service offered by -www.zoneedit.com.

\n" . - -"

Configuration variables applicable to the 'zoneedit1' protocol are:

\n" . - "protocol=zoneedit1 \n" . - "server=fqdn.of.service defaults to www.zoneedit.com\n" . - "login=service-login login name and password registered with the service\n" . - "password=service-password \n" . - "your.domain.name the host registered with the service.\n" . - -"

Example ddclient.conf file entries:

\n" . - "
\n" . - "
\n" .
-  "## single host update\n" .
-  "protocol=zoneedit1,                                     \\\n" .
-  "server=www.zoneedit.com,                                \\\n" .
-  "login=my-zoneedit-login,                                \\\n" .
-  "password=my-zoneedit-password                           \\\n" .
-  "my.domain.name\n" .
-  "\n" .
-  "## multiple host update                                 \\\n" .
-  "protocol=zoneedit1,                                     \\\n" .
-  "server=www.zoneedit.com,                                \\\n" .
-  "login=my-zoneedit-login,                                \\\n" .
-  "password=my-zoneedit-password                           \\\n" .
-  "my.domain.name,my2nd.domain.com\n" .
-    "
\n" . - "
\n" . - "

"; -$main[] = $text; -} else if ($page == 3) { // supported routers - $text['id'] = "intro"; - $text['title'] = "Introduction about the -use option"; - $text['menu'] = "introduction"; - $text['body'] = - "

". - "Ddclient can get the needed IP-address on a lot of different\n". - "ways. By default, it fetches it's IP from the internet but \n". - "you can it also from a router or specify it yourself.\n". - "

\n". - "

Ddclient supports a lot of different routers. To configure ". - "your favorit router, modify your use-line in your configuration ". - "to something like -use=linksys-ver2. Don't forget to put your ". - "router password and login in the configuration.". - "

". - "

". - "If your favorit router isn't here, try to run ddclient --help. \n". - "This list is rather incomplete so there are a few more routers \n". - "supported by the most recent version of ddclient. \n". - "

"; - $main[] = $text; - - $text['id'] = "nonrouter"; - $text['title'] = "Non router option"; - $text['menu'] = "Non router"; - $text['body'] = - "" . - "\n" . - "" . - "\n" . - "" . - "" . - "
-use=web obtain IP from an IP discovery page on the web. This is the default way if none is specified
-use=if obtain IP from the -if {interface}.
-use=ip obtain IP from -ip {address}.
-use=cmd obtain IP from the -cmd {external-command}.
-use=fw obtain IP from the firewall specified by -fw {type|address}.
"; - $main[] = $text; - - $text['title'] = "Incomplete list of supported routers"; - $text['menu'] = "routers"; - $text['body'] = - "". - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
-use=3com-3c886a obtain IP from 3com 3c886a 56k Lan Modem at the -fw {address}.
-use=3com-oc-remote812 obtain IP from 3com OfficeConnect Remote 812 at the -fw {address}.
-use=alcatel-stp obtain IP from Alcatel Speed Touch Pro at the -fw {address}.
-use=allnet-1298 obtain IP from Allnet 1298 at the -fw {address}.
-use=cayman-3220h obtain IP from Cayman 3220-H DSL at the -fw {address}.
-use=cisco obtain IP from Cisco FW at the -fw {address}.
-use=dlink-604 obtain IP from D-Link DI-604 at the -fw {address}.
-use=dlink-614 obtain IP from D-Link DI-614+ at the -fw {address}.
-use=e-tech obtain IP from E-tech Router at the -fw {address}.
-use=elsa-lancom-dsl10 obtain IP from ELSA LanCom DSL/10 DSL FW at the -fw {address}.
-use=elsa-lancom-dsl10-ch01 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
-use=elsa-lancom-dsl10-ch02 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
-use=linksys obtain IP from Linksys FW at the -fw {address}.
-use=linksys2 obtain IP from Linksys FW ver 2 at the -fw {address}.
-use=maxgate-ugate3x00 obtain IP from MaxGate UGATE-3x00 FW at the -fw {address}.
-use=netgear-rt3xx obtain IP from Netgear FW at the -fw {address}.
-use=netopia-r910 obtain IP from Netopia R910 FW at the -fw {address}.
-use=smc-barricade obtain IP from SMC Barricade FW at the -fw {address}.
-use=sohoware-nbg800 obtain IP from SOHOWare BroadGuard NBG800 at the -fw {address}.
-use=vigor-2200usb obtain IP from Vigor 2200 USB at the -fw {address}.
-use=watchguard-soho obtain IP from Watchguard SOHO FW at the -fw {address}.
-use=xsense-aero obtain IP from Xsense Aero at the -fw {address}.
". - "

Remember, if your router isn't here, check the result of ddclient --help

"; - $main[] = $text; - -} else if ($page == 4) { // documentation - require("xml.php"); -} ?> diff --git a/html/protocol.php b/html/protocol.php new file mode 100644 index 0000000..c3ab9d3 --- /dev/null +++ b/html/protocol.php @@ -0,0 +1,333 @@ +". + "This is an incomplete list of the services supported by ddclient. ". + "If your favoriet dynamic dns provider isn't here, check the result " . + "ddclient --help with the most recent version of ddclient. If it's " . + "there, check the patches section on sf.net and if it's really not " . + "supported by ddclient you can try to modify ddclient yourself. " . + "

" . + "

+Since ddclient version 3.7, ddclient also supports https to update +your favorit provider. Use the ssl=yes option to use this feature. +

"; + + $main[] = $text; +// dnspark +$text['id'] = "dnspark"; +$text['title'] = "dnspark protocol"; +$text['menu'] = "dnspark"; +$text['body'] = + "

The 'dnspark' protocol is used by DNS service offered by www.dnspark.com.

\n ". + "

Configuration variables applicable to the 'easydns' protocol are:\n ". + "\n" . + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "\n". + "
protocol=dnspark
server=fqdn.of.service defaults to www.dnspark.com
backupmx=no|yes indicates that DNSPark should be the secondary MX " . + "for this domain or host.
mx=any.host.domain a host MX'ing for this host or domain.
mxpri=priority MX priority.
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

\n" . + "
\n" . + "
\n" .
+  	"## single host update\n" .
+  	"protocol=dnspark,                                         \\\n" .
+  	"login=my-dnspark.com-login,                               \\\n" .
+  	"password=my-dnspark.com-password                          \\\n" .
+  	"myhost.dnspark.com \n" .
+	"\n" .
+  	"## multiple host update with wildcard'ing mx, and backupmx\n" .
+  	"protocol=dnspark,                                         \\\n" .
+  	"login=my-dnspark.com-login,                               \\\n" .
+  	"password=my-dnspark.com-password,                         \\\n" .
+  	"mx=a.host.willing.to.mx.for.me,                           \\\n" .
+  	"mxpri=10,                                                 \\\n" .
+  	"my-toplevel-domain.com,my-other-domain.com\n" .
+	"\n" .
+  	"## multiple host update to the custom DNS service\n" .
+  	"protocol=dnspark,                                         \\\n" .
+  	"login=my-dnspark.com-login,                               \\\n" .
+  	"password=my-dnspark.com-password                          \\\n" .
+  	"my-toplevel-domain.com,my-other-domain.com\n" .
+	"
\n" . 
+	"
\n" ; + +$main[] = $text; +// dslreports +$text['id'] = "dslreports"; +$text['title'] = "dslreports"; +$text['menu'] = "dslreports"; +$text['body'] = +"

The 'dslreports1' protocol is used by a free DSL monitoring service\n" . +"offered by www.dslreports.com.

\n" . + +"

Configuration variables applicable to the 'dslreports1' protocol are:

" . +"\n" . + "" . + "" . + "" . + "" . + "" . +"
protocol=dslreports1
server=fqdn.of.service defaults to www.dslreports.com
login=service-login login name and password registered with the service
password=service-password
unique-number the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=dslreports1,                                     \\\n" .
+  "server=www.dslreports.com,                                \\\n" .
+  "login=my-dslreports-login,                                \\\n" .
+  "password=my-dslreports-password                           \\\n" .
+  "123456\n" .
+"
\n" . +"\n" . + +"

Note: DSL Reports uses a unique number as the host name. This number\n" . +"can be found on the Monitor Control web page.

\n" ; +$main[] = $text; +$text['id'] = "dyndns1"; +$text['title'] = "dyndns1"; +$text['menu'] = "dyndns1"; +$text['body'] = +"

The 'dyndns1' protocol is a deprecated protocol used by the free dynamic \n". +"DNS service offered by www.dyndns.org. The 'dyndns2' should be used to \n". +"update the www.dyndns.org service. However, other services are also \n". +"using this protocol so support is still provided by ddclient.

\n". +" \n". +"Configuration variables applicable to the 'dyndns1' protocol are: \n". +"
\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . +"
protocol=dyndns1
server=fqdn.of.service defaults to members.dyndns.org
backupmx=no|yes indicates that this host is the primary MX for the domain.
mx=any.host.domain a host MX'ing for this host definition.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" . 
+  "protocol=dyndns1,                                         \\\n" . 
+  "login=my-dyndns.org-login,                                \\\n" . 
+  "password=my-dyndns.org-password                           \\\n" . 
+  "myhost.dyndns.org \n" . 
+"\n" . 
+  "## multiple host update with wildcard'ing mx, and backupmx\n" . 
+  "protocol=dyndns1,                                         \\\n" . 
+  "login=my-dyndns.org-login,                                \\\n" . 
+  "password=my-dyndns.org-password,                          \\\n" . 
+  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" . 
+  "myhost.dyndns.org,my2ndhost.dyndns.org \n" . 
+  "
\n" . + "\n" . + "

Note: you only need one of the examples

\n"; + +$main[] = $text; +// dyndns2 +$text['id'] = "dyndns2"; +$text['title'] = "dyndns2"; +$text['menu'] = "dyndns2"; +$text['body'] = +"

The 'dyndns2' protocol is a newer low-bandwidth protocol used by a\n" . +"free dynamic DNS service offered by www.dyndns.org. It supports\n" . +"features of the older 'dyndns1' in addition to others. [These will be\n" . +"supported in a future version of ddclient.]

\n" . +"\n". +"

Configuration variables applicable to the 'dyndns2' protocol are:

\n" . +"\n". + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . +"
protocol=dyndns2
server=fqdn.of.service defaults to members.dyndns.org
backupmx=no|yes indicates that this host is the primary MX for the domain.
static=no|yes indicates that this host has a static IP address.
custom=no|yes indicates that this host is a 'custom' top-level domain name.
mx=any.host.domain a host MX'ing for this host definition.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=dyndns2,                                         \\\n" .
+  "login=my-dyndns.org-login,                                \\\n" .
+  "password=my-dyndns.org-password                           \\\n" .
+  "myhost.dyndns.org \n" .
+"\n" .
+  "## multiple host update with wildcard'ing mx, and backupmx\n" .
+  "protocol=dyndns2,                                         \\\n" .
+  "login=my-dyndns.org-login,                                \\\n" .
+  "password=my-dyndns.org-password,                          \\\n" .
+  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" .
+  "myhost.dyndns.org,my2ndhost.dyndns.org \n" .
+"\n" .
+  "## multiple host update to the custom DNS service\n" .
+  "protocol=dyndns2,                                         \\\n" .
+  "login=my-dyndns.org-login,                                \\\n" .
+  "password=my-dyndns.org-password                           \\\n" .
+  "my-toplevel-domain.com,my-other-domain.com\n" .
+	"
\n" . + "
\n" . + "

Note: you only need one of the examples

\n"; + +$main[] = $text; +// easydns +$text['id'] = "easydns"; +$text['title'] = "easydns"; +$text['menu'] = "easydns"; +$text['body'] = +"

The 'easydns' protocol is used by the for fee DNS service offered \n" . +"by www.easydns.com.

\n" . + +"

Configuration variables applicable to the 'easydns' protocol are:\n". +"\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
protocol=easydns
server=fqdn.of.service defaults to members.easydns.com
backupmx=no|yes indicates that EasyDNS should be the secondary MX for this domain or host.
mx=any.host.domain a host MX'ing for this host or domain.
wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.

\n" . + +"

Example ddclient.conf file entries:

" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=easydns,                                         \\\n" .
+  "login=my-easydns.com-login,                               \\\n" .
+  "password=my-easydns.com-password                          \\\n" .
+  "myhost.easydns.com \n" .
+"\n" .
+  "## multiple host update with wildcard'ing mx, and backupmx\n" .
+  "protocol=easydns,                                         \\\n" .
+  "login=my-easydns.com-login,                               \\\n" .
+  "password=my-easydns.com-password,                         \\\n" .
+  "mx=a.host.willing.to.mx.for.me,                           \\\n" .
+  "backupmx=yes,                                             \\\n" .
+  "wildcard=yes                                              \\\n" .
+  "my-toplevel-domain.com,my-other-domain.com\n" .
+"\n" .
+  "## multiple host update to the custom DNS service\n" .
+  "protocol=easydns,                                         \\\n" .
+  "login=my-easydns.com-login,                               \\\n" .
+  "password=my-easydns.com-password                          \\\n" .
+  "my-toplevel-domain.com,my-other-domain.com\n" .
+  "
\n" . + "
\n" . + "

"; +$main[] = $text; +// hammernode +$text['id'] = "hammernode"; +$text['title'] = "hammernode"; +$text['menu'] = "hammernode"; +$text['body'] = +"

" . +"The 'hammernode1' protocol is the protocol used by the free dynamic \n" . +"DNS service offered by Hammernode at www.hn.org

\n" . + +"Configuration variables applicable to the 'hammernode1' protocol are:

\n" . +"\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
protocol=hammernode1
server=fqdn.of.service defaults to members.dyndns.org
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

\n" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=hammernode1,                                 \\\n" .
+  "login=my-hn.org-login,                                \\\n" .
+  "password=my-hn.org-password                           \\\n" .
+  "myhost.hn.org \n" .
+"\n" .
+  "## multiple host update\n" .
+  "protocol=hammernode1,                                 \\\n" .
+  "login=my-hn.org-login,                                \\\n" .
+  "password=my-hn.org-password,                          \\\n" .
+  "myhost.hn.org,my2ndhost.hn.org\n" .
+  "
\n" . + "
\n" . + ""; + +$main[] = $text; +// namecheap +$text['id'] = "namecheap"; +$text['title'] = "namecheap"; +$text['menu'] = "namecheap"; +$text['body'] = +"

The 'namecheap' protocol is used by DNS service offered by www.namecheap.com.

\n" . +"\n" . +"

Configuration variables applicable to the 'easydns' protocol are:

\n" . +"\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . +"
protocol=namecheap
server=fqdn.of.service defaults to dynamicdns.park-your-domain.com
login=service-login login name and password registered with the service
password=service-password
fully.qualified.host the host registered with the service.
\n" . + +"

Example ddclient.conf file entries:

". + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=namecheap,                                         \\\n" .
+  "login=my-namecheap.com-login,                               \\\n" .
+  "password=my-namecheap.com-password                          \\\n" .
+  "myhost.namecheap.com \n" .
+    "
\n" . + "
\n" . + "

"; + + +$main[] = $text; +$text['id'] = "zoneedit1"; +$text['title'] = "zoneedit1"; +$text['menu'] = "zoneedit1"; +$text['body'] = +"

The 'zoneedit1' protocol is used by a DNS service offered by +www.zoneedit.com.

\n" . + +"

Configuration variables applicable to the 'zoneedit1' protocol are:

\n" . + "protocol=zoneedit1 \n" . + "server=fqdn.of.service defaults to www.zoneedit.com\n" . + "login=service-login login name and password registered with the service\n" . + "password=service-password \n" . + "your.domain.name the host registered with the service.\n" . + +"

Example ddclient.conf file entries:

\n" . + "
\n" . + "
\n" .
+  "## single host update\n" .
+  "protocol=zoneedit1,                                     \\\n" .
+  "server=www.zoneedit.com,                                \\\n" .
+  "login=my-zoneedit-login,                                \\\n" .
+  "password=my-zoneedit-password                           \\\n" .
+  "my.domain.name\n" .
+  "\n" .
+  "## multiple host update                                 \\\n" .
+  "protocol=zoneedit1,                                     \\\n" .
+  "server=www.zoneedit.com,                                \\\n" .
+  "login=my-zoneedit-login,                                \\\n" .
+  "password=my-zoneedit-password                           \\\n" .
+  "my.domain.name,my2nd.domain.com\n" .
+    "
\n" . + "
\n" . + "

"; +$main[] = $text; diff --git a/html/router.php b/html/router.php new file mode 100644 index 0000000..b5d4882 --- /dev/null +++ b/html/router.php @@ -0,0 +1,65 @@ +". + "Ddclient can get the needed IP-address on a lot of different\n". + "ways. By default, it fetches it's IP from the internet but \n". + "you can it also from a router or specify it yourself.\n". + "

\n". + "

Ddclient supports a lot of different routers. To configure ". + "your favorit router, modify your use-line in your configuration ". + "to something like -use=linksys-ver2. Don't forget to put your ". + "router password and login in the configuration.". + "

". + "

". + "If your favorit router isn't here, try to run ddclient --help. \n". + "This list is rather incomplete so there are a few more routers \n". + "supported by the most recent version of ddclient. \n". + "

"; + $main[] = $text; + + $text['id'] = "nonrouter"; + $text['title'] = "Non router option"; + $text['menu'] = "Non router"; + $text['body'] = + "" . + "\n" . + "" . + "\n" . + "" . + "" . + "
-use=web obtain IP from an IP discovery page on the web. This is the default way if none is specified
-use=if obtain IP from the -if {interface}.
-use=ip obtain IP from -ip {address}.
-use=cmd obtain IP from the -cmd {external-command}.
-use=fw obtain IP from the firewall specified by -fw {type|address}.
"; + $main[] = $text; + + $text['title'] = "Incomplete list of supported routers"; + $text['menu'] = "routers"; + $text['body'] = + "". + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "\n" . + "
-use=3com-3c886a obtain IP from 3com 3c886a 56k Lan Modem at the -fw {address}.
-use=3com-oc-remote812 obtain IP from 3com OfficeConnect Remote 812 at the -fw {address}.
-use=alcatel-stp obtain IP from Alcatel Speed Touch Pro at the -fw {address}.
-use=allnet-1298 obtain IP from Allnet 1298 at the -fw {address}.
-use=cayman-3220h obtain IP from Cayman 3220-H DSL at the -fw {address}.
-use=cisco obtain IP from Cisco FW at the -fw {address}.
-use=dlink-604 obtain IP from D-Link DI-604 at the -fw {address}.
-use=dlink-614 obtain IP from D-Link DI-614+ at the -fw {address}.
-use=e-tech obtain IP from E-tech Router at the -fw {address}.
-use=elsa-lancom-dsl10 obtain IP from ELSA LanCom DSL/10 DSL FW at the -fw {address}.
-use=elsa-lancom-dsl10-ch01 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
-use=elsa-lancom-dsl10-ch02 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
-use=linksys obtain IP from Linksys FW at the -fw {address}.
-use=linksys2 obtain IP from Linksys FW ver 2 at the -fw {address}.
-use=maxgate-ugate3x00 obtain IP from MaxGate UGATE-3x00 FW at the -fw {address}.
-use=netgear-rt3xx obtain IP from Netgear FW at the -fw {address}.
-use=netopia-r910 obtain IP from Netopia R910 FW at the -fw {address}.
-use=smc-barricade obtain IP from SMC Barricade FW at the -fw {address}.
-use=sohoware-nbg800 obtain IP from SOHOWare BroadGuard NBG800 at the -fw {address}.
-use=vigor-2200usb obtain IP from Vigor 2200 USB at the -fw {address}.
-use=watchguard-soho obtain IP from Watchguard SOHO FW at the -fw {address}.
-use=xsense-aero obtain IP from Xsense Aero at the -fw {address}.
". + "

Remember, if your router isn't here, check the result of ddclient --help

"; + $main[] = $text; +?> From c18902e3add17542c6f83e9a5b3f6ea6ce326723 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 20 Jun 2006 17:09:06 +0000 Subject: [PATCH 013/231] Initial xml.php file git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@15 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/xml.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/html/xml.php b/html/xml.php index e69de29..8540796 100644 --- a/html/xml.php +++ b/html/xml.php @@ -0,0 +1,11 @@ +". +"This page is just a test about the xml-functionality. It has \n". +"nothing special.". +"

"; +$main[] = $text; +?> From ccab4ab8d1b0ee16dd8f84f450996bd7ebbd4098 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 7 Sep 2006 15:49:06 +0000 Subject: [PATCH 014/231] Added a todo list for the website git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@16 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/todo.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 html/todo.txt diff --git a/html/todo.txt b/html/todo.txt new file mode 100644 index 0000000..a62e7e3 --- /dev/null +++ b/html/todo.txt @@ -0,0 +1,12 @@ +IRC +--- +There are not that much people on irc. Mostly it's just wimpunk and a few bots. +It could take a while before you get an answer it it mostly get there. + +README +------ +Adding the README's to the html-code + +Pastbin +------- +Handy to post your config, doesn't mess up your lines. From 81aec1d061552f61cb3ee97a1f90c457bf00f24f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 7 Sep 2006 19:44:27 +0000 Subject: [PATCH 015/231] Added step by step git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@17 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/todo.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/todo.txt b/html/todo.txt index a62e7e3..072b1bc 100644 --- a/html/todo.txt +++ b/html/todo.txt @@ -10,3 +10,8 @@ Adding the README's to the html-code Pastbin ------- Handy to post your config, doesn't mess up your lines. + +STEP BY STEP +------------ +Some people need some help on how to use ddclient, maybe it's good to be more +detailed. From de8c7553b33311712f8383c608b59ce36f70766b Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 11 Sep 2006 06:38:27 +0000 Subject: [PATCH 016/231] postscript added git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@18 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/doc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/html/doc.php b/html/doc.php index 9f42d2c..da38852 100644 --- a/html/doc.php +++ b/html/doc.php @@ -40,6 +40,7 @@ $text['body'] = " More information about the possible use-arguments can be found on \n" . " the supported routers page" . "-ip address set the IP address to 'address'.\n" . + "-postscript script run 'script' after updating.\n" . "-if interface obtain IP address from 'interface' (default: ppp0).\n" . "-if-skip pattern skip any IP addresses before 'pattern' in the output of ifconfig {if}.\n" . From 280f7dd971467eaef8433f84f0438552987dd2a5 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 12 Sep 2006 07:04:46 +0000 Subject: [PATCH 017/231] Changed todo a little git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@19 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/todo.txt | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/html/todo.txt b/html/todo.txt index 072b1bc..a28949d 100644 --- a/html/todo.txt +++ b/html/todo.txt @@ -1,17 +1,6 @@ -IRC ---- -There are not that much people on irc. Mostly it's just wimpunk and a few bots. -It could take a while before you get an answer it it mostly get there. +IRC: There are not that much people on irc. Mostly it's just wimpunk and a few bots. It could take a while before you get an answer it it mostly get there. +README: Adding the README's to the html-code +Pastbin: Handy to post your config, doesn't mess up your lines. +STEP BY STEP: Some people need some help on how to use ddclient, maybe it's good to be more detailed. +download: add svn -README ------- -Adding the README's to the html-code - -Pastbin -------- -Handy to post your config, doesn't mess up your lines. - -STEP BY STEP ------------- -Some people need some help on how to use ddclient, maybe it's good to be more -detailed. From bddbb84cc05c3970ef4f18f96e3cac382b05c0bb Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 13 Sep 2006 06:49:40 +0000 Subject: [PATCH 018/231] Changed indentation Using constants for pages git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@20 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/index.php | 100 ++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/html/index.php b/html/index.php index 77b7feb..ddb9cdb 100644 --- a/html/index.php +++ b/html/index.php @@ -29,28 +29,35 @@ $_SESSION['debug'] = $debug; // pages information; should be in a database + +define('HOME', 0); +define('USAGE', 1); +define('PROTOCOL',2); +define('ROUTER', 3); +define('XML', 4); + // main -$pages[0]['nr'] = 0; -$pages[0]['title'] = "home"; -$pages[0]['php'] = "home.php"; +$pages[HOME]['nr'] = HOME; +$pages[HOME]['title'] = "home"; +$pages[HOME]['php'] = "home.php"; // documentation -$pages[1]['nr'] = 1; -$pages[1]['title'] = "usage"; -$pages[1]['php'] = "doc.php"; +$pages[USAGE]['nr'] = USAGE; +$pages[USAGE]['title'] = "usage"; +$pages[USAGE]['php'] = "doc.php"; -$pages[2]['nr'] = 2; -$pages[2]['title'] = "supported protocols"; -$pages[2]['php'] = "protocol.php"; +$pages[PROTOCOL]['nr'] = PROTOCOL; +$pages[PROTOCOL]['title'] = "supported protocols"; +$pages[PROTOCOL]['php'] = "protocol.php"; -$pages[3]['nr'] = 3; -$pages[3]['title'] = "supported routers"; -$pages[3]['php'] = "router.php"; +$pages[ROUTER]['nr'] = ROUTER; +$pages[ROUTER]['title'] = "supported routers"; +$pages[ROUTER]['php'] = "router.php"; if ($debug) { - $pages[4]['nr'] = 4; - $pages[4]['title'] = "xml"; - $pages[4]['php'] = "xml.php"; + $pages[XML]['nr'] = XML; + $pages[XML]['title'] = "xml"; + $pages[XML]['php'] = "xml.php"; } @@ -96,24 +103,15 @@ require($pages[$page]['php']);
Navigation: - - $subpage) { if ($cnt++) printf(" | "); - printf("%s", - $subpage['nr'], - // $id, - // $subpage['title'], - $page==$subpage['nr']?' class="highlight"':"", - $subpage['title'] -); + printf("%s", + $subpage['nr'], + $page==$subpage['nr']?' class="highlight"':"", + $subpage['title'] + ); } ?> @@ -126,14 +124,14 @@ foreach ($pages as $id => $subpage) {
    - $text) { -printf("
  • › %s
  • ", - $text['id'], - $text['title'], - $text['menu'] -); -} + $text) { + printf("
  • › %s
  • \n", + $text['id'], + $text['title'], + $text['menu'] + ); + } ?>
@@ -159,12 +157,12 @@ printf("
  • › %s
  • ",
    -^ TOP\n"); -printf("

    %s

    \n",$text['id'],$text['title']); -printf("%s\n",$text['body']); -} + ^ TOP\n"); + printf("

    %s

    \n",$text['id'],$text['title']); + printf("%s\n",$text['body']); + } ?>
    @@ -179,14 +177,14 @@ printf("%s\n",$text['body']);
    - +
    From 2bd881d4338f06238884ea944ae84ead767a2a0c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 14 Sep 2006 14:24:46 +0000 Subject: [PATCH 019/231] URL of zoneedit has changed (see bug #1558483) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@21 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 1 + svn/ddclient | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/svn/Changelog b/svn/Changelog index 078718b..e693d44 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -1,6 +1,7 @@ Changelog 3.7.1 +- URL of zoneedit has changed (see bug #1558483) 3.7.0 - Added vi tag diff --git a/svn/ddclient b/svn/ddclient index e1b29b2..647f5d4 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -418,7 +418,7 @@ my %services = ( 'update' => \&nic_zoneedit1_update, 'examples' => \&nic_zoneedit1_examples, 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.zoneedit.com', undef) }, + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamic.zoneedit.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, $variables{'service-common-defaults'}, ), From 39f833279abf1946685449b3c27462844faf5727 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 14 Sep 2006 14:24:46 +0000 Subject: [PATCH 020/231] URL of zoneedit has changed (see bug #1558483) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@21 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 1 + ddclient | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 078718b..e693d44 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ Changelog 3.7.1 +- URL of zoneedit has changed (see bug #1558483) 3.7.0 - Added vi tag diff --git a/ddclient b/ddclient index e1b29b2..647f5d4 100755 --- a/ddclient +++ b/ddclient @@ -418,7 +418,7 @@ my %services = ( 'update' => \&nic_zoneedit1_update, 'examples' => \&nic_zoneedit1_examples, 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.zoneedit.com', undef) }, + { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamic.zoneedit.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, $variables{'service-common-defaults'}, ), From b0c449fd3ff643c6c8599c7857564f70d28bc22e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 30 Sep 2006 13:15:58 +0000 Subject: [PATCH 021/231] Added initscript for Ubuntu (posted by Paolo Martinelli) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@22 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 1 + svn/sample-etc_rc.d_init.d_ddclient.ubuntu | 47 ++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 svn/sample-etc_rc.d_init.d_ddclient.ubuntu diff --git a/svn/Changelog b/svn/Changelog index e693d44..48655af 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -2,6 +2,7 @@ Changelog 3.7.1 - URL of zoneedit has changed (see bug #1558483) +- Added initscript for Ubuntu (posted by Paolo Martinelli) 3.7.0 - Added vi tag diff --git a/svn/sample-etc_rc.d_init.d_ddclient.ubuntu b/svn/sample-etc_rc.d_init.d_ddclient.ubuntu new file mode 100755 index 0000000..93b0ba4 --- /dev/null +++ b/svn/sample-etc_rc.d_init.d_ddclient.ubuntu @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Start ddclient that provides support for updating dynamic DNS services. +# +# Submitted by paolo martinelli + +DDCLIENT=/usr/sbin/ddclient +CONF=/etc/ddclient/ddclient.conf +PIDFILE=/var/run/ddclient.pid + +test -x $DDCLIENT || exit 0 +test -f $CONF || exit 0 + +. /lib/lsb/init-functions + +case "$1" in +start) +log_begin_msg "Starting ddclient..." +DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` +if [ -z "$DELAY" ] ; then +DELAY="-daemon 300" +else +DELAY='' +fi +start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY +log_end_msg $? +;; +stop) +if [ -f $PIDFILE ] ; then +log_begin_msg "Stopping ddclient..." +start-stop-daemon -K -q -p $PIDFILE +log_end_msg $? +rm -f $PIDFILE +fi +;; +restart|reload|force-reload) +$0 stop +$0 start +;; +*) +log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}" +exit 1 +;; +esac + +exit 0 + From 7054e7736e4ce50e3dedb770ff02798277db8f0f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 30 Sep 2006 13:15:58 +0000 Subject: [PATCH 022/231] Added initscript for Ubuntu (posted by Paolo Martinelli) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@22 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 1 + sample-etc_rc.d_init.d_ddclient.ubuntu | 47 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 sample-etc_rc.d_init.d_ddclient.ubuntu diff --git a/Changelog b/Changelog index e693d44..48655af 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Changelog 3.7.1 - URL of zoneedit has changed (see bug #1558483) +- Added initscript for Ubuntu (posted by Paolo Martinelli) 3.7.0 - Added vi tag diff --git a/sample-etc_rc.d_init.d_ddclient.ubuntu b/sample-etc_rc.d_init.d_ddclient.ubuntu new file mode 100755 index 0000000..93b0ba4 --- /dev/null +++ b/sample-etc_rc.d_init.d_ddclient.ubuntu @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Start ddclient that provides support for updating dynamic DNS services. +# +# Submitted by paolo martinelli + +DDCLIENT=/usr/sbin/ddclient +CONF=/etc/ddclient/ddclient.conf +PIDFILE=/var/run/ddclient.pid + +test -x $DDCLIENT || exit 0 +test -f $CONF || exit 0 + +. /lib/lsb/init-functions + +case "$1" in +start) +log_begin_msg "Starting ddclient..." +DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` +if [ -z "$DELAY" ] ; then +DELAY="-daemon 300" +else +DELAY='' +fi +start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY +log_end_msg $? +;; +stop) +if [ -f $PIDFILE ] ; then +log_begin_msg "Stopping ddclient..." +start-stop-daemon -K -q -p $PIDFILE +log_end_msg $? +rm -f $PIDFILE +fi +;; +restart|reload|force-reload) +$0 stop +$0 start +;; +*) +log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}" +exit 1 +;; +esac + +exit 0 + From 7c28ea4c35e626c7b1920605bdf571c2b3c403f5 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 1 Oct 2006 09:47:57 +0000 Subject: [PATCH 023/231] Added some svn keywords git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@23 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/ddclient.css | 10 ++++++++- html/doc.php | 8 +++++++ html/home.php | 42 ++++++++++++++++++++++++++----------- html/index.php | 12 +++++++++++ html/protocol.php | 9 ++++++++ html/router.php | 8 +++++++ html/sinorca-print.css | 11 ++++++++-- html/sinorca-screen-alt.css | 10 ++++++++- html/sinorca-screen.css | 11 ++++++++-- html/xml.php | 8 +++++++ 10 files changed, 111 insertions(+), 18 deletions(-) diff --git a/html/ddclient.css b/html/ddclient.css index bcd68be..df7d51d 100644 --- a/html/ddclient.css +++ b/html/ddclient.css @@ -3,6 +3,14 @@ * URI : sinorca/sinorca-screen.css * * MODIF: 2003-Apr-30 19:31 +0800 * *************************************/ +/* + * $Id$ + * + * $LastChangedDate$ + * $Rev$ + * $Author$ + * + * */ /* ##### Common Styles ##### */ @@ -296,4 +304,4 @@ dd { #footer a:hover { text-decoration: none; -} \ No newline at end of file +} diff --git a/html/doc.php b/html/doc.php index da38852..d29ffd6 100644 --- a/html/doc.php +++ b/html/doc.php @@ -1,4 +1,12 @@

    There are a few configuration examples provided which you can copy to /etc/ddclient/ddclient.conf and modify. More info about the configuration -can be found on the usage page -

    +can be found on the usage page. There's also +a sample configuration delivered with ddclient. +

    +

    A typical configuration like:

    @@ -55,7 +65,8 @@ myhost.dyndns.org
     

    You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" -and put it in your startup scripts. +and put it in your startup scripts. There are samples of startup scripts +provided with ddclient.

    \n"; $main[] = $text; @@ -64,13 +75,16 @@ $text['id'] = "help"; $text['title'] = "Documentation and help"; $text['menu'] = "Documentation"; $text['body'] = " -

    The documentation about the configuration has been splitted in three +

    +The documentation about the configuration has been splitted in three sections. The usage page describes the most parts of the configuration while the supported protocols page describes the protocol-specific options. If you want to know how to use ddclient with your router, check the supported routers. -

    +

    + +

    Debugging ddclient looks pretty hard but it isn't. First try to put \n". "as less as necessary in your configuration. Try to run \n". "`./ddclient -daemon=0 -noquiet -debug` and check the result. \n" . @@ -88,14 +102,18 @@ Debugging ddclient looks pretty hard but it isn't. First try to put \n". "work as you expected, you can enable debug and verbose messages \n" . "by running ddclient -daemon=0 -debug -verbose -noquiet.\n". "

    \n". - "

    \n" . - "If this doesn't help for you, maybe \n" . - "\n" . - "the help forum on sourceforge can bring some help.\n" . - "I know the manual is not very clear, you have to read the example " . - "configurations included in the tar-file or you can run " . +"

    +If this doesn't help for you, maybe + +the help forum on sourceforge can bring some help. +If you don't want to register on sf.net, you can try + +the ddclient-support mailinglist on sf.net. +If you're lucky you can find some help on +#ddclient on irc.freenode.net. " . + "I know the manual is not very clear, you have to read the example\n" . + "configurations included in the tar-file or you can run\n" . ""ddclient --help" to get more help. " . - "If you lucky you can find some help on #ddclient on irc.freenode.net" . "

    \n" . "

    More info about the ddclient project can be found on " . diff --git a/html/index.php b/html/index.php index ddb9cdb..d775054 100644 --- a/html/index.php +++ b/html/index.php @@ -1,4 +1,13 @@ + $subpage) { E-mail: webmaster@your.company.com
    Contact Us +

    + $Id$ +
    diff --git a/html/protocol.php b/html/protocol.php index c3ab9d3..fd2dac4 100644 --- a/html/protocol.php +++ b/html/protocol.php @@ -1,4 +1,12 @@ \n" . "
    \n" . "

    "; $main[] = $text; +?> diff --git a/html/router.php b/html/router.php index b5d4882..df856fa 100644 --- a/html/router.php +++ b/html/router.php @@ -1,4 +1,12 @@ Date: Sun, 1 Oct 2006 09:50:20 +0000 Subject: [PATCH 024/231] forgot to close a div tag git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@24 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/index.php b/html/index.php index d775054..6d8ba97 100644 --- a/html/index.php +++ b/html/index.php @@ -184,7 +184,7 @@ foreach ($pages as $id => $subpage) {
    $Id$ - +

    From fae4976112b4e16e5bf890c0e437ae15a4fa3276 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 1 Oct 2006 10:02:31 +0000 Subject: [PATCH 025/231] Added subversion to download section git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@25 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/home.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/home.php b/html/home.php index 90e442f..a68f02b 100644 --- a/html/home.php +++ b/html/home.php @@ -41,7 +41,9 @@ $text['body'] = Ddclient doesn't have any automatic installation procedure. Get the tar-file from " . $link['download'] . " and untar it. Copy the perl script to your favorit location (ex. /usr/sbin) and create a /etc/ddclient/ddclient.conf -configuration file. +configuration file. If you want the bleeding edge of ddclient, you can get +the subversion-version using +
     svn co https://svn.sourceforge.net/svnroot/ddclient/trunk/svn ddclient

    There are a few configuration examples provided which you can copy to /etc/ddclient/ddclient.conf and modify. More info about the configuration From a5a3211944b5a5ca89a82a5c78497f2385d8b4e8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 1 Oct 2006 11:29:58 +0000 Subject: [PATCH 026/231] Made website more Valid XHTML git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@26 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/ddclient.css | 10 +-------- html/index.php | 20 ++++++++--------- html/protocol.php | 56 ++++++++++++++++++++++++----------------------- 3 files changed, 40 insertions(+), 46 deletions(-) diff --git a/html/ddclient.css b/html/ddclient.css index df7d51d..bcd68be 100644 --- a/html/ddclient.css +++ b/html/ddclient.css @@ -3,14 +3,6 @@ * URI : sinorca/sinorca-screen.css * * MODIF: 2003-Apr-30 19:31 +0800 * *************************************/ -/* - * $Id$ - * - * $LastChangedDate$ - * $Rev$ - * $Author$ - * - * */ /* ##### Common Styles ##### */ @@ -304,4 +296,4 @@ dd { #footer a:hover { text-decoration: none; -} +} \ No newline at end of file diff --git a/html/index.php b/html/index.php index 6d8ba97..4d2aff0 100644 --- a/html/index.php +++ b/html/index.php @@ -1,16 +1,16 @@ - $subpage) { Website is hosted on - SourceForge.net Logo + SourceForge.net Logo

    diff --git a/html/protocol.php b/html/protocol.php index fd2dac4..2984718 100644 --- a/html/protocol.php +++ b/html/protocol.php @@ -29,7 +29,7 @@ $text['title'] = "dnspark protocol"; $text['menu'] = "dnspark"; $text['body'] = "

    The 'dnspark' protocol is used by DNS service offered by www.dnspark.com.

    \n ". - "

    Configuration variables applicable to the 'easydns' protocol are:\n ". + "

    Configuration variables applicable to the 'dsnpark' protocol are:

    \n ". "\n" . "\n". "\n". @@ -64,7 +64,7 @@ $text['body'] = "login=my-dnspark.com-login, \\\n" . "password=my-dnspark.com-password \\\n" . "my-toplevel-domain.com,my-other-domain.com\n" . - "
    \n" . 
    +	"
    \n" . "\n" ; $main[] = $text; @@ -76,16 +76,16 @@ $text['body'] = "

    The 'dslreports1' protocol is used by a free DSL monitoring service\n" . "offered by www.dslreports.com.

    \n" . -"

    Configuration variables applicable to the 'dslreports1' protocol are:

    " . -"
    protocol=dnspark
    server=fqdn.of.service defaults to www.dnspark.com
    \n" . - "" . - "" . - "" . - "" . - "" . -"
    protocol=dslreports1
    server=fqdn.of.service defaults to www.dslreports.com
    login=service-login login name and password registered with the service
    password=service-password
    unique-number the host registered with the service.
    \n" . +"

    Configuration variables applicable to the 'dslreports1' protocol are:

    +
    + + + + + +
    protocol=dslreports1
    server=fqdn.of.service defaults to www.dslreports.com
    login=service-login login name and password registered with the service
    password=service-password
    unique-number the host registered with the service.
    -"

    Example ddclient.conf file entries:

    " . +

    Example ddclient.conf file entries:

    " . "
    \n" . "
    \n" .
       "## single host update\n" .
    @@ -94,8 +94,8 @@ $text['body']  =
       "login=my-dslreports-login,                                \\\n" .
       "password=my-dslreports-password                           \\\n" .
       "123456\n" .
    -"
    \n" . "\n" . +"\n" . "

    Note: DSL Reports uses a unique number as the host name. This number\n" . "can be found on the Monitor Control web page.

    \n" ; @@ -109,7 +109,7 @@ $text['body'] = "update the www.dyndns.org service. However, other services are also \n". "using this protocol so support is still provided by ddclient.

    \n". " \n". -"Configuration variables applicable to the 'dyndns1' protocol are: \n". +"

    Configuration variables applicable to the 'dyndns1' protocol are:

    \n". "\n" . "\n" . "\n" . @@ -136,8 +136,8 @@ $text['body'] = "password=my-dyndns.org-password, \\\n" . "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\\n" . "myhost.dyndns.org,my2ndhost.dyndns.org \n" . - " \n" . "\n" . + " \n" . "

    Note: you only need one of the examples

    \n"; $main[] = $text; @@ -199,7 +199,7 @@ $text['body'] = "

    The 'easydns' protocol is used by the for fee DNS service offered \n" . "by www.easydns.com.

    \n" . -"

    Configuration variables applicable to the 'easydns' protocol are:\n". +"

    Configuration variables applicable to the 'easydns' protocol are:

    \n". "
    protocol=dyndns1
    server=fqdn.of.service defaults to members.dyndns.org
    \n" . "\n" . "\n" . @@ -209,7 +209,7 @@ $text['body'] = "\n" . "\n" . "\n" . - "
    protocol=easydns
    server=fqdn.of.service defaults to members.easydns.com
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.

    \n" . + "\n" . "

    Example ddclient.conf file entries:

    " . "
    \n" . @@ -247,7 +247,7 @@ $text['body'] = "The 'hammernode1' protocol is the protocol used by the free dynamic \n" . "DNS service offered by Hammernode at www.hn.org

    \n" . -"Configuration variables applicable to the 'hammernode1' protocol are:

    \n" . +"

    Configuration variables applicable to the 'hammernode1' protocol are:

    \n" . "\n" . "\n" . "\n" . @@ -308,16 +308,18 @@ $main[] = $text; $text['id'] = "zoneedit1"; $text['title'] = "zoneedit1"; $text['menu'] = "zoneedit1"; -$text['body'] = -"

    The 'zoneedit1' protocol is used by a DNS service offered by -www.zoneedit.com.

    \n" . - -"

    Configuration variables applicable to the 'zoneedit1' protocol are:

    \n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . +$text['body'] = " +

    The 'zoneedit1' protocol is used by a DNS service offered by +www.zoneedit.com.

    +

    Configuration variables applicable to the 'zoneedit1' +protocol are:

    +
    protocol=hammernode1
    server=fqdn.of.service defaults to members.dyndns.org
    protocol=zoneedit1
    server=fqdn.of.service defaults to www.zoneedit.com
    login=service-login login name and password registered with the service
    password=service-password
    your.domain.name the host registered with the service.
    + + + + + +
    protocol=zoneedit1
    server=fqdn.of.service defaults to www.zoneedit.com
    login=service-login login name and password registered with the service
    password=service-password
    your.domain.name the host registered with the service.
    \n" . "

    Example ddclient.conf file entries:

    \n" . "
    \n" . From a59667025059f8a921162e8e2c2967dc67213e92 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 1 Oct 2006 11:38:16 +0000 Subject: [PATCH 027/231] Modified todo.txt git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@27 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/todo.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/html/todo.txt b/html/todo.txt index a28949d..76ecdd8 100644 --- a/html/todo.txt +++ b/html/todo.txt @@ -2,5 +2,3 @@ IRC: There are not that much people on irc. Mostly it's just wimpunk and a few README: Adding the README's to the html-code Pastbin: Handy to post your config, doesn't mess up your lines. STEP BY STEP: Some people need some help on how to use ddclient, maybe it's good to be more detailed. -download: add svn - From 15fa2c995ff6b740de4816747320eb68facf5e7c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 3 Nov 2006 08:01:41 +0000 Subject: [PATCH 028/231] Added patch "Patch: Treat --daemon values as intervals" (submitted by James deBoer) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@28 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 3 +++ svn/ddclient | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/svn/Changelog b/svn/Changelog index 48655af..fddd1e7 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -3,6 +3,9 @@ Changelog 3.7.1 - URL of zoneedit has changed (see bug #1558483) - Added initscript for Ubuntu (posted by Paolo Martinelli) +- Added patch "Patch: Treat --daemon values as intervals" + (submitted by James deBoer) + 3.7.0 - Added vi tag diff --git a/svn/ddclient b/svn/ddclient index 647f5d4..94eefc0 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -593,7 +593,7 @@ do { usage("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n",ip_strategies_usage())) unless exists $ip_strategies{lc opt('use')}; - $daemon = define($opt{'daemon'}, $globals{'daemon'}); + $daemon = $opt{'daemon'}; $daemon = 0 if opt('force'); ## obtain the IP address to use. @@ -979,9 +979,13 @@ sub init_config { $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); $opt{'timeout'} = 0 if opt('timeout') < 0; - $opt{'daemon'} = minimum('daemon') - if define($opt{'daemon'},$globals{'daemon'},0) - && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); + + ## only set $opt{'daemon'} if it has been explicitly passed in + if (define($opt{'daemon'},$globals{'daemon'},0)) { + $opt{'daemon'} = interval(opt('daemon')); + $opt{'daemon'} = minimum('daemon') + if ($opt{'daemon'} < minimum('daemon')); + } ## define or modify host options specified on the command-line if (exists $opt{'options'} && defined $opt{'options'}) { From 39a48487878b0730bd55a1855a54925cda1f294f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 3 Nov 2006 08:01:41 +0000 Subject: [PATCH 029/231] Added patch "Patch: Treat --daemon values as intervals" (submitted by James deBoer) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@28 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 3 +++ ddclient | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 48655af..fddd1e7 100644 --- a/Changelog +++ b/Changelog @@ -3,6 +3,9 @@ Changelog 3.7.1 - URL of zoneedit has changed (see bug #1558483) - Added initscript for Ubuntu (posted by Paolo Martinelli) +- Added patch "Patch: Treat --daemon values as intervals" + (submitted by James deBoer) + 3.7.0 - Added vi tag diff --git a/ddclient b/ddclient index 647f5d4..94eefc0 100755 --- a/ddclient +++ b/ddclient @@ -593,7 +593,7 @@ do { usage("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n",ip_strategies_usage())) unless exists $ip_strategies{lc opt('use')}; - $daemon = define($opt{'daemon'}, $globals{'daemon'}); + $daemon = $opt{'daemon'}; $daemon = 0 if opt('force'); ## obtain the IP address to use. @@ -979,9 +979,13 @@ sub init_config { $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); $opt{'timeout'} = 0 if opt('timeout') < 0; - $opt{'daemon'} = minimum('daemon') - if define($opt{'daemon'},$globals{'daemon'},0) - && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); + + ## only set $opt{'daemon'} if it has been explicitly passed in + if (define($opt{'daemon'},$globals{'daemon'},0)) { + $opt{'daemon'} = interval(opt('daemon')); + $opt{'daemon'} = minimum('daemon') + if ($opt{'daemon'} < minimum('daemon')); + } ## define or modify host options specified on the command-line if (exists $opt{'options'} && defined $opt{'options'}) { From 2740a57766a196967643fa8255e560f361904309 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 14 Nov 2006 07:45:20 +0000 Subject: [PATCH 030/231] Added a little irc comment git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@29 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/home.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/html/home.php b/html/home.php index a68f02b..7af86f4 100644 --- a/html/home.php +++ b/html/home.php @@ -112,12 +112,15 @@ If you don't want to register on sf.net, you can try the ddclient-support mailinglist on sf.net. If you're lucky you can find some help on -#ddclient on irc.freenode.net. " . - "I know the manual is not very clear, you have to read the example\n" . - "configurations included in the tar-file or you can run\n" . - ""ddclient --help" to get more help. " . - "

    \n" . - "

    +#ddclient on irc.freenode.net. +Please be a little patient, we're regulary running idle when we're +out there. +

    \n" . +"I know the manual is not very clear, you have to read the example\n" . +"configurations included in the tar-file or you can run\n" . +""ddclient --help" to get more help. " . +"

    \n" . +"

    More info about the ddclient project can be found on " . $link['project'] . "

    "; From af4b8d2df855ec25e965762964e9570ae15411f3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 27 Nov 2006 07:47:33 +0000 Subject: [PATCH 031/231] Don't send any mail when in not running daemon mode (patch submitted by Daniel Thaler) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@30 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 2 ++ svn/ddclient | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/svn/Changelog b/svn/Changelog index fddd1e7..9102dbd 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -5,6 +5,8 @@ Changelog - Added initscript for Ubuntu (posted by Paolo Martinelli) - Added patch "Patch: Treat --daemon values as intervals" (submitted by James deBoer) +- Don't send any mail when in not running daemon mode (patch submitted by + Daniel Thaler) 3.7.0 diff --git a/svn/ddclient b/svn/ddclient index 94eefc0..b1801b8 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -1353,7 +1353,7 @@ sub logger { sub sendmail { my $recipients = opt('mail'); - if (opt('mail-failure') && ($result ne 'OK')) { + if (opt('mail-failure') && ($result ne 'OK' && $result != 0)) { $recipients = opt('mail-failure'); } if ($msgs && $recipients && $msgs ne $last_msgs) { From 5cd586e38d3d717aaad3171e1ba4d990744d64e8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 27 Nov 2006 07:47:33 +0000 Subject: [PATCH 032/231] Don't send any mail when in not running daemon mode (patch submitted by Daniel Thaler) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@30 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 2 ++ ddclient | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index fddd1e7..9102dbd 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,8 @@ Changelog - Added initscript for Ubuntu (posted by Paolo Martinelli) - Added patch "Patch: Treat --daemon values as intervals" (submitted by James deBoer) +- Don't send any mail when in not running daemon mode (patch submitted by + Daniel Thaler) 3.7.0 diff --git a/ddclient b/ddclient index 94eefc0..b1801b8 100755 --- a/ddclient +++ b/ddclient @@ -1353,7 +1353,7 @@ sub logger { sub sendmail { my $recipients = opt('mail'); - if (opt('mail-failure') && ($result ne 'OK')) { + if (opt('mail-failure') && ($result ne 'OK' && $result != 0)) { $recipients = opt('mail-failure'); } if ($msgs && $recipients && $msgs ne $last_msgs) { From f299ce5ccbcc0d6eddffeabe2de32bfe0703efea Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:09:38 +0000 Subject: [PATCH 033/231] Changed Changelog syntax git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@31 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/svn/Changelog b/svn/Changelog index 9102dbd..040388a 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -1,12 +1,13 @@ Changelog 3.7.1 -- URL of zoneedit has changed (see bug #1558483) -- Added initscript for Ubuntu (posted by Paolo Martinelli) -- Added patch "Patch: Treat --daemon values as intervals" - (submitted by James deBoer) -- Don't send any mail when in not running daemon mode (patch submitted by - Daniel Thaler) + * URL of zoneedit has changed (see bug #1558483) + * Added initscript for Ubuntu (posted by Paolo Martinelli) + * Added patch "Patch: Treat --daemon values as intervals" + (submitted by James deBoer) + * Don't send any mail when in not running daemon mode + (patch submitted by Daniel Thaler) + * Changed Changelog syntax 3.7.0 From 799570d3817f1da01daf5a519abad7cc616e77a0 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:09:38 +0000 Subject: [PATCH 034/231] Changed Changelog syntax git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@31 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Changelog b/Changelog index 9102dbd..040388a 100644 --- a/Changelog +++ b/Changelog @@ -1,12 +1,13 @@ Changelog 3.7.1 -- URL of zoneedit has changed (see bug #1558483) -- Added initscript for Ubuntu (posted by Paolo Martinelli) -- Added patch "Patch: Treat --daemon values as intervals" - (submitted by James deBoer) -- Don't send any mail when in not running daemon mode (patch submitted by - Daniel Thaler) + * URL of zoneedit has changed (see bug #1558483) + * Added initscript for Ubuntu (posted by Paolo Martinelli) + * Added patch "Patch: Treat --daemon values as intervals" + (submitted by James deBoer) + * Don't send any mail when in not running daemon mode + (patch submitted by Daniel Thaler) + * Changed Changelog syntax 3.7.0 From e9cdb27f95c2d16f687a7be486ec87b2f1d6ba2b Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:11:48 +0000 Subject: [PATCH 035/231] Applied abuse_msg.diff: ddclient still reports the email to contact dyndns.org but they prefer a web form today (IIRC). This patch adjusts the abuse warning printed by ddclient. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@32 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index b1801b8..075cf0f 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -2215,7 +2215,7 @@ sub nic_dyndns2_update { '!yours' => 'The hostname specified exists, but not under the username currently being used', '!donator' => 'The offline setting was set, when the user is not a donator', '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', - 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', + 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', From a8f27939eb3572fb0a0601182a85b7205115d500 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:11:48 +0000 Subject: [PATCH 036/231] Applied abuse_msg.diff: ddclient still reports the email to contact dyndns.org but they prefer a web form today (IIRC). This patch adjusts the abuse warning printed by ddclient. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@32 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index b1801b8..075cf0f 100755 --- a/ddclient +++ b/ddclient @@ -2215,7 +2215,7 @@ sub nic_dyndns2_update { '!yours' => 'The hostname specified exists, but not under the username currently being used', '!donator' => 'The offline setting was set, when the user is not a donator', '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', - 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', + 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', From 9383adf9d9a2cf59ac870b6907951fcea90d4c11 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:16:42 +0000 Subject: [PATCH 037/231] Applied cachedir.diff: Original ddclient stores a cache file in /etc which would belong in /var/cache in my opinion and according to the FHS. Patch changes that. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@33 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index 075cf0f..caaf011 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -22,6 +22,7 @@ $program =~ s/d$//; my $now = time; my $hostname = hostname(); my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; +my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; my $msgs = ''; my $last_msgs = ''; @@ -296,7 +297,7 @@ my %variables = ( 'global-defaults' => { 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), - 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), + 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), 'pid' => setv(T_FILE, 0, 0, 1, "", undef), 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), From d61684e22f462d6bd1b475dcfca443315e1996d8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:16:42 +0000 Subject: [PATCH 038/231] Applied cachedir.diff: Original ddclient stores a cache file in /etc which would belong in /var/cache in my opinion and according to the FHS. Patch changes that. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@33 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 075cf0f..caaf011 100755 --- a/ddclient +++ b/ddclient @@ -22,6 +22,7 @@ $program =~ s/d$//; my $now = time; my $hostname = hostname(); my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; +my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; my $msgs = ''; my $last_msgs = ''; @@ -296,7 +297,7 @@ my %variables = ( 'global-defaults' => { 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), - 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), + 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), 'pid' => setv(T_FILE, 0, 0, 1, "", undef), 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), From 33b438c5f9d71966a7456812f74a16fce3d9417a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:40:37 +0000 Subject: [PATCH 039/231] Applied help_nonroot.diff: Allow calling the help function as non-root. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@34 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index caaf011..ed5c25d 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -543,6 +543,12 @@ $result = 'OK'; test_geturl(opt('geturl')) if opt('geturl'); +## process help option +if (opt('help')) { + *STDERR = *STDOUT; + usage(0); +} + ## read config file because 'daemon' mode may be defined there. read_config(define($opt{'file'}, default('file')), \%config, \%globals); init_config(); @@ -1101,16 +1107,14 @@ sub init_config { $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; } } - if (opt('help')) { - *STDERR = *STDOUT; - usage(); - } } ###################################################################### ## usage ###################################################################### sub usage { + my $exitcode = 1; + $exitcode = shift if @_ != 0; # use first arg if given my $msg = ''; if (@_) { my $format = shift; @@ -1120,7 +1124,7 @@ sub usage { } printf STDERR "%s%s\n", $msg, $opt_usage; sendmail(); - exit 1; + exit $exitcode; } ###################################################################### From f1ef8ac0659a43aecb3c6ae46d3fd85920b6bdba Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:40:37 +0000 Subject: [PATCH 040/231] Applied help_nonroot.diff: Allow calling the help function as non-root. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@34 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ddclient b/ddclient index caaf011..ed5c25d 100755 --- a/ddclient +++ b/ddclient @@ -543,6 +543,12 @@ $result = 'OK'; test_geturl(opt('geturl')) if opt('geturl'); +## process help option +if (opt('help')) { + *STDERR = *STDOUT; + usage(0); +} + ## read config file because 'daemon' mode may be defined there. read_config(define($opt{'file'}, default('file')), \%config, \%globals); init_config(); @@ -1101,16 +1107,14 @@ sub init_config { $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; } } - if (opt('help')) { - *STDERR = *STDOUT; - usage(); - } } ###################################################################### ## usage ###################################################################### sub usage { + my $exitcode = 1; + $exitcode = shift if @_ != 0; # use first arg if given my $msg = ''; if (@_) { my $format = shift; @@ -1120,7 +1124,7 @@ sub usage { } printf STDERR "%s%s\n", $msg, $opt_usage; sendmail(); - exit 1; + exit $exitcode; } ###################################################################### From c3b2771c8bcc875d86672731afd6e0825cb367af Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:46:01 +0000 Subject: [PATCH 041/231] Applied ip-up_run-parts.diff: Fix parameter in ip-up script. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@35 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/sample-etc_ppp_ip-up.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/sample-etc_ppp_ip-up.local b/svn/sample-etc_ppp_ip-up.local index b7a9025..6f11484 100644 --- a/svn/sample-etc_ppp_ip-up.local +++ b/svn/sample-etc_ppp_ip-up.local @@ -34,7 +34,7 @@ case "$IP" in ;; *) ( sleep 5 - ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 + ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 ) & ;; esac From be05257113fc07caee086df8bb02aced474d3a86 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:46:01 +0000 Subject: [PATCH 042/231] Applied ip-up_run-parts.diff: Fix parameter in ip-up script. (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@35 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_ppp_ip-up.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-etc_ppp_ip-up.local b/sample-etc_ppp_ip-up.local index b7a9025..6f11484 100644 --- a/sample-etc_ppp_ip-up.local +++ b/sample-etc_ppp_ip-up.local @@ -34,7 +34,7 @@ case "$IP" in ;; *) ( sleep 5 - ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 + ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 ) & ;; esac From 344c36c60700a95cb5a82e0b474084be97043ec8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:53:59 +0000 Subject: [PATCH 043/231] Applied update-new-config.patch: Force update if config has changed (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@36 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/svn/ddclient b/svn/ddclient index ed5c25d..fca6f5a 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -2004,6 +2004,13 @@ sub nic_updateable { } elsif (defined($sub) && &$sub($host)) { $update = 1; + } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || + ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || + ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || + ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { + info("updating %s because host settings have been changed.", $host); + $update = 1; + } else { success("%s: skipped: IP address was already set to %s.", $host, $ip) if opt('verbose'); From 38147d7e0979018e0415609bbb5709fbd857544f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 14:53:59 +0000 Subject: [PATCH 044/231] Applied update-new-config.patch: Force update if config has changed (submitted by Torsten) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@36 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ddclient b/ddclient index ed5c25d..fca6f5a 100755 --- a/ddclient +++ b/ddclient @@ -2004,6 +2004,13 @@ sub nic_updateable { } elsif (defined($sub) && &$sub($host)) { $update = 1; + } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || + ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || + ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || + ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { + info("updating %s because host settings have been changed.", $host); + $update = 1; + } else { success("%s: skipped: IP address was already set to %s.", $host, $ip) if opt('verbose'); From 33dad60c7a7bdc0bff227dc45fd45ddf0745b9c2 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 15:00:48 +0000 Subject: [PATCH 045/231] Applied smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW firewall (submitted by Torsten) Changelog modified for all previous patches from Torsten git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@37 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 12 +++++++++++- svn/ddclient | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/svn/Changelog b/svn/Changelog index 040388a..ee35de4 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -8,7 +8,16 @@ Changelog * Don't send any mail when in not running daemon mode (patch submitted by Daniel Thaler) * Changed Changelog syntax - + * Applied patches submitted by Torsten: + abuse_msg.diff: ddclient still reports the email to contact dyndns.org + but they prefer a web form today (IIRC). This patch adjusts the abuse + warning printed by ddclient. + cachedir.diff: Original ddclient stores a cache file in /etc which + would belong in /var/cache in my opinion and according to the FHS. + help_nonroot.diff: Allow calling the help function as non-root. + update-new-config.patch: Force update if config has changed + smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW + firewall 3.7.0 - Added vi tag @@ -266,3 +275,4 @@ Changelog ------------------------------------------------------------------------------- $Id$ +------------------------------------------------------------------------ diff --git a/svn/ddclient b/svn/ddclient index fca6f5a..facfa26 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -73,6 +73,11 @@ my %builtinfw = ( 'url' => '/status.htm', 'skip' => 'IP Address', }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', + 'skip' => 'IP Address', + }, 'netgear-rt3xx' => { 'name' => 'Netgear FW', 'url' => '/mtenSysStatus.html', From 97438a35751dd6766254f5ef034c4c6cff72641d Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 2 Dec 2006 15:00:48 +0000 Subject: [PATCH 046/231] Applied smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW firewall (submitted by Torsten) Changelog modified for all previous patches from Torsten git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@37 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 12 +++++++++++- ddclient | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 040388a..ee35de4 100644 --- a/Changelog +++ b/Changelog @@ -8,7 +8,16 @@ Changelog * Don't send any mail when in not running daemon mode (patch submitted by Daniel Thaler) * Changed Changelog syntax - + * Applied patches submitted by Torsten: + abuse_msg.diff: ddclient still reports the email to contact dyndns.org + but they prefer a web form today (IIRC). This patch adjusts the abuse + warning printed by ddclient. + cachedir.diff: Original ddclient stores a cache file in /etc which + would belong in /var/cache in my opinion and according to the FHS. + help_nonroot.diff: Allow calling the help function as non-root. + update-new-config.patch: Force update if config has changed + smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW + firewall 3.7.0 - Added vi tag @@ -266,3 +275,4 @@ Changelog ------------------------------------------------------------------------------- $Id$ +------------------------------------------------------------------------ diff --git a/ddclient b/ddclient index fca6f5a..facfa26 100755 --- a/ddclient +++ b/ddclient @@ -73,6 +73,11 @@ my %builtinfw = ( 'url' => '/status.htm', 'skip' => 'IP Address', }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', + 'skip' => 'IP Address', + }, 'netgear-rt3xx' => { 'name' => 'Netgear FW', 'url' => '/mtenSysStatus.html', From d978f062047976b9aa3f81f32b4c7a21bb6874db Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 3 Dec 2006 10:38:29 +0000 Subject: [PATCH 047/231] Applied cisco_fw.diff: Use configured hostname for firewall access with -use=cisco (closes: #345712). Thanks to Per Carlson for the patch! See http://bugs.debian.org/345712. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@38 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index facfa26..8cd9168 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -1820,7 +1820,7 @@ sub get_ip { # Protect special HTML characters (like '?') $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; $arg = $url; From c30044a79f8a7431cca49a1e4226f3acd6359a68 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 3 Dec 2006 10:38:29 +0000 Subject: [PATCH 048/231] Applied cisco_fw.diff: Use configured hostname for firewall access with -use=cisco (closes: #345712). Thanks to Per Carlson for the patch! See http://bugs.debian.org/345712. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@38 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index facfa26..8cd9168 100755 --- a/ddclient +++ b/ddclient @@ -1820,7 +1820,7 @@ sub get_ip { # Protect special HTML characters (like '?') $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; $arg = $url; From 87a001faaceabb8d9f0c160febf63a942fc2f93c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 3 Dec 2006 10:43:16 +0000 Subject: [PATCH 049/231] Applied maxinterval.diff: Increase max interval for updates. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 http://www.dyndns.com/support/services/dyndns/faq.html#q15 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@39 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 7 +++++++ svn/ddclient | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/svn/Changelog b/svn/Changelog index ee35de4..9f67768 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -18,6 +18,13 @@ Changelog update-new-config.patch: Force update if config has changed smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW firewall + cisco_fw.diff: Use configured hostname for firewall access + with -use=cisco (closes: #345712). Thanks to Per Carlson for the + patch! See http://bugs.debian.org/345712. + maxinterval.diff: Increase max interval for updates. + See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 + http://www.dyndns.com/support/services/dyndns/faq.html#q15 + 3.7.0 - Added vi tag diff --git a/svn/ddclient b/svn/ddclient index 8cd9168..f170ec9 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -352,7 +352,7 @@ my %variables = ( 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), 'status' => setv(T_ANY, 0, 1, 0, '', undef), 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), - 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), From 57b59643ae3f8ebd1751a387a59b880c4b7a5c23 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 3 Dec 2006 10:43:16 +0000 Subject: [PATCH 050/231] Applied maxinterval.diff: Increase max interval for updates. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 http://www.dyndns.com/support/services/dyndns/faq.html#q15 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@39 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 7 +++++++ ddclient | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index ee35de4..9f67768 100644 --- a/Changelog +++ b/Changelog @@ -18,6 +18,13 @@ Changelog update-new-config.patch: Force update if config has changed smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW firewall + cisco_fw.diff: Use configured hostname for firewall access + with -use=cisco (closes: #345712). Thanks to Per Carlson for the + patch! See http://bugs.debian.org/345712. + maxinterval.diff: Increase max interval for updates. + See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 + http://www.dyndns.com/support/services/dyndns/faq.html#q15 + 3.7.0 - Added vi tag diff --git a/ddclient b/ddclient index 8cd9168..f170ec9 100755 --- a/ddclient +++ b/ddclient @@ -352,7 +352,7 @@ my %variables = ( 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), 'status' => setv(T_ANY, 0, 1, 0, '', undef), 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), - 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), From 7247771d632a5a6b3441c66f6529e51c2141fc02 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 24 Jan 2007 23:41:16 +0000 Subject: [PATCH 051/231] Changed max-interval to 25days. See https://www.dyndns.com/services/dns/dyndns/faq.html git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@40 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 2 ++ svn/ddclient | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/svn/Changelog b/svn/Changelog index 9f67768..e7eed45 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -24,6 +24,8 @@ Changelog maxinterval.diff: Increase max interval for updates. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 http://www.dyndns.com/support/services/dyndns/faq.html#q15 + * Changed max-interval to 25days. See + https://www.dyndns.com/services/dns/dyndns/faq.html 3.7.0 diff --git a/svn/ddclient b/svn/ddclient index f170ec9..1160d7a 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -352,7 +352,7 @@ my %variables = ( 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), 'status' => setv(T_ANY, 0, 1, 0, '', undef), 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), - 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), From 154a0f11c0c9f172c967ec24391d2cc0b0eea917 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 24 Jan 2007 23:41:16 +0000 Subject: [PATCH 052/231] Changed max-interval to 25days. See https://www.dyndns.com/services/dns/dyndns/faq.html git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@40 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 2 ++ ddclient | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 9f67768..e7eed45 100644 --- a/Changelog +++ b/Changelog @@ -24,6 +24,8 @@ Changelog maxinterval.diff: Increase max interval for updates. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 http://www.dyndns.com/support/services/dyndns/faq.html#q15 + * Changed max-interval to 25days. See + https://www.dyndns.com/services/dns/dyndns/faq.html 3.7.0 diff --git a/ddclient b/ddclient index f170ec9..1160d7a 100755 --- a/ddclient +++ b/ddclient @@ -352,7 +352,7 @@ my %variables = ( 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), 'status' => setv(T_ANY, 0, 1, 0, '', undef), 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), - 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), From 1b974b32808ed40c5d3bd4f486bb0531e20ca2a1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 25 Jan 2007 15:24:44 +0000 Subject: [PATCH 053/231] Added extra p tag git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@41 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/home.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/home.php b/html/home.php index 7af86f4..edb9dd7 100644 --- a/html/home.php +++ b/html/home.php @@ -115,7 +115,7 @@ If you're lucky you can find some help on #ddclient on irc.freenode.net. Please be a little patient, we're regulary running idle when we're out there. -

    \n" . +

    \n

    " . "I know the manual is not very clear, you have to read the example\n" . "configurations included in the tar-file or you can run\n" . ""ddclient --help" to get more help. " . From 76bd12a948b0d1f54260926f1c8f4fa150a39812 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 21 Feb 2007 16:54:08 +0000 Subject: [PATCH 054/231] Preventing unitialized values, check https://sourceforge.net/forum/message.php?msg_id=4167772 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@43 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 2 ++ svn/ddclient | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/svn/Changelog b/svn/Changelog index e7eed45..017b7df 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -1,5 +1,7 @@ Changelog +3.7.2 + 3.7.1 * URL of zoneedit has changed (see bug #1558483) * Added initscript for Ubuntu (posted by Paolo Martinelli) diff --git a/svn/ddclient b/svn/ddclient index 1160d7a..e767381 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -1656,8 +1656,8 @@ sub geturl { $url =~ s%^[^/]*/%%; debug("server = $server"); - debug("opt(fw = ",opt('fw')); - debug("glo fw = $globals{'fw'}"); + opt('fw') && debug("opt(fw = ",opt('fw'),")"); + $globals{'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' ) { From 6ff9e58e149329483fdd5d33c3b32d85a0862502 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 21 Feb 2007 16:54:08 +0000 Subject: [PATCH 055/231] Preventing unitialized values, check https://sourceforge.net/forum/message.php?msg_id=4167772 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@43 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 2 ++ ddclient | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index e7eed45..017b7df 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ Changelog +3.7.2 + 3.7.1 * URL of zoneedit has changed (see bug #1558483) * Added initscript for Ubuntu (posted by Paolo Martinelli) diff --git a/ddclient b/ddclient index 1160d7a..e767381 100755 --- a/ddclient +++ b/ddclient @@ -1656,8 +1656,8 @@ sub geturl { $url =~ s%^[^/]*/%%; debug("server = $server"); - debug("opt(fw = ",opt('fw')); - debug("glo fw = $globals{'fw'}"); + opt('fw') && debug("opt(fw = ",opt('fw'),")"); + $globals{'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' ) { From 7d4520d12a23afba1f61406b7a312ef0537abe6f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 26 Feb 2007 07:43:59 +0000 Subject: [PATCH 056/231] added a TODO list git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@44 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/TODO | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 svn/TODO diff --git a/svn/TODO b/svn/TODO new file mode 100644 index 0000000..ac78cb8 --- /dev/null +++ b/svn/TODO @@ -0,0 +1,11 @@ +* ssl: + - check if the library can be used + - ssl on routers + - ssl on other providers + +* notice about irc: there's almost always someone there but we're sometimes idle +or at work... +* adding router: halted, only in patches section. +* add doc postscript +* FAQ: bad hostname (checkip) +* note about init-scripts. From 1362a87793414254c1a99b7efca5b005b608df41 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 26 Feb 2007 07:43:59 +0000 Subject: [PATCH 057/231] added a TODO list git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@44 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- TODO | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 TODO diff --git a/TODO b/TODO new file mode 100644 index 0000000..ac78cb8 --- /dev/null +++ b/TODO @@ -0,0 +1,11 @@ +* ssl: + - check if the library can be used + - ssl on routers + - ssl on other providers + +* notice about irc: there's almost always someone there but we're sometimes idle +or at work... +* adding router: halted, only in patches section. +* add doc postscript +* FAQ: bad hostname (checkip) +* note about init-scripts. From d5a1bb85c16e14dd7ea14bee393d769eeef11544 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 26 Feb 2007 21:21:26 +0000 Subject: [PATCH 058/231] Added a faq git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@45 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/faq.php | 42 ++++++++++++++++++++++++++++++++++++++++++ html/index.php | 7 ++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 html/faq.php diff --git a/html/faq.php b/html/faq.php new file mode 100644 index 0000000..2a3ef16 --- /dev/null +++ b/html/faq.php @@ -0,0 +1,42 @@ + + Ddclient doesn't check the dns result when it tries to update. + It checks its cache file an when value saved in the cache + differs from the result it got, it does an update. So if + you want to force an update, you could do it this way: +

      +
    • stop the normal instance of ddclient
    • +
    • force a value by running ddclient -use=ip -ip=1.2.3.4 -daemon=0
    • +
    • start the normal instance of ddclient
    • +
    + This way, ddclient changes its cache and will see an changed IP + adres. +

    \n"; + $main[] = $text; +/* + $text['id'] = "nonrouter"; + $text['title'] = "Non router option"; + $text['menu'] = "Non router"; + $text['body'] = + "" . + "\n" . + "" . + "\n" . + "" . + "" . + "
    -use=web obtain IP from an IP discovery page on the web. This is the default way if none is specified
    -use=if obtain IP from the -if {interface}.
    -use=ip obtain IP from -ip {address}.
    -use=cmd obtain IP from the -cmd {external-command}.
    -use=fw obtain IP from the firewall specified by -fw {type|address}.
    "; + $main[] = $text; +*/ +?> diff --git a/html/index.php b/html/index.php index 4d2aff0..ef78dc8 100644 --- a/html/index.php +++ b/html/index.php @@ -43,7 +43,8 @@ define('HOME', 0); define('USAGE', 1); define('PROTOCOL',2); define('ROUTER', 3); -define('XML', 4); +define('FAQ', 4); +define('XML', 5); // main $pages[HOME]['nr'] = HOME; @@ -63,6 +64,10 @@ $pages[ROUTER]['nr'] = ROUTER; $pages[ROUTER]['title'] = "supported routers"; $pages[ROUTER]['php'] = "router.php"; +$pages[FAQ]['nr'] = FAQ; +$pages[FAQ]['title'] = "faq"; +$pages[FAQ]['php'] = "faq.php"; + if ($debug) { $pages[XML]['nr'] = XML; $pages[XML]['title'] = "xml"; From 4fa1a884efe8e9a93d7964105c794b22427588b1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 11:20:35 +0000 Subject: [PATCH 059/231] Removed the two empty lines at the end of ddclient git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@46 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 -- 1 file changed, 2 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index e767381..044ea1f 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -3149,5 +3149,3 @@ sub nic_sitelutions_update { __END__ - - From 71b8022af1553ad762ca8e88ef0eec86296f5a31 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 11:20:35 +0000 Subject: [PATCH 060/231] Removed the two empty lines at the end of ddclient git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@46 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 -- 1 file changed, 2 deletions(-) diff --git a/ddclient b/ddclient index e767381..044ea1f 100755 --- a/ddclient +++ b/ddclient @@ -3149,5 +3149,3 @@ sub nic_sitelutions_update { __END__ - - From d18857e39d718456a2693eb0929f1956dc45d272 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 11:22:59 +0000 Subject: [PATCH 061/231] Applied checked_ssl_load.diff from ubuntu git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@47 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index 044ea1f..7017017 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -1635,6 +1635,20 @@ sub encode_base64 ($;$) { $res; } ###################################################################### +## load_ssl_support +###################################################################### +sub load_ssl_support { + my $ssl_loaded = eval {require IO::Socket::SSL}; + unless ($ssl_loaded) { + fatal(<<"EOM"); +Error loading the Perl module IO::Socket::SSL needed for SSL connect. +On Debian, the package libio-socket-ssl-perl must be installed. +EOM + } + import IO::Socket::SSL; + { no warnings; $IO::Socket::SSL::DEBUG = 0; } +} +###################################################################### ## geturl ###################################################################### sub geturl { @@ -1663,9 +1677,7 @@ sub geturl { 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; } + load_ssl_support; } else { $use_ssl = 0; $default_port = 80; From 85bb9aaee2a23e923a375ca8f77ae4ed6f98a3a9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 11:22:59 +0000 Subject: [PATCH 062/231] Applied checked_ssl_load.diff from ubuntu git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@47 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ddclient b/ddclient index 044ea1f..7017017 100755 --- a/ddclient +++ b/ddclient @@ -1635,6 +1635,20 @@ sub encode_base64 ($;$) { $res; } ###################################################################### +## load_ssl_support +###################################################################### +sub load_ssl_support { + my $ssl_loaded = eval {require IO::Socket::SSL}; + unless ($ssl_loaded) { + fatal(<<"EOM"); +Error loading the Perl module IO::Socket::SSL needed for SSL connect. +On Debian, the package libio-socket-ssl-perl must be installed. +EOM + } + import IO::Socket::SSL; + { no warnings; $IO::Socket::SSL::DEBUG = 0; } +} +###################################################################### ## geturl ###################################################################### sub geturl { @@ -1663,9 +1677,7 @@ sub geturl { 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; } + load_ssl_support; } else { $use_ssl = 0; $default_port = 80; From 904588184aad2aad91e35a10cfc5238d7c6e45d7 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 11:40:57 +0000 Subject: [PATCH 063/231] Cosmetic change about checkip git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@48 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index 7017017..033c3c6 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -54,7 +54,8 @@ sub T_POSTS {'postscript'}; ## strategies for obtaining an ip address. my %builtinweb = ( - 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, + 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => + 'Current IP Address:', }, 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, ); my %builtinfw = ( From 43131c64d17c13b72aa0cdba772e6936d35414da Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 11:40:57 +0000 Subject: [PATCH 064/231] Cosmetic change about checkip git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@48 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 7017017..033c3c6 100755 --- a/ddclient +++ b/ddclient @@ -54,7 +54,8 @@ sub T_POSTS {'postscript'}; ## strategies for obtaining an ip address. my %builtinweb = ( - 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, + 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => + 'Current IP Address:', }, 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, ); my %builtinfw = ( From ecf806ef1a3b1a02143ecbec264f2e8787fc0663 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 12:07:49 +0000 Subject: [PATCH 065/231] Added some ubuntu specific stuff. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@49 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/home.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/html/home.php b/html/home.php index edb9dd7..7f7d27a 100644 --- a/html/home.php +++ b/html/home.php @@ -73,8 +73,8 @@ provided with ddclient. $main[] = $text; // help part -$text['id'] = "help"; -$text['title'] = "Documentation and help"; +$text['id'] = "doc"; +$text['title'] = "Documentation"; $text['menu'] = "Documentation"; $text['body'] = "

    @@ -103,8 +103,20 @@ Debugging ddclient looks pretty hard but it isn't. First try to put \n". "If you think your configuration is correct, but ddclient doesn't \n" . "work as you expected, you can enable debug and verbose messages \n" . "by running ddclient -daemon=0 -debug -verbose -noquiet.\n". - "

    \n". -"

    + "

    \n"; +$main[] = $text; +unset ($text); + +$text['id'] = "help"; +$text['title'] = "Getting help"; +$text['menu'] = "Help"; +$text['body'] = " + +

    +Please note: if you are using ubuntu, contact the ubuntu forum at +https://launchpad.net/ubuntu/+source/ddclient/+filebug since there are a few differences between ubuntu and the original ddclient +

    +

    If this doesn't help for you, maybe the help forum on sourceforge can bring some help. From 8d0642e4d813d164f31ca16e3fe6161a928ebbad Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 19 May 2007 13:54:03 +0000 Subject: [PATCH 066/231] Mentioning the wiki pages git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@50 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/home.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/home.php b/html/home.php index 7f7d27a..a3acf48 100644 --- a/html/home.php +++ b/html/home.php @@ -86,6 +86,11 @@ to use ddclient with your router, check the supported routers.

    +

    +We're currently working on a wiki version of this pages. You can find +them here. +

    +

    Debugging ddclient looks pretty hard but it isn't. First try to put \n". "as less as necessary in your configuration. Try to run \n". From 31e4f9c103e56e48ccb807d6ed8b84878a155bf1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 21 May 2007 15:38:42 +0000 Subject: [PATCH 067/231] Updated the link to the ubuntu forum git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@51 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/home.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/home.php b/html/home.php index a3acf48..4775e58 100644 --- a/html/home.php +++ b/html/home.php @@ -118,8 +118,8 @@ $text['menu'] = "Help"; $text['body'] = "

    -Please note: if you are using ubuntu, contact the ubuntu forum at -https://launchpad.net/ubuntu/+source/ddclient/+filebug since there are a few differences between ubuntu and the original ddclient +Please note: if you are using ubuntu, contact the ubuntu forum +since there are a few differences between ubuntu and the original ddclient

    If this doesn't help for you, maybe From 183df2a7eb8c54060ac15c54fd5a9e01797f5e11 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 May 2007 17:02:31 +0000 Subject: [PATCH 068/231] Changed nic_namecheap_update following the suggestion of edmdude on the forum (https://sourceforge.net/forum/message.php?msg_id=4316938) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@52 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index 033c3c6..3be02d6 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -3047,8 +3047,8 @@ sub nic_namecheap_update { my $url; $url = "http://$config{$h}{'server'}/update"; - $url .= "?host=$config{$h}{'login'}"; - $url .= "&domain=$h"; + $url .= "?host=$h"; + $url .= "&domain=$config{$h}{'login'}"; $url .= "&password=$config{$h}{'password'}"; $url .= "&ip="; $url .= $ip if $ip; From fa31265d6bd44f82af4cfe386d0e0a8cd81db1c4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 May 2007 17:02:31 +0000 Subject: [PATCH 069/231] Changed nic_namecheap_update following the suggestion of edmdude on the forum (https://sourceforge.net/forum/message.php?msg_id=4316938) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@52 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index 033c3c6..3be02d6 100755 --- a/ddclient +++ b/ddclient @@ -3047,8 +3047,8 @@ sub nic_namecheap_update { my $url; $url = "http://$config{$h}{'server'}/update"; - $url .= "?host=$config{$h}{'login'}"; - $url .= "&domain=$h"; + $url .= "?host=$h"; + $url .= "&domain=$config{$h}{'login'}"; $url .= "&password=$config{$h}{'password'}"; $url .= "&ip="; $url .= $ip if $ip; From b1f3e574e6a6cc329eb4c06b72356d0bd151459e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Jun 2007 21:34:45 +0000 Subject: [PATCH 070/231] Applied easydns.patch, patch 117054 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@53 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index 3be02d6..6455045 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -365,6 +365,11 @@ my %variables = ( 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + 'easydns-common-defaults' => { + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, 'dnspark-common-defaults' => { 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), @@ -437,6 +442,7 @@ my %services = ( 'variables' => merge( { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'easydns-common-defaults'}, $variables{'service-common-defaults'}, ), }, @@ -2773,14 +2779,14 @@ sub nic_easydns_update { info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); - #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' + #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' my $url; - $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; - $url .= "&host_id=$hosts"; + $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; + $url .= "hostname=$hosts"; $url .= "&myip="; $url .= $ip if $ip; - $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; + $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; if ($config{$h}{'mx'}) { $url .= "&mx=$config{$h}{'mx'}"; From e8ef4acf5e4c42cf0e51be07aa2cab26fdf72443 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Jun 2007 21:34:45 +0000 Subject: [PATCH 071/231] Applied easydns.patch, patch 117054 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@53 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ddclient b/ddclient index 3be02d6..6455045 100755 --- a/ddclient +++ b/ddclient @@ -365,6 +365,11 @@ my %variables = ( 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + 'easydns-common-defaults' => { + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, 'dnspark-common-defaults' => { 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), @@ -437,6 +442,7 @@ my %services = ( 'variables' => merge( { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'easydns-common-defaults'}, $variables{'service-common-defaults'}, ), }, @@ -2773,14 +2779,14 @@ sub nic_easydns_update { info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); - #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' + #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' my $url; - $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; - $url .= "&host_id=$hosts"; + $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; + $url .= "hostname=$hosts"; $url .= "&myip="; $url .= $ip if $ip; - $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; + $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; if ($config{$h}{'mx'}) { $url .= "&mx=$config{$h}{'mx'}"; From 68ab0f5d2541dfc0327d0f9d3bf9d95d4f5c28ea Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 12 Jun 2007 07:10:24 +0000 Subject: [PATCH 072/231] 3com-oc-remote812 patch by The_Beast via IRC: see patches/3com-oc-remote812.patch git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@54 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index 6455045..dec567c 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -162,7 +162,7 @@ my %builtinfw = ( '3com-oc-remote812' => { 'name' => '3com OfficeConnect Remote 812', 'url' => '/callEvent', - 'skip' => '.*IP address in use', + 'skip' => '.*LOCAL', }, 'e-tech' => { 'name' => 'E-tech Router', From 7d39485a756af193be1dfb0d9913ad565caf2098 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 12 Jun 2007 07:10:24 +0000 Subject: [PATCH 073/231] 3com-oc-remote812 patch by The_Beast via IRC: see patches/3com-oc-remote812.patch git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@54 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 6455045..dec567c 100755 --- a/ddclient +++ b/ddclient @@ -162,7 +162,7 @@ my %builtinfw = ( '3com-oc-remote812' => { 'name' => '3com OfficeConnect Remote 812', 'url' => '/callEvent', - 'skip' => '.*IP address in use', + 'skip' => '.*LOCAL', }, 'e-tech' => { 'name' => 'E-tech Router', From 027bd8df2998260814820cf789bb24246993dfe7 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 14 Jun 2007 06:31:37 +0000 Subject: [PATCH 074/231] Patches directory added git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@55 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/3com-oc-remote812.patch | 20 +++++++++++++ svn/patches/easydns.patch | 44 +++++++++++++++++++++++++++++ svn/patches/eurodns.patch | 7 +++++ 3 files changed, 71 insertions(+) create mode 100644 svn/patches/3com-oc-remote812.patch create mode 100644 svn/patches/easydns.patch create mode 100644 svn/patches/eurodns.patch diff --git a/svn/patches/3com-oc-remote812.patch b/svn/patches/3com-oc-remote812.patch new file mode 100644 index 0000000..46f744a --- /dev/null +++ b/svn/patches/3com-oc-remote812.patch @@ -0,0 +1,20 @@ +# +# patch created with `svn diff -r53 . > patches/3com-oc-remote812.patch` +# on Wed Jun 6 15:07:45 CEST 2007 +# applied on r53 +# +# This patch was send to me by The_Beast on IRC. +# +Index: ddclient +=================================================================== +--- ddclient (revision 53) ++++ ddclient (working copy) +@@ -162,7 +162,7 @@ + '3com-oc-remote812' => { + 'name' => '3com OfficeConnect Remote 812', + 'url' => '/callEvent', +- 'skip' => '.*IP address in use', ++ 'skip' => '.*LOCAL', + }, + 'e-tech' => { + 'name' => 'E-tech Router', diff --git a/svn/patches/easydns.patch b/svn/patches/easydns.patch new file mode 100644 index 0000000..7458fe4 --- /dev/null +++ b/svn/patches/easydns.patch @@ -0,0 +1,44 @@ +# +# patch from +# +--- ddclient 2004-11-24 17:23:56.000000000 +0100 ++++ ddclient.orig 2005-01-25 10:03:22.640483000 +0100 +@@ -257,6 +257,11 @@ + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, ++ 'easydns-common-defaults' => { ++ 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), ++ 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), ++ 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), ++ }, + 'dnspark-common-defaults' => { + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), +@@ -319,6 +324,7 @@ + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, ++ $variables{'easydns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, +@@ -2487,14 +2493,14 @@ + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + +- #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' ++ #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' + + my $url; +- $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; +- $url .= "&host_id=$hosts"; ++ $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; ++ $url .= "hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; +- $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; ++ $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; diff --git a/svn/patches/eurodns.patch b/svn/patches/eurodns.patch new file mode 100644 index 0000000..ced8da3 --- /dev/null +++ b/svn/patches/eurodns.patch @@ -0,0 +1,7 @@ +2252a2253,2254 +> #my $url = "http://$config{$h}{'server'}/nic/update?system="; +> +2253a2256,2258 +> if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { #hack for EuroDynDNS +> $url = "http://$config{$h}{'server'}/update/?system="; +> } From d2800e7d50f0cf574267ea1f18c81b94da29e7c0 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 14 Jun 2007 06:31:37 +0000 Subject: [PATCH 075/231] Patches directory added git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@55 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/3com-oc-remote812.patch | 20 +++++++++++++++ patches/easydns.patch | 44 +++++++++++++++++++++++++++++++++ patches/eurodns.patch | 7 ++++++ 3 files changed, 71 insertions(+) create mode 100644 patches/3com-oc-remote812.patch create mode 100644 patches/easydns.patch create mode 100644 patches/eurodns.patch diff --git a/patches/3com-oc-remote812.patch b/patches/3com-oc-remote812.patch new file mode 100644 index 0000000..46f744a --- /dev/null +++ b/patches/3com-oc-remote812.patch @@ -0,0 +1,20 @@ +# +# patch created with `svn diff -r53 . > patches/3com-oc-remote812.patch` +# on Wed Jun 6 15:07:45 CEST 2007 +# applied on r53 +# +# This patch was send to me by The_Beast on IRC. +# +Index: ddclient +=================================================================== +--- ddclient (revision 53) ++++ ddclient (working copy) +@@ -162,7 +162,7 @@ + '3com-oc-remote812' => { + 'name' => '3com OfficeConnect Remote 812', + 'url' => '/callEvent', +- 'skip' => '.*IP address in use', ++ 'skip' => '.*LOCAL', + }, + 'e-tech' => { + 'name' => 'E-tech Router', diff --git a/patches/easydns.patch b/patches/easydns.patch new file mode 100644 index 0000000..7458fe4 --- /dev/null +++ b/patches/easydns.patch @@ -0,0 +1,44 @@ +# +# patch from +# +--- ddclient 2004-11-24 17:23:56.000000000 +0100 ++++ ddclient.orig 2005-01-25 10:03:22.640483000 +0100 +@@ -257,6 +257,11 @@ + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, ++ 'easydns-common-defaults' => { ++ 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), ++ 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), ++ 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), ++ }, + 'dnspark-common-defaults' => { + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), +@@ -319,6 +324,7 @@ + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, ++ $variables{'easydns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, +@@ -2487,14 +2493,14 @@ + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + +- #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' ++ #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' + + my $url; +- $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; +- $url .= "&host_id=$hosts"; ++ $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; ++ $url .= "hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; +- $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; ++ $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; + + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; diff --git a/patches/eurodns.patch b/patches/eurodns.patch new file mode 100644 index 0000000..ced8da3 --- /dev/null +++ b/patches/eurodns.patch @@ -0,0 +1,7 @@ +2252a2253,2254 +> #my $url = "http://$config{$h}{'server'}/nic/update?system="; +> +2253a2256,2258 +> if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { #hack for EuroDynDNS +> $url = "http://$config{$h}{'server'}/update/?system="; +> } From ee766fccc241622d678293820963c5649202bdf1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 14 Jun 2007 06:36:34 +0000 Subject: [PATCH 076/231] Changed version number git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@57 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 40 +++++++++++++++++++++++++++++++++++++++- svn/ddclient | 2 +- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/svn/Changelog b/svn/Changelog index 017b7df..5d511f4 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -1,6 +1,44 @@ Changelog -3.7.2 +3.7.2 wimpunk + * Releasing 3.7.2 + +2007-02-21 wimpunk + + * [r43] Changelog, ddclient: Preventing unitialized values, check + https://sourceforge.net/forum/message.php?msg_id=4167772 + +2007-02-26 wimpunk + + * [r44] TODO: added a TODO list + +2007-05-19 wimpunk + + * [r46] ddclient: Removed the two empty lines at the end of + ddclient + * [r47] ddclient: Applied checked_ssl_load.diff from ubuntu + * [r48] ddclient: Cosmetic change about checkip + +2007-05-28 wimpunk + + * [r52] ddclient: Changed nic_namecheap_update following the + suggestion of edmdude on the forum + (https://sourceforge.net/forum/message.php?msg_id=4316938) + +2007-06-05 wimpunk + + * [r53] ddclient: Applied easydns.patch, patch 117054 + +2007-06-12 wimpunk + + * [r54] ddclient: 3com-oc-remote812 patch by The_Beast via IRC: see + patches/3com-oc-remote812.patch + +2007-06-14 wimpunk + + * [r55] patches, patches/3com-oc-remote812.patch, + patches/easydns.patch, patches/eurodns.patch: Patches directory + added 3.7.1 * URL of zoneedit has changed (see bug #1558483) diff --git a/svn/ddclient b/svn/ddclient index dec567c..f89a458 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -14,7 +14,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.1"; +my $version = "3.7.2"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From ff087571a86e33f08597d71f0d8a7e35b9a1e7c1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 14 Jun 2007 06:36:34 +0000 Subject: [PATCH 077/231] Changed version number git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@57 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 40 +++++++++++++++++++++++++++++++++++++++- ddclient | 2 +- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 017b7df..5d511f4 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,44 @@ Changelog -3.7.2 +3.7.2 wimpunk + * Releasing 3.7.2 + +2007-02-21 wimpunk + + * [r43] Changelog, ddclient: Preventing unitialized values, check + https://sourceforge.net/forum/message.php?msg_id=4167772 + +2007-02-26 wimpunk + + * [r44] TODO: added a TODO list + +2007-05-19 wimpunk + + * [r46] ddclient: Removed the two empty lines at the end of + ddclient + * [r47] ddclient: Applied checked_ssl_load.diff from ubuntu + * [r48] ddclient: Cosmetic change about checkip + +2007-05-28 wimpunk + + * [r52] ddclient: Changed nic_namecheap_update following the + suggestion of edmdude on the forum + (https://sourceforge.net/forum/message.php?msg_id=4316938) + +2007-06-05 wimpunk + + * [r53] ddclient: Applied easydns.patch, patch 117054 + +2007-06-12 wimpunk + + * [r54] ddclient: 3com-oc-remote812 patch by The_Beast via IRC: see + patches/3com-oc-remote812.patch + +2007-06-14 wimpunk + + * [r55] patches, patches/3com-oc-remote812.patch, + patches/easydns.patch, patches/eurodns.patch: Patches directory + added 3.7.1 * URL of zoneedit has changed (see bug #1558483) diff --git a/ddclient b/ddclient index dec567c..f89a458 100755 --- a/ddclient +++ b/ddclient @@ -14,7 +14,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.1"; +my $version = "3.7.2"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From 24dee446e150c0b29023ed03e6aae0ac4ecb515c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 4 Jul 2007 08:02:33 +0000 Subject: [PATCH 078/231] Adding some release documentation git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@59 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/release/readme.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 svn/release/readme.txt diff --git a/svn/release/readme.txt b/svn/release/readme.txt new file mode 100644 index 0000000..1753bc6 --- /dev/null +++ b/svn/release/readme.txt @@ -0,0 +1,36 @@ +This directory will contain anything related to releasing a new version of +ddclient. It will be a replacement for +http://ddclient.wiki.sourceforge.net/HowtoRelease + +Releasing files + +* tagging current version: see svn book +* svn copy https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.7.2 +* version nr aanpassen +* bz2 en gz file aanmaken +* ftp naar sf.net +* aanmaken release: + +Release Notes 3.6.5 2004-11-24 +ddclient-3.6.5.tar.bz2 33311 0 Any .bz2 +ddclient-3.6.5.tar.gz 35726 0 Any .gz + +* mail naar ddclient-support +* news updaten + + +* freshmeat updaten +* website bijtimmeren: versie nummer aanpassen +* [https://www.dyndns.com/developers/listings/3 dyndns update] + + +website + +* recentste routers +* postscript + + +rss feeds + +* see https://sourceforge.net/export/rss2_project.php?group_id=116817 + From 5276d3a801f0ba25a3c5202ab9d632c5dde02b1c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 4 Jul 2007 08:02:33 +0000 Subject: [PATCH 079/231] Adding some release documentation git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@59 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- release/readme.txt | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 release/readme.txt diff --git a/release/readme.txt b/release/readme.txt new file mode 100644 index 0000000..1753bc6 --- /dev/null +++ b/release/readme.txt @@ -0,0 +1,36 @@ +This directory will contain anything related to releasing a new version of +ddclient. It will be a replacement for +http://ddclient.wiki.sourceforge.net/HowtoRelease + +Releasing files + +* tagging current version: see svn book +* svn copy https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.7.2 +* version nr aanpassen +* bz2 en gz file aanmaken +* ftp naar sf.net +* aanmaken release: + +Release Notes 3.6.5 2004-11-24 +ddclient-3.6.5.tar.bz2 33311 0 Any .bz2 +ddclient-3.6.5.tar.gz 35726 0 Any .gz + +* mail naar ddclient-support +* news updaten + + +* freshmeat updaten +* website bijtimmeren: versie nummer aanpassen +* [https://www.dyndns.com/developers/listings/3 dyndns update] + + +website + +* recentste routers +* postscript + + +rss feeds + +* see https://sourceforge.net/export/rss2_project.php?group_id=116817 + From 2597d3863201d80a302a7bb20ee08304963092f0 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 7 Jul 2007 12:37:42 +0000 Subject: [PATCH 080/231] Reverted the patch from torsten. See [ 1749470 ] Bug in Script sample-etc_ppp_ip-up.local git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@60 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/sample-etc_ppp_ip-up.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/sample-etc_ppp_ip-up.local b/svn/sample-etc_ppp_ip-up.local index 6f11484..b7a9025 100644 --- a/svn/sample-etc_ppp_ip-up.local +++ b/svn/sample-etc_ppp_ip-up.local @@ -34,7 +34,7 @@ case "$IP" in ;; *) ( sleep 5 - ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 + ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 ) & ;; esac From 8927454256dd96ec1915aedbd29f22999b72f2d4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 7 Jul 2007 12:37:42 +0000 Subject: [PATCH 081/231] Reverted the patch from torsten. See [ 1749470 ] Bug in Script sample-etc_ppp_ip-up.local git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@60 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_ppp_ip-up.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample-etc_ppp_ip-up.local b/sample-etc_ppp_ip-up.local index 6f11484..b7a9025 100644 --- a/sample-etc_ppp_ip-up.local +++ b/sample-etc_ppp_ip-up.local @@ -34,7 +34,7 @@ case "$IP" in ;; *) ( sleep 5 - ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 + ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 ) & ;; esac From 728694e79542501bda7447d6026efac806714ca4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 07:26:28 +0000 Subject: [PATCH 082/231] Applied typo_namecheap_patch.diff send by Marco Rodrigues git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@61 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index f89a458..a82cf7d 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -3014,7 +3014,7 @@ o 'namecheap' The 'namecheap' protocol is used by DNS service offered by www.namecheap.com. -Configuration variables applicable to the 'easydns' protocol are: +Configuration variables applicable to the 'namecheap' protocol are: protocol=namecheap ## server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com login=service-login ## login name and password registered with the service From 3828b022d1b6f446e410048f8215d358afb7c753 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 07:26:28 +0000 Subject: [PATCH 083/231] Applied typo_namecheap_patch.diff send by Marco Rodrigues git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@61 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index f89a458..a82cf7d 100755 --- a/ddclient +++ b/ddclient @@ -3014,7 +3014,7 @@ o 'namecheap' The 'namecheap' protocol is used by DNS service offered by www.namecheap.com. -Configuration variables applicable to the 'easydns' protocol are: +Configuration variables applicable to the 'namecheap' protocol are: protocol=namecheap ## server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com login=service-login ## login name and password registered with the service From 0cb7275311f38b4aace49dc04aad3796e2bf63d4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 19:36:37 +0000 Subject: [PATCH 084/231] Added patches and applied regex_vlan.patch. See bug #1747337 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@62 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- svn/patches/create_patch.sh | 16 ++++++++++++++++ svn/patches/regex_vlan.patch | 18 ++++++++++++++++++ svn/patches/typo_namecheap_patch.diff.new | 18 ++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100755 svn/patches/create_patch.sh create mode 100644 svn/patches/regex_vlan.patch create mode 100644 svn/patches/typo_namecheap_patch.diff.new diff --git a/svn/ddclient b/svn/ddclient index a82cf7d..1910ea5 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -1601,7 +1601,7 @@ sub check_value { return undef if $value eq ""; } elsif ($type eq T_IF) { - return undef if $value !~ /^[a-z0-9:_-]+$/; + return undef if $value !~ /^[a-z0-9:._-]+$/; } elsif ($type eq T_PROG) { return undef if $value eq ""; diff --git a/svn/patches/create_patch.sh b/svn/patches/create_patch.sh new file mode 100755 index 0000000..1661ac2 --- /dev/null +++ b/svn/patches/create_patch.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# whichlist +# * add getopt +# * automatic version + +{ +cat < patches/$2\` +# on $(date) +# applied on r$1 +# +EOF +svn diff -r$1 ddclient +} > patches/$2.new + diff --git a/svn/patches/regex_vlan.patch b/svn/patches/regex_vlan.patch new file mode 100644 index 0000000..1462808 --- /dev/null +++ b/svn/patches/regex_vlan.patch @@ -0,0 +1,18 @@ +# +# patch created with `svn diff -r61 . > patches/regex_vlan.patch` +# on Tue Jul 10 21:29:49 CEST 2007 +# applied on r61 +# +Index: ddclient +=================================================================== +--- ddclient (revision 61) ++++ ddclient (working copy) +@@ -1601,7 +1601,7 @@ + return undef if $value eq ""; + + } elsif ($type eq T_IF) { +- return undef if $value !~ /^[a-z0-9:_-]+$/; ++ return undef if $value !~ /^[a-z0-9:._-]+$/; + + } elsif ($type eq T_PROG) { + return undef if $value eq ""; diff --git a/svn/patches/typo_namecheap_patch.diff.new b/svn/patches/typo_namecheap_patch.diff.new new file mode 100644 index 0000000..53704f8 --- /dev/null +++ b/svn/patches/typo_namecheap_patch.diff.new @@ -0,0 +1,18 @@ +# +# patch created with `svn diff -r57 . > patches/typo_namecheap_patch.diff` +# on Tue Jul 10 09:25:19 CEST 2007 +# applied on r57 +# +Index: ddclient +=================================================================== +--- ddclient (revision 59) ++++ ddclient (working copy) +@@ -3014,7 +3014,7 @@ + + The 'namecheap' protocol is used by DNS service offered by www.namecheap.com. + +-Configuration variables applicable to the 'easydns' protocol are: ++Configuration variables applicable to the 'namecheap' protocol are: + protocol=namecheap ## + server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com + login=service-login ## login name and password registered with the service From 6a8ad8f878daec87e4d6185ccc89f115e86129b3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 19:36:37 +0000 Subject: [PATCH 085/231] Added patches and applied regex_vlan.patch. See bug #1747337 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@62 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- patches/create_patch.sh | 16 ++++++++++++++++ patches/regex_vlan.patch | 18 ++++++++++++++++++ patches/typo_namecheap_patch.diff.new | 18 ++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100755 patches/create_patch.sh create mode 100644 patches/regex_vlan.patch create mode 100644 patches/typo_namecheap_patch.diff.new diff --git a/ddclient b/ddclient index a82cf7d..1910ea5 100755 --- a/ddclient +++ b/ddclient @@ -1601,7 +1601,7 @@ sub check_value { return undef if $value eq ""; } elsif ($type eq T_IF) { - return undef if $value !~ /^[a-z0-9:_-]+$/; + return undef if $value !~ /^[a-z0-9:._-]+$/; } elsif ($type eq T_PROG) { return undef if $value eq ""; diff --git a/patches/create_patch.sh b/patches/create_patch.sh new file mode 100755 index 0000000..1661ac2 --- /dev/null +++ b/patches/create_patch.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# whichlist +# * add getopt +# * automatic version + +{ +cat < patches/$2\` +# on $(date) +# applied on r$1 +# +EOF +svn diff -r$1 ddclient +} > patches/$2.new + diff --git a/patches/regex_vlan.patch b/patches/regex_vlan.patch new file mode 100644 index 0000000..1462808 --- /dev/null +++ b/patches/regex_vlan.patch @@ -0,0 +1,18 @@ +# +# patch created with `svn diff -r61 . > patches/regex_vlan.patch` +# on Tue Jul 10 21:29:49 CEST 2007 +# applied on r61 +# +Index: ddclient +=================================================================== +--- ddclient (revision 61) ++++ ddclient (working copy) +@@ -1601,7 +1601,7 @@ + return undef if $value eq ""; + + } elsif ($type eq T_IF) { +- return undef if $value !~ /^[a-z0-9:_-]+$/; ++ return undef if $value !~ /^[a-z0-9:._-]+$/; + + } elsif ($type eq T_PROG) { + return undef if $value eq ""; diff --git a/patches/typo_namecheap_patch.diff.new b/patches/typo_namecheap_patch.diff.new new file mode 100644 index 0000000..53704f8 --- /dev/null +++ b/patches/typo_namecheap_patch.diff.new @@ -0,0 +1,18 @@ +# +# patch created with `svn diff -r57 . > patches/typo_namecheap_patch.diff` +# on Tue Jul 10 09:25:19 CEST 2007 +# applied on r57 +# +Index: ddclient +=================================================================== +--- ddclient (revision 59) ++++ ddclient (working copy) +@@ -3014,7 +3014,7 @@ + + The 'namecheap' protocol is used by DNS service offered by www.namecheap.com. + +-Configuration variables applicable to the 'easydns' protocol are: ++Configuration variables applicable to the 'namecheap' protocol are: + protocol=namecheap ## + server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com + login=service-login ## login name and password registered with the service From 85c4821628d95cffc98fb861cd922278b591957a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 19:56:19 +0000 Subject: [PATCH 086/231] Added extra comments to the patch. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@63 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/regex_vlan.patch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/svn/patches/regex_vlan.patch b/svn/patches/regex_vlan.patch index 1462808..e063768 100644 --- a/svn/patches/regex_vlan.patch +++ b/svn/patches/regex_vlan.patch @@ -2,6 +2,11 @@ # patch created with `svn diff -r61 . > patches/regex_vlan.patch` # on Tue Jul 10 21:29:49 CEST 2007 # applied on r61 +# +# bug originally reported on ubuntu: +# https://bugs.edge.launchpad.net/ubuntu/+source/ddclient/+bug/77570 +# posted upstream as bug #1747337 +# patch written by marclogghe # Index: ddclient =================================================================== From cf0fa41393e9d968dde805458053530a802141a9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 19:56:19 +0000 Subject: [PATCH 087/231] Added extra comments to the patch. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@63 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/regex_vlan.patch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/patches/regex_vlan.patch b/patches/regex_vlan.patch index 1462808..e063768 100644 --- a/patches/regex_vlan.patch +++ b/patches/regex_vlan.patch @@ -2,6 +2,11 @@ # patch created with `svn diff -r61 . > patches/regex_vlan.patch` # on Tue Jul 10 21:29:49 CEST 2007 # applied on r61 +# +# bug originally reported on ubuntu: +# https://bugs.edge.launchpad.net/ubuntu/+source/ddclient/+bug/77570 +# posted upstream as bug #1747337 +# patch written by marclogghe # Index: ddclient =================================================================== From e913a475a58ab40aed1dddef7d59d4a3cb120a98 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 20:04:28 +0000 Subject: [PATCH 088/231] Added website to ddclient comments git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@64 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svn/ddclient b/svn/ddclient index 1910ea5..7355785 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -7,6 +7,9 @@ # # Author: Paul Burry (paul+ddclient@burry.ca) # ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817 +# +# website: http://ddclient.sf.net +# ###################################################################### require 5.004; use strict; From 5c8edddbd6096bfb3ab4efe531c13d5d40d8cffd Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 20:04:28 +0000 Subject: [PATCH 089/231] Added website to ddclient comments git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@64 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ddclient b/ddclient index 1910ea5..7355785 100755 --- a/ddclient +++ b/ddclient @@ -7,6 +7,9 @@ # # Author: Paul Burry (paul+ddclient@burry.ca) # ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817 +# +# website: http://ddclient.sf.net +# ###################################################################### require 5.004; use strict; From 217d1ca8257678c35f18f41a7326c98828508b16 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 21:04:00 +0000 Subject: [PATCH 090/231] signature modified git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@65 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index 7355785..5d328fd 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -546,7 +546,7 @@ my @opt = ( nic_examples(), "$program version $version, ", " originally written by Paul Burry, paul+ddclient\@burry.ca", - " maintained by WimPunk" + " project now maintained on http://ddclient.sourceforge.net" ); ## process args From 9029bdb00d283397eb4c98a3bdce07b676db577e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 10 Jul 2007 21:04:00 +0000 Subject: [PATCH 091/231] signature modified git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@65 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 7355785..5d328fd 100755 --- a/ddclient +++ b/ddclient @@ -546,7 +546,7 @@ my @opt = ( nic_examples(), "$program version $version, ", " originally written by Paul Burry, paul+ddclient\@burry.ca", - " maintained by WimPunk" + " project now maintained on http://ddclient.sourceforge.net" ); ## process args From 55cf02920bd56670e55795f8782cebb3d4c5a855 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 12 Jul 2007 20:12:37 +0000 Subject: [PATCH 092/231] Partial applied readme.patch. See tracker #1752931 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@66 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/README | 4 ++-- svn/patches/readme.patch | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 svn/patches/readme.patch diff --git a/svn/README b/svn/README index f70e0c9..e8effd3 100644 --- a/svn/README +++ b/svn/README @@ -18,7 +18,7 @@ IMPORTANT: The installation location for the ddclient script has changed from Dynamic DNS services currently supported include: -DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. +DynDNS.com - See http://www.dyndns.com 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. @@ -34,7 +34,7 @@ Comments, suggestions and requests: use the forums on http://sourceforge.net/projects/ddclient/ 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. +through sourceforge.net. Please check out http://ddclient.sf.net ------------------------------------------------------------------------------- REQUIREMENTS: diff --git a/svn/patches/readme.patch b/svn/patches/readme.patch new file mode 100644 index 0000000..d37c4a8 --- /dev/null +++ b/svn/patches/readme.patch @@ -0,0 +1,24 @@ +# +# patch sumitted by Kmos +# See tracker #1752931 +# +--- README.orig 2007-07-09 23:50:01.000000000 +0100 ++++ README 2007-07-12 20:50:28.000000000 +0100 +@@ -18,7 +16,7 @@ + + Dynamic DNS services currently supported include: + +-DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. ++DynDNS.com - See http://www.dyndns.com 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. +@@ -34,7 +32,7 @@ + http://sourceforge.net/projects/ddclient/ + + 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. ++through sourceforge.net. Please check out http://ddclient.sf.net + + ------------------------------------------------------------------------------- + REQUIREMENTS: From 47692944c8beed0360cc0d2720d0919de5b926c3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 12 Jul 2007 20:12:37 +0000 Subject: [PATCH 093/231] Partial applied readme.patch. See tracker #1752931 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@66 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README | 4 ++-- patches/readme.patch | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 patches/readme.patch diff --git a/README b/README index f70e0c9..e8effd3 100644 --- a/README +++ b/README @@ -18,7 +18,7 @@ IMPORTANT: The installation location for the ddclient script has changed from Dynamic DNS services currently supported include: -DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. +DynDNS.com - See http://www.dyndns.com 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. @@ -34,7 +34,7 @@ Comments, suggestions and requests: use the forums on http://sourceforge.net/projects/ddclient/ 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. +through sourceforge.net. Please check out http://ddclient.sf.net ------------------------------------------------------------------------------- REQUIREMENTS: diff --git a/patches/readme.patch b/patches/readme.patch new file mode 100644 index 0000000..d37c4a8 --- /dev/null +++ b/patches/readme.patch @@ -0,0 +1,24 @@ +# +# patch sumitted by Kmos +# See tracker #1752931 +# +--- README.orig 2007-07-09 23:50:01.000000000 +0100 ++++ README 2007-07-12 20:50:28.000000000 +0100 +@@ -18,7 +16,7 @@ + + Dynamic DNS services currently supported include: + +-DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. ++DynDNS.com - See http://www.dyndns.com 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. +@@ -34,7 +32,7 @@ + http://sourceforge.net/projects/ddclient/ + + 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. ++through sourceforge.net. Please check out http://ddclient.sf.net + + ------------------------------------------------------------------------------- + REQUIREMENTS: From 962dc85e1b33ea0de9ebb2e29b4b7e27058ca984 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 12 Jul 2007 20:19:51 +0000 Subject: [PATCH 094/231] Run dos2unix on readme and it's patch which Marco Rodrigues submitted. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@67 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/README | 2 +- svn/patches/readme.patch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/svn/README b/svn/README index e8effd3..d13ad61 100644 --- a/svn/README +++ b/svn/README @@ -18,7 +18,7 @@ IMPORTANT: The installation location for the ddclient script has changed from Dynamic DNS services currently supported include: -DynDNS.com - See http://www.dyndns.com for details on obtaining a free account. +DynDNS.com - See http://www.dyndns.com 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. diff --git a/svn/patches/readme.patch b/svn/patches/readme.patch index d37c4a8..812cad4 100644 --- a/svn/patches/readme.patch +++ b/svn/patches/readme.patch @@ -1,5 +1,5 @@ # -# patch sumitted by Kmos +# patch submitted by Kmos # See tracker #1752931 # --- README.orig 2007-07-09 23:50:01.000000000 +0100 @@ -9,7 +9,7 @@ Dynamic DNS services currently supported include: -DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. -+DynDNS.com - See http://www.dyndns.com for details on obtaining a free account. ++DynDNS.com - See http://www.dyndns.com 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. @@ -18,7 +18,7 @@ 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. -+through sourceforge.net. Please check out http://ddclient.sf.net ++through sourceforge.net. Please check out http://ddclient.sf.net ------------------------------------------------------------------------------- REQUIREMENTS: From f6a7831c59bf92f05f6b1fac5e5f551865a338f8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 12 Jul 2007 20:19:51 +0000 Subject: [PATCH 095/231] Run dos2unix on readme and it's patch which Marco Rodrigues submitted. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@67 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README | 2 +- patches/readme.patch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index e8effd3..d13ad61 100644 --- a/README +++ b/README @@ -18,7 +18,7 @@ IMPORTANT: The installation location for the ddclient script has changed from Dynamic DNS services currently supported include: -DynDNS.com - See http://www.dyndns.com for details on obtaining a free account. +DynDNS.com - See http://www.dyndns.com 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. diff --git a/patches/readme.patch b/patches/readme.patch index d37c4a8..812cad4 100644 --- a/patches/readme.patch +++ b/patches/readme.patch @@ -1,5 +1,5 @@ # -# patch sumitted by Kmos +# patch submitted by Kmos # See tracker #1752931 # --- README.orig 2007-07-09 23:50:01.000000000 +0100 @@ -9,7 +9,7 @@ Dynamic DNS services currently supported include: -DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. -+DynDNS.com - See http://www.dyndns.com for details on obtaining a free account. ++DynDNS.com - See http://www.dyndns.com 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. @@ -18,7 +18,7 @@ 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. -+through sourceforge.net. Please check out http://ddclient.sf.net ++through sourceforge.net. Please check out http://ddclient.sf.net ------------------------------------------------------------------------------- REQUIREMENTS: From ad4578a3e0a2e2aa0af303203035675936fbb7bf Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 29 Jul 2007 19:07:49 +0000 Subject: [PATCH 096/231] Added url to feature request dyndns git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@68 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/TODO | 1 + 1 file changed, 1 insertion(+) diff --git a/svn/TODO b/svn/TODO index ac78cb8..adf5ed6 100644 --- a/svn/TODO +++ b/svn/TODO @@ -9,3 +9,4 @@ or at work... * add doc postscript * FAQ: bad hostname (checkip) * note about init-scripts. +* request from dyndns: http://tinyurl.com/2l3twf From d58f40b5c31b2daad8dca49c89a8547205090251 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 29 Jul 2007 19:07:49 +0000 Subject: [PATCH 097/231] Added url to feature request dyndns git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@68 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- TODO | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO b/TODO index ac78cb8..adf5ed6 100644 --- a/TODO +++ b/TODO @@ -9,3 +9,4 @@ or at work... * add doc postscript * FAQ: bad hostname (checkip) * note about init-scripts. +* request from dyndns: http://tinyurl.com/2l3twf From 2863dd459de3a116140d7b48f8ac647c915e8470 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 07:11:22 +0000 Subject: [PATCH 098/231] Added debian and ubuntu patches git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@69 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/debianpatches/abuse_msg.diff | 14 ++ svn/patches/debianpatches/cachedir.diff | 22 +++ svn/patches/debianpatches/cisco_fw.diff | 14 ++ svn/patches/debianpatches/config_path.diff | 14 ++ svn/patches/debianpatches/daemon_check.diff | 16 ++ .../debianpatches/daemon_interval.diff | 14 ++ .../debianpatches/help_nonroot(2).diff | 46 ++++++ svn/patches/debianpatches/help_nonroot.diff | 46 ++++++ .../debianpatches/ip-up_run-parts.diff | 14 ++ svn/patches/debianpatches/maxinterval.diff | 14 ++ svn/patches/debianpatches/readme.txt | 24 +++ svn/patches/debianpatches/sample_path.diff | 26 ++++ .../debianpatches/smc-barricade-7401bra.patch | 23 +++ .../debianpatches/smc-barricade-fw-alt.diff | 17 +++ .../debianpatches/update-new-config.patch | 22 +++ svn/patches/ubuntu/checked_ssl_load.diff | 34 +++++ svn/patches/ubuntu/config_path.diff | 11 ++ svn/patches/ubuntu/daemon_interval.diff | 11 ++ svn/patches/ubuntu/dyndns_com.diff | 144 ++++++++++++++++++ svn/patches/ubuntu/sample_ubuntu.diff | 11 ++ svn/patches/ubuntu/series | 6 + svn/patches/ubuntu/smc-barricade-fw-alt.diff | 14 ++ 22 files changed, 557 insertions(+) create mode 100644 svn/patches/debianpatches/abuse_msg.diff create mode 100644 svn/patches/debianpatches/cachedir.diff create mode 100644 svn/patches/debianpatches/cisco_fw.diff create mode 100644 svn/patches/debianpatches/config_path.diff create mode 100644 svn/patches/debianpatches/daemon_check.diff create mode 100644 svn/patches/debianpatches/daemon_interval.diff create mode 100644 svn/patches/debianpatches/help_nonroot(2).diff create mode 100644 svn/patches/debianpatches/help_nonroot.diff create mode 100644 svn/patches/debianpatches/ip-up_run-parts.diff create mode 100644 svn/patches/debianpatches/maxinterval.diff create mode 100644 svn/patches/debianpatches/readme.txt create mode 100644 svn/patches/debianpatches/sample_path.diff create mode 100644 svn/patches/debianpatches/smc-barricade-7401bra.patch create mode 100644 svn/patches/debianpatches/smc-barricade-fw-alt.diff create mode 100644 svn/patches/debianpatches/update-new-config.patch create mode 100644 svn/patches/ubuntu/checked_ssl_load.diff create mode 100644 svn/patches/ubuntu/config_path.diff create mode 100644 svn/patches/ubuntu/daemon_interval.diff create mode 100644 svn/patches/ubuntu/dyndns_com.diff create mode 100644 svn/patches/ubuntu/sample_ubuntu.diff create mode 100644 svn/patches/ubuntu/series create mode 100644 svn/patches/ubuntu/smc-barricade-fw-alt.diff diff --git a/svn/patches/debianpatches/abuse_msg.diff b/svn/patches/debianpatches/abuse_msg.diff new file mode 100644 index 0000000..ce1f746 --- /dev/null +++ b/svn/patches/debianpatches/abuse_msg.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.043910433 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:59.469182565 +0100 +@@ -2231,7 +2231,7 @@ + '!yours' => 'The hostname specified exists, but not under the username currently being used', + '!donator' => 'The offline setting was set, when the user is not a donator', + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', +- 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', ++ 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', + + 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + diff --git a/svn/patches/debianpatches/cachedir.diff b/svn/patches/debianpatches/cachedir.diff new file mode 100644 index 0000000..3134537 --- /dev/null +++ b/svn/patches/debianpatches/cachedir.diff @@ -0,0 +1,22 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-06-14 22:03:52.000000000 +0200 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:19.748088891 +0100 +@@ -22,6 +22,7 @@ + my $now = time; + my $hostname = hostname(); + my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; ++my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; + my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; + my $msgs = ''; + my $last_msgs = ''; +@@ -296,7 +297,7 @@ + 'global-defaults' => { + 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), + 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), +- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), ++ 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), + 'pid' => setv(T_FILE, 0, 0, 1, "", undef), + 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), + 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), + diff --git a/svn/patches/debianpatches/cisco_fw.diff b/svn/patches/debianpatches/cisco_fw.diff new file mode 100644 index 0000000..6772535 --- /dev/null +++ b/svn/patches/debianpatches/cisco_fw.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.121898536 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:41.551915957 +0100 +@@ -1823,7 +1823,7 @@ + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + +- $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; ++ $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + $arg = $url; + + diff --git a/svn/patches/debianpatches/config_path.diff b/svn/patches/debianpatches/config_path.diff new file mode 100644 index 0000000..b59effb --- /dev/null +++ b/svn/patches/debianpatches/config_path.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.151893960 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:22:37.171890909 +0100 +@@ -21,7 +21,7 @@ + $program =~ s/d$//; + my $now = time; + my $hostname = hostname(); +-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; ++my $etc = ($program =~ /test/i) ? './' : '/etc/'; + my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; + my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; + my $msgs = ''; + diff --git a/svn/patches/debianpatches/daemon_check.diff b/svn/patches/debianpatches/daemon_check.diff new file mode 100644 index 0000000..75699d8 --- /dev/null +++ b/svn/patches/debianpatches/daemon_check.diff @@ -0,0 +1,16 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.023913484 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:03.977494794 +0100 +@@ -993,8 +993,8 @@ + + $opt{'timeout'} = 0 if opt('timeout') < 0; + $opt{'daemon'} = minimum('daemon') +- if define($opt{'daemon'},$globals{'daemon'},0) +- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); ++ if interval(define($opt{'daemon'},$globals{'daemon'},0)) ++ && interval(define($opt{'daemon'},$globals{'daemon'})) < minimum('daemon'); + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { + diff --git a/svn/patches/debianpatches/daemon_interval.diff b/svn/patches/debianpatches/daemon_interval.diff new file mode 100644 index 0000000..91f0648 --- /dev/null +++ b/svn/patches/debianpatches/daemon_interval.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:36.919929347 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:15.960666685 +0100 +@@ -966,6 +966,8 @@ + sub init_config { + %opt = %saved_opt; + ++ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; ++ + ## + $opt{'quiet'} = 0 if opt('verbose'); + + diff --git a/svn/patches/debianpatches/help_nonroot(2).diff b/svn/patches/debianpatches/help_nonroot(2).diff new file mode 100644 index 0000000..3056836 --- /dev/null +++ b/svn/patches/debianpatches/help_nonroot(2).diff @@ -0,0 +1,46 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 +@@ -553,6 +553,12 @@ + + test_geturl(opt('geturl')) if opt('geturl'); + ++## process help option ++if (opt('help')) { ++ *STDERR = *STDOUT; ++ usage(0); ++} ++ + ## read config file because 'daemon' mode may be defined there. + read_config(define($opt{'file'}, default('file')), \%config, \%globals); + init_config(); +@@ -1109,16 +1115,14 @@ + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } +- if (opt('help')) { +- *STDERR = *STDOUT; +- usage(); +- } + } + + ###################################################################### + ## usage + ###################################################################### + sub usage { ++ my $exitcode = 1; ++ $exitcode = shift if @_ != 0; # use first arg if given + my $msg = ''; + if (@_) { + my $format = shift; +@@ -1128,7 +1132,7 @@ + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); +- exit 1; ++ exit $exitcode; + } + + ###################################################################### + diff --git a/svn/patches/debianpatches/help_nonroot.diff b/svn/patches/debianpatches/help_nonroot.diff new file mode 100644 index 0000000..3056836 --- /dev/null +++ b/svn/patches/debianpatches/help_nonroot.diff @@ -0,0 +1,46 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 +@@ -553,6 +553,12 @@ + + test_geturl(opt('geturl')) if opt('geturl'); + ++## process help option ++if (opt('help')) { ++ *STDERR = *STDOUT; ++ usage(0); ++} ++ + ## read config file because 'daemon' mode may be defined there. + read_config(define($opt{'file'}, default('file')), \%config, \%globals); + init_config(); +@@ -1109,16 +1115,14 @@ + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } +- if (opt('help')) { +- *STDERR = *STDOUT; +- usage(); +- } + } + + ###################################################################### + ## usage + ###################################################################### + sub usage { ++ my $exitcode = 1; ++ $exitcode = shift if @_ != 0; # use first arg if given + my $msg = ''; + if (@_) { + my $format = shift; +@@ -1128,7 +1132,7 @@ + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); +- exit 1; ++ exit $exitcode; + } + + ###################################################################### + diff --git a/svn/patches/debianpatches/ip-up_run-parts.diff b/svn/patches/debianpatches/ip-up_run-parts.diff new file mode 100644 index 0000000..2a504d9 --- /dev/null +++ b/svn/patches/debianpatches/ip-up_run-parts.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/sample-etc_ppp_ip-up.local +=================================================================== +--- ddclient-3.7.0.orig/sample-etc_ppp_ip-up.local 2006-06-14 21:59:40.000000000 +0200 ++++ ddclient-3.7.0/sample-etc_ppp_ip-up.local 2006-12-01 23:22:37.101901586 +0100 +@@ -34,7 +34,7 @@ + ;; + *) ( + sleep 5 +- ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 ++ ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 + ) & + ;; + esac + diff --git a/svn/patches/debianpatches/maxinterval.diff b/svn/patches/debianpatches/maxinterval.diff new file mode 100644 index 0000000..b245c9d --- /dev/null +++ b/svn/patches/debianpatches/maxinterval.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.062907535 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:53.543086628 +0100 +@@ -357,7 +357,7 @@ + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), +- 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), ++ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + diff --git a/svn/patches/debianpatches/readme.txt b/svn/patches/debianpatches/readme.txt new file mode 100644 index 0000000..cbd54f5 --- /dev/null +++ b/svn/patches/debianpatches/readme.txt @@ -0,0 +1,24 @@ +(submitted by Torsten) + +cisco_fw.diff +config_path.diff +daemon_check.diff +daemon_interval.diff +maxinterval.diff +sample_path.diff +smc-barricade-7401bra.patch +smc-barricade-fw-alt.diff +update-new-config.patch + +cisco_fw.diff: Not sure what this change was about, have to check my + change log. +daemon_check.diff: Changes interpretation of the daemon parameter + to interval (to allow 5m for minutes etc.) when checking for min + value. +daemon_interval.diff: Changes interpretation of daemon interval during + input (now that I look at this, those two could probably be merged). + maxinterval.diff: Increase max interval for updates. + sample_path.diff: Adjust path in stamples. + update-new-config.patch: Force update if config has changed (still + needed?) + smc-*: Support for two more routers. diff --git a/svn/patches/debianpatches/sample_path.diff b/svn/patches/debianpatches/sample_path.diff new file mode 100644 index 0000000..2bfb485 --- /dev/null +++ b/svn/patches/debianpatches/sample_path.diff @@ -0,0 +1,26 @@ +Index: ddclient-3.6.2/sample-etc_cron.d_ddclient +=================================================================== +--- ddclient-3.6.2.orig/sample-etc_cron.d_ddclient 2002-01-04 00:56:34.000000000 +0100 ++++ ddclient-3.6.2/sample-etc_cron.d_ddclient 2005-10-18 23:41:12.000000000 +0200 +@@ -10,7 +10,7 @@ + ###################################################################### + ## force an update twice a month + ## +-30 23 1,15 * * root /root/bin/ddclient -daemon=0 -syslog -quiet -force ++30 23 1,15 * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet -force + ###################################################################### + ## retry failed updates every hour (only if you are not using daemon-mode) + ## +Index: ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe +=================================================================== +--- ddclient-3.6.2.orig/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:40:22.000000000 +0200 ++++ ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:41:02.000000000 +0200 +@@ -15,6 +15,6 @@ + 192.168.*) ;; + *) + logger -t dhcpcd IP address changed to $1 +- /root/bin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 ++ /usr/sbin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 + ;; + esac + diff --git a/svn/patches/debianpatches/smc-barricade-7401bra.patch b/svn/patches/debianpatches/smc-barricade-7401bra.patch new file mode 100644 index 0000000..aadfec5 --- /dev/null +++ b/svn/patches/debianpatches/smc-barricade-7401bra.patch @@ -0,0 +1,23 @@ +Add support for SMC7401BRA: + +ddclient support several kind of firewall to retrieve IP address, two of +them are smc-barricade and smc-barricade-alt, but these both doesn't +work with an SMC7401BRA. + +Index: ddclient +=================================================================== +--- ddclient.orig 2006-12-01 23:22:36.958923399 +0100 ++++ ddclient 2006-12-01 23:25:09.796607052 +0100 +@@ -73,6 +73,11 @@ + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, ++ 'smc-barricade-7401bra' => { ++ 'name' => 'SMC Barricade 7401BRA FW', ++ 'url' => '/admin/wan1.htm', ++ 'skip' => 'IP Address', ++ }, + 'netgear-rt3xx' => { + 'name' => 'Netgear FW', + 'url' => '/mtenSysStatus.html', + diff --git a/svn/patches/debianpatches/smc-barricade-fw-alt.diff b/svn/patches/debianpatches/smc-barricade-fw-alt.diff new file mode 100644 index 0000000..c42637e --- /dev/null +++ b/svn/patches/debianpatches/smc-barricade-fw-alt.diff @@ -0,0 +1,17 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.003916535 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:06.131166238 +0100 +@@ -73,6 +73,11 @@ + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, ++ 'smc-barricade-alt' => { ++ 'name' => 'SMC Barricade FW (alternate config)', ++ 'url' => '/status.HTM', ++ 'skip' => 'WAN IP', ++ }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', + diff --git a/svn/patches/debianpatches/update-new-config.patch b/svn/patches/debianpatches/update-new-config.patch new file mode 100644 index 0000000..4dd6240 --- /dev/null +++ b/svn/patches/debianpatches/update-new-config.patch @@ -0,0 +1,22 @@ +ddclient did not update the dynamic DNS entry if the config changes. +This patch by Frans Pop to fixes this problem reported as Debian bug +#217041. +Index: ddclient +=================================================================== +--- ddclient.orig 2006-12-01 23:22:36.938926449 +0100 ++++ ddclient 2006-12-01 23:25:12.987120319 +0100 +@@ -1998,6 +1998,13 @@ + } elsif (defined($sub) && &$sub($host)) { + $update = 1; + ++ } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || ++ ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || ++ ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || ++ ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { ++ info("updating %s because host settings have been changed.", $host); ++ $update = 1; ++ + } else { + success("%s: skipped: IP address was already set to %s.", $host, $ip) + if opt('verbose'); + diff --git a/svn/patches/ubuntu/checked_ssl_load.diff b/svn/patches/ubuntu/checked_ssl_load.diff new file mode 100644 index 0000000..305ffb6 --- /dev/null +++ b/svn/patches/ubuntu/checked_ssl_load.diff @@ -0,0 +1,34 @@ +--- ddclient-3.7.1/ddclient.orig 2007-05-03 23:24:39.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-05-03 23:27:44.000000000 +0100 +@@ -1635,6 +1642,20 @@ + $res; + } + ###################################################################### ++## load_ssl_support ++###################################################################### ++sub load_ssl_support { ++ my $ssl_loaded = eval {require IO::Socket::SSL}; ++ unless ($ssl_loaded) { ++ fatal(<<"EOM"); ++Error loading the Perl module IO::Socket::SSL needed for SSL connect. ++On Debian, the package libio-socket-ssl-perl must be installed. ++EOM ++ } ++ import IO::Socket::SSL; ++ { no warnings; $IO::Socket::SSL::DEBUG = 0; } ++} ++###################################################################### + ## geturl + ###################################################################### + sub geturl { +@@ -1663,9 +1684,7 @@ + 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; } ++ load_ssl_support; + } else { + $use_ssl = 0; + $default_port = 80; diff --git a/svn/patches/ubuntu/config_path.diff b/svn/patches/ubuntu/config_path.diff new file mode 100644 index 0000000..3908302 --- /dev/null +++ b/svn/patches/ubuntu/config_path.diff @@ -0,0 +1,11 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-28 14:31:23.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-04-28 14:31:33.000000000 +0100 +@@ -21,7 +21,7 @@ + $program =~ s/d$//; + my $now = time; + my $hostname = hostname(); +-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; ++my $etc = ($program =~ /test/i) ? './' : '/etc/'; + my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; + my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; + my $msgs = ''; diff --git a/svn/patches/ubuntu/daemon_interval.diff b/svn/patches/ubuntu/daemon_interval.diff new file mode 100644 index 0000000..d997b32 --- /dev/null +++ b/svn/patches/ubuntu/daemon_interval.diff @@ -0,0 +1,11 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-28 20:43:53.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-04-28 20:42:57.000000000 +0100 +@@ -977,6 +977,8 @@ + sub init_config { + %opt = %saved_opt; + ++ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; ++ + ## + $opt{'quiet'} = 0 if opt('verbose'); + diff --git a/svn/patches/ubuntu/dyndns_com.diff b/svn/patches/ubuntu/dyndns_com.diff new file mode 100644 index 0000000..c66ce6c --- /dev/null +++ b/svn/patches/ubuntu/dyndns_com.diff @@ -0,0 +1,144 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-30 00:40:49.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-04-30 00:40:59.000000000 +0100 +@@ -54,7 +54,7 @@ + + ## strategies for obtaining an ip address. + my %builtinweb = ( +- 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, ++ 'dyndns' => { 'url' => 'http://checkip.dyndns.com/', 'skip' => 'Current IP Address:', }, + 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, + ); + my %builtinfw = ( +@@ -342,7 +342,7 @@ + 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), + }, + 'service-common-defaults' => { +- 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), ++ 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.com', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), +@@ -1915,7 +1915,7 @@ + For example: + protocol=hammernode1, \\ + login=my-hn-login, password=my-hn-password myhost.hn.org +- login=my-login, password=my-password myhost.dyndns.org,my2nd.dyndns.org ++ login=my-login, password=my-password myhost.dyndns.com,my2nd.dyndns.com + + specifies two host definitions. + +@@ -1925,7 +1925,7 @@ + + The second host definition will use the current default protocol + ('dyndns2'), my-login and my-password to update the ip-address of +-myhost.dyndns.org and my2ndhost.dyndns.org. ++myhost.dyndns.com and my2ndhost.dyndns.com. + + The order of this sequence is significant because the values of any + global variable definitions are bound to a host definition when the +@@ -2065,13 +2065,13 @@ + o 'dyndns1' + + The 'dyndns1' protocol is a deprecated protocol used by the free dynamic +-DNS service offered by www.dyndns.org. The 'dyndns2' should be used to +-update the www.dyndns.org service. However, other services are also ++DNS service offered by www.dyndns.com. The 'dyndns2' should be used to ++update the www.dyndns.com service. However, other services are also + using this protocol so support is still provided by ${program}. + + Configuration variables applicable to the 'dyndns1' protocol are: + protocol=dyndns1 ## +- server=fqdn.of.service ## defaults to members.dyndns.org ++ server=fqdn.of.service ## defaults to members.dyndns.com + backupmx=no|yes ## indicates that this host is the primary MX for the domain. + mx=any.host.domain ## a host MX'ing for this host definition. + wildcard=no|yes ## add a DNS wildcard CNAME record that points to {host} +@@ -2082,16 +2082,16 @@ + Example ${program}.conf file entries: + ## single host update + protocol=dyndns1, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password \\ +- myhost.dyndns.org ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password \\ ++ myhost.dyndns.com + + ## multiple host update with wildcard'ing mx, and backupmx + protocol=dyndns1, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password, \\ ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password, \\ + mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ +- myhost.dyndns.org,my2ndhost.dyndns.org ++ myhost.dyndns.com,my2ndhost.dyndns.com + EoEXAMPLE + } + ###################################################################### +@@ -2177,13 +2177,13 @@ + o 'dyndns2' + + The 'dyndns2' protocol is a newer low-bandwidth protocol used by a +-free dynamic DNS service offered by www.dyndns.org. It supports ++free dynamic DNS service offered by www.dyndns.com. It supports + features of the older 'dyndns1' in addition to others. [These will be + supported in a future version of ${program}.] + + Configuration variables applicable to the 'dyndns2' protocol are: + protocol=dyndns2 ## +- server=fqdn.of.service ## defaults to members.dyndns.org ++ server=fqdn.of.service ## defaults to members.dyndns.com + backupmx=no|yes ## indicates that this host is the primary MX for the domain. + static=no|yes ## indicates that this host has a static IP address. + custom=no|yes ## indicates that this host is a 'custom' top-level domain name. +@@ -2196,21 +2196,21 @@ + Example ${program}.conf file entries: + ## single host update + protocol=dyndns2, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password \\ +- myhost.dyndns.org ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password \\ ++ myhost.dyndns.com + + ## multiple host update with wildcard'ing mx, and backupmx + protocol=dyndns2, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password, \\ ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password, \\ + mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ +- myhost.dyndns.org,my2ndhost.dyndns.org ++ myhost.dyndns.com,my2ndhost.dyndns.com + + ## multiple host update to the custom DNS service + protocol=dyndns2, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password \\ ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password \\ + my-toplevel-domain.com,my-other-domain.com + EoEXAMPLE + } +@@ -2234,8 +2234,8 @@ + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', + 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', + +- 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', +- 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', ++ 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.com', ++ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.com', + + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); +@@ -2507,7 +2507,7 @@ + + Configuration variables applicable to the 'hammernode1' protocol are: + protocol=hammernode1 ## +- server=fqdn.of.service ## defaults to members.dyndns.org ++ server=fqdn.of.service ## defaults to members.dyndns.com + login=service-login ## login name and password registered with the service + password=service-password ## + fully.qualified.host ## the host registered with the service. diff --git a/svn/patches/ubuntu/sample_ubuntu.diff b/svn/patches/ubuntu/sample_ubuntu.diff new file mode 100644 index 0000000..ab2a7cd --- /dev/null +++ b/svn/patches/ubuntu/sample_ubuntu.diff @@ -0,0 +1,11 @@ +--- ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu.orig 2007-04-28 13:01:23.000000000 +0100 ++++ ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu 2007-04-28 13:01:51.000000000 +0100 +@@ -5,7 +5,7 @@ + # Submitted by paolo martinelli + + DDCLIENT=/usr/sbin/ddclient +-CONF=/etc/ddclient/ddclient.conf ++CONF=/etc/ddclient.conf + PIDFILE=/var/run/ddclient.pid + + test -x $DDCLIENT || exit 0 diff --git a/svn/patches/ubuntu/series b/svn/patches/ubuntu/series new file mode 100644 index 0000000..698bcdd --- /dev/null +++ b/svn/patches/ubuntu/series @@ -0,0 +1,6 @@ +config_path.diff +dyndns_com.diff +daemon_interval.diff +sample_ubuntu.diff +smc-barricade-fw-alt.diff +checked_ssl_load.diff diff --git a/svn/patches/ubuntu/smc-barricade-fw-alt.diff b/svn/patches/ubuntu/smc-barricade-fw-alt.diff new file mode 100644 index 0000000..a91c63f --- /dev/null +++ b/svn/patches/ubuntu/smc-barricade-fw-alt.diff @@ -0,0 +1,14 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-30 00:43:32.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-05-03 23:07:24.000000000 +0100 +@@ -73,6 +73,11 @@ + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, ++ 'smc-barricade-alt' => { ++ 'name' => 'SMC Barricade FW (alternate config)', ++ 'url' => '/status.HTM', ++ 'skip' => 'WAN IP', ++ }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', From b507eec71afeb60c3ee4ec3a0654a9e5daa43659 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 07:11:22 +0000 Subject: [PATCH 099/231] Added debian and ubuntu patches git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@69 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/debianpatches/abuse_msg.diff | 14 ++ patches/debianpatches/cachedir.diff | 22 +++ patches/debianpatches/cisco_fw.diff | 14 ++ patches/debianpatches/config_path.diff | 14 ++ patches/debianpatches/daemon_check.diff | 16 ++ patches/debianpatches/daemon_interval.diff | 14 ++ patches/debianpatches/help_nonroot(2).diff | 46 ++++++ patches/debianpatches/help_nonroot.diff | 46 ++++++ patches/debianpatches/ip-up_run-parts.diff | 14 ++ patches/debianpatches/maxinterval.diff | 14 ++ patches/debianpatches/readme.txt | 24 +++ patches/debianpatches/sample_path.diff | 26 ++++ .../debianpatches/smc-barricade-7401bra.patch | 23 +++ .../debianpatches/smc-barricade-fw-alt.diff | 17 +++ patches/debianpatches/update-new-config.patch | 22 +++ patches/ubuntu/checked_ssl_load.diff | 34 +++++ patches/ubuntu/config_path.diff | 11 ++ patches/ubuntu/daemon_interval.diff | 11 ++ patches/ubuntu/dyndns_com.diff | 144 ++++++++++++++++++ patches/ubuntu/sample_ubuntu.diff | 11 ++ patches/ubuntu/series | 6 + patches/ubuntu/smc-barricade-fw-alt.diff | 14 ++ 22 files changed, 557 insertions(+) create mode 100644 patches/debianpatches/abuse_msg.diff create mode 100644 patches/debianpatches/cachedir.diff create mode 100644 patches/debianpatches/cisco_fw.diff create mode 100644 patches/debianpatches/config_path.diff create mode 100644 patches/debianpatches/daemon_check.diff create mode 100644 patches/debianpatches/daemon_interval.diff create mode 100644 patches/debianpatches/help_nonroot(2).diff create mode 100644 patches/debianpatches/help_nonroot.diff create mode 100644 patches/debianpatches/ip-up_run-parts.diff create mode 100644 patches/debianpatches/maxinterval.diff create mode 100644 patches/debianpatches/readme.txt create mode 100644 patches/debianpatches/sample_path.diff create mode 100644 patches/debianpatches/smc-barricade-7401bra.patch create mode 100644 patches/debianpatches/smc-barricade-fw-alt.diff create mode 100644 patches/debianpatches/update-new-config.patch create mode 100644 patches/ubuntu/checked_ssl_load.diff create mode 100644 patches/ubuntu/config_path.diff create mode 100644 patches/ubuntu/daemon_interval.diff create mode 100644 patches/ubuntu/dyndns_com.diff create mode 100644 patches/ubuntu/sample_ubuntu.diff create mode 100644 patches/ubuntu/series create mode 100644 patches/ubuntu/smc-barricade-fw-alt.diff diff --git a/patches/debianpatches/abuse_msg.diff b/patches/debianpatches/abuse_msg.diff new file mode 100644 index 0000000..ce1f746 --- /dev/null +++ b/patches/debianpatches/abuse_msg.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.043910433 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:59.469182565 +0100 +@@ -2231,7 +2231,7 @@ + '!yours' => 'The hostname specified exists, but not under the username currently being used', + '!donator' => 'The offline setting was set, when the user is not a donator', + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', +- 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', ++ 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', + + 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + diff --git a/patches/debianpatches/cachedir.diff b/patches/debianpatches/cachedir.diff new file mode 100644 index 0000000..3134537 --- /dev/null +++ b/patches/debianpatches/cachedir.diff @@ -0,0 +1,22 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-06-14 22:03:52.000000000 +0200 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:19.748088891 +0100 +@@ -22,6 +22,7 @@ + my $now = time; + my $hostname = hostname(); + my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; ++my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; + my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; + my $msgs = ''; + my $last_msgs = ''; +@@ -296,7 +297,7 @@ + 'global-defaults' => { + 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), + 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), +- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), ++ 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), + 'pid' => setv(T_FILE, 0, 0, 1, "", undef), + 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), + 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), + diff --git a/patches/debianpatches/cisco_fw.diff b/patches/debianpatches/cisco_fw.diff new file mode 100644 index 0000000..6772535 --- /dev/null +++ b/patches/debianpatches/cisco_fw.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.121898536 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:41.551915957 +0100 +@@ -1823,7 +1823,7 @@ + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + +- $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; ++ $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + $arg = $url; + + diff --git a/patches/debianpatches/config_path.diff b/patches/debianpatches/config_path.diff new file mode 100644 index 0000000..b59effb --- /dev/null +++ b/patches/debianpatches/config_path.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.151893960 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:22:37.171890909 +0100 +@@ -21,7 +21,7 @@ + $program =~ s/d$//; + my $now = time; + my $hostname = hostname(); +-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; ++my $etc = ($program =~ /test/i) ? './' : '/etc/'; + my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; + my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; + my $msgs = ''; + diff --git a/patches/debianpatches/daemon_check.diff b/patches/debianpatches/daemon_check.diff new file mode 100644 index 0000000..75699d8 --- /dev/null +++ b/patches/debianpatches/daemon_check.diff @@ -0,0 +1,16 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.023913484 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:03.977494794 +0100 +@@ -993,8 +993,8 @@ + + $opt{'timeout'} = 0 if opt('timeout') < 0; + $opt{'daemon'} = minimum('daemon') +- if define($opt{'daemon'},$globals{'daemon'},0) +- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); ++ if interval(define($opt{'daemon'},$globals{'daemon'},0)) ++ && interval(define($opt{'daemon'},$globals{'daemon'})) < minimum('daemon'); + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { + diff --git a/patches/debianpatches/daemon_interval.diff b/patches/debianpatches/daemon_interval.diff new file mode 100644 index 0000000..91f0648 --- /dev/null +++ b/patches/debianpatches/daemon_interval.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:36.919929347 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:15.960666685 +0100 +@@ -966,6 +966,8 @@ + sub init_config { + %opt = %saved_opt; + ++ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; ++ + ## + $opt{'quiet'} = 0 if opt('verbose'); + + diff --git a/patches/debianpatches/help_nonroot(2).diff b/patches/debianpatches/help_nonroot(2).diff new file mode 100644 index 0000000..3056836 --- /dev/null +++ b/patches/debianpatches/help_nonroot(2).diff @@ -0,0 +1,46 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 +@@ -553,6 +553,12 @@ + + test_geturl(opt('geturl')) if opt('geturl'); + ++## process help option ++if (opt('help')) { ++ *STDERR = *STDOUT; ++ usage(0); ++} ++ + ## read config file because 'daemon' mode may be defined there. + read_config(define($opt{'file'}, default('file')), \%config, \%globals); + init_config(); +@@ -1109,16 +1115,14 @@ + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } +- if (opt('help')) { +- *STDERR = *STDOUT; +- usage(); +- } + } + + ###################################################################### + ## usage + ###################################################################### + sub usage { ++ my $exitcode = 1; ++ $exitcode = shift if @_ != 0; # use first arg if given + my $msg = ''; + if (@_) { + my $format = shift; +@@ -1128,7 +1132,7 @@ + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); +- exit 1; ++ exit $exitcode; + } + + ###################################################################### + diff --git a/patches/debianpatches/help_nonroot.diff b/patches/debianpatches/help_nonroot.diff new file mode 100644 index 0000000..3056836 --- /dev/null +++ b/patches/debianpatches/help_nonroot.diff @@ -0,0 +1,46 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 +@@ -553,6 +553,12 @@ + + test_geturl(opt('geturl')) if opt('geturl'); + ++## process help option ++if (opt('help')) { ++ *STDERR = *STDOUT; ++ usage(0); ++} ++ + ## read config file because 'daemon' mode may be defined there. + read_config(define($opt{'file'}, default('file')), \%config, \%globals); + init_config(); +@@ -1109,16 +1115,14 @@ + $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; + } + } +- if (opt('help')) { +- *STDERR = *STDOUT; +- usage(); +- } + } + + ###################################################################### + ## usage + ###################################################################### + sub usage { ++ my $exitcode = 1; ++ $exitcode = shift if @_ != 0; # use first arg if given + my $msg = ''; + if (@_) { + my $format = shift; +@@ -1128,7 +1132,7 @@ + } + printf STDERR "%s%s\n", $msg, $opt_usage; + sendmail(); +- exit 1; ++ exit $exitcode; + } + + ###################################################################### + diff --git a/patches/debianpatches/ip-up_run-parts.diff b/patches/debianpatches/ip-up_run-parts.diff new file mode 100644 index 0000000..2a504d9 --- /dev/null +++ b/patches/debianpatches/ip-up_run-parts.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/sample-etc_ppp_ip-up.local +=================================================================== +--- ddclient-3.7.0.orig/sample-etc_ppp_ip-up.local 2006-06-14 21:59:40.000000000 +0200 ++++ ddclient-3.7.0/sample-etc_ppp_ip-up.local 2006-12-01 23:22:37.101901586 +0100 +@@ -34,7 +34,7 @@ + ;; + *) ( + sleep 5 +- ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 ++ ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 + ) & + ;; + esac + diff --git a/patches/debianpatches/maxinterval.diff b/patches/debianpatches/maxinterval.diff new file mode 100644 index 0000000..b245c9d --- /dev/null +++ b/patches/debianpatches/maxinterval.diff @@ -0,0 +1,14 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.062907535 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:24:53.543086628 +0100 +@@ -357,7 +357,7 @@ + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), +- 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), ++ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + diff --git a/patches/debianpatches/readme.txt b/patches/debianpatches/readme.txt new file mode 100644 index 0000000..cbd54f5 --- /dev/null +++ b/patches/debianpatches/readme.txt @@ -0,0 +1,24 @@ +(submitted by Torsten) + +cisco_fw.diff +config_path.diff +daemon_check.diff +daemon_interval.diff +maxinterval.diff +sample_path.diff +smc-barricade-7401bra.patch +smc-barricade-fw-alt.diff +update-new-config.patch + +cisco_fw.diff: Not sure what this change was about, have to check my + change log. +daemon_check.diff: Changes interpretation of the daemon parameter + to interval (to allow 5m for minutes etc.) when checking for min + value. +daemon_interval.diff: Changes interpretation of daemon interval during + input (now that I look at this, those two could probably be merged). + maxinterval.diff: Increase max interval for updates. + sample_path.diff: Adjust path in stamples. + update-new-config.patch: Force update if config has changed (still + needed?) + smc-*: Support for two more routers. diff --git a/patches/debianpatches/sample_path.diff b/patches/debianpatches/sample_path.diff new file mode 100644 index 0000000..2bfb485 --- /dev/null +++ b/patches/debianpatches/sample_path.diff @@ -0,0 +1,26 @@ +Index: ddclient-3.6.2/sample-etc_cron.d_ddclient +=================================================================== +--- ddclient-3.6.2.orig/sample-etc_cron.d_ddclient 2002-01-04 00:56:34.000000000 +0100 ++++ ddclient-3.6.2/sample-etc_cron.d_ddclient 2005-10-18 23:41:12.000000000 +0200 +@@ -10,7 +10,7 @@ + ###################################################################### + ## force an update twice a month + ## +-30 23 1,15 * * root /root/bin/ddclient -daemon=0 -syslog -quiet -force ++30 23 1,15 * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet -force + ###################################################################### + ## retry failed updates every hour (only if you are not using daemon-mode) + ## +Index: ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe +=================================================================== +--- ddclient-3.6.2.orig/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:40:22.000000000 +0200 ++++ ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:41:02.000000000 +0200 +@@ -15,6 +15,6 @@ + 192.168.*) ;; + *) + logger -t dhcpcd IP address changed to $1 +- /root/bin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 ++ /usr/sbin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 + ;; + esac + diff --git a/patches/debianpatches/smc-barricade-7401bra.patch b/patches/debianpatches/smc-barricade-7401bra.patch new file mode 100644 index 0000000..aadfec5 --- /dev/null +++ b/patches/debianpatches/smc-barricade-7401bra.patch @@ -0,0 +1,23 @@ +Add support for SMC7401BRA: + +ddclient support several kind of firewall to retrieve IP address, two of +them are smc-barricade and smc-barricade-alt, but these both doesn't +work with an SMC7401BRA. + +Index: ddclient +=================================================================== +--- ddclient.orig 2006-12-01 23:22:36.958923399 +0100 ++++ ddclient 2006-12-01 23:25:09.796607052 +0100 +@@ -73,6 +73,11 @@ + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, ++ 'smc-barricade-7401bra' => { ++ 'name' => 'SMC Barricade 7401BRA FW', ++ 'url' => '/admin/wan1.htm', ++ 'skip' => 'IP Address', ++ }, + 'netgear-rt3xx' => { + 'name' => 'Netgear FW', + 'url' => '/mtenSysStatus.html', + diff --git a/patches/debianpatches/smc-barricade-fw-alt.diff b/patches/debianpatches/smc-barricade-fw-alt.diff new file mode 100644 index 0000000..c42637e --- /dev/null +++ b/patches/debianpatches/smc-barricade-fw-alt.diff @@ -0,0 +1,17 @@ +Index: ddclient-3.7.0/ddclient +=================================================================== +--- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.003916535 +0100 ++++ ddclient-3.7.0/ddclient 2006-12-01 23:25:06.131166238 +0100 +@@ -73,6 +73,11 @@ + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, ++ 'smc-barricade-alt' => { ++ 'name' => 'SMC Barricade FW (alternate config)', ++ 'url' => '/status.HTM', ++ 'skip' => 'WAN IP', ++ }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', + diff --git a/patches/debianpatches/update-new-config.patch b/patches/debianpatches/update-new-config.patch new file mode 100644 index 0000000..4dd6240 --- /dev/null +++ b/patches/debianpatches/update-new-config.patch @@ -0,0 +1,22 @@ +ddclient did not update the dynamic DNS entry if the config changes. +This patch by Frans Pop to fixes this problem reported as Debian bug +#217041. +Index: ddclient +=================================================================== +--- ddclient.orig 2006-12-01 23:22:36.938926449 +0100 ++++ ddclient 2006-12-01 23:25:12.987120319 +0100 +@@ -1998,6 +1998,13 @@ + } elsif (defined($sub) && &$sub($host)) { + $update = 1; + ++ } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || ++ ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || ++ ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || ++ ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { ++ info("updating %s because host settings have been changed.", $host); ++ $update = 1; ++ + } else { + success("%s: skipped: IP address was already set to %s.", $host, $ip) + if opt('verbose'); + diff --git a/patches/ubuntu/checked_ssl_load.diff b/patches/ubuntu/checked_ssl_load.diff new file mode 100644 index 0000000..305ffb6 --- /dev/null +++ b/patches/ubuntu/checked_ssl_load.diff @@ -0,0 +1,34 @@ +--- ddclient-3.7.1/ddclient.orig 2007-05-03 23:24:39.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-05-03 23:27:44.000000000 +0100 +@@ -1635,6 +1642,20 @@ + $res; + } + ###################################################################### ++## load_ssl_support ++###################################################################### ++sub load_ssl_support { ++ my $ssl_loaded = eval {require IO::Socket::SSL}; ++ unless ($ssl_loaded) { ++ fatal(<<"EOM"); ++Error loading the Perl module IO::Socket::SSL needed for SSL connect. ++On Debian, the package libio-socket-ssl-perl must be installed. ++EOM ++ } ++ import IO::Socket::SSL; ++ { no warnings; $IO::Socket::SSL::DEBUG = 0; } ++} ++###################################################################### + ## geturl + ###################################################################### + sub geturl { +@@ -1663,9 +1684,7 @@ + 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; } ++ load_ssl_support; + } else { + $use_ssl = 0; + $default_port = 80; diff --git a/patches/ubuntu/config_path.diff b/patches/ubuntu/config_path.diff new file mode 100644 index 0000000..3908302 --- /dev/null +++ b/patches/ubuntu/config_path.diff @@ -0,0 +1,11 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-28 14:31:23.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-04-28 14:31:33.000000000 +0100 +@@ -21,7 +21,7 @@ + $program =~ s/d$//; + my $now = time; + my $hostname = hostname(); +-my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; ++my $etc = ($program =~ /test/i) ? './' : '/etc/'; + my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; + my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; + my $msgs = ''; diff --git a/patches/ubuntu/daemon_interval.diff b/patches/ubuntu/daemon_interval.diff new file mode 100644 index 0000000..d997b32 --- /dev/null +++ b/patches/ubuntu/daemon_interval.diff @@ -0,0 +1,11 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-28 20:43:53.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-04-28 20:42:57.000000000 +0100 +@@ -977,6 +977,8 @@ + sub init_config { + %opt = %saved_opt; + ++ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; ++ + ## + $opt{'quiet'} = 0 if opt('verbose'); + diff --git a/patches/ubuntu/dyndns_com.diff b/patches/ubuntu/dyndns_com.diff new file mode 100644 index 0000000..c66ce6c --- /dev/null +++ b/patches/ubuntu/dyndns_com.diff @@ -0,0 +1,144 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-30 00:40:49.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-04-30 00:40:59.000000000 +0100 +@@ -54,7 +54,7 @@ + + ## strategies for obtaining an ip address. + my %builtinweb = ( +- 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, ++ 'dyndns' => { 'url' => 'http://checkip.dyndns.com/', 'skip' => 'Current IP Address:', }, + 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, + ); + my %builtinfw = ( +@@ -342,7 +342,7 @@ + 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), + }, + 'service-common-defaults' => { +- 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), ++ 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.com', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), +@@ -1915,7 +1915,7 @@ + For example: + protocol=hammernode1, \\ + login=my-hn-login, password=my-hn-password myhost.hn.org +- login=my-login, password=my-password myhost.dyndns.org,my2nd.dyndns.org ++ login=my-login, password=my-password myhost.dyndns.com,my2nd.dyndns.com + + specifies two host definitions. + +@@ -1925,7 +1925,7 @@ + + The second host definition will use the current default protocol + ('dyndns2'), my-login and my-password to update the ip-address of +-myhost.dyndns.org and my2ndhost.dyndns.org. ++myhost.dyndns.com and my2ndhost.dyndns.com. + + The order of this sequence is significant because the values of any + global variable definitions are bound to a host definition when the +@@ -2065,13 +2065,13 @@ + o 'dyndns1' + + The 'dyndns1' protocol is a deprecated protocol used by the free dynamic +-DNS service offered by www.dyndns.org. The 'dyndns2' should be used to +-update the www.dyndns.org service. However, other services are also ++DNS service offered by www.dyndns.com. The 'dyndns2' should be used to ++update the www.dyndns.com service. However, other services are also + using this protocol so support is still provided by ${program}. + + Configuration variables applicable to the 'dyndns1' protocol are: + protocol=dyndns1 ## +- server=fqdn.of.service ## defaults to members.dyndns.org ++ server=fqdn.of.service ## defaults to members.dyndns.com + backupmx=no|yes ## indicates that this host is the primary MX for the domain. + mx=any.host.domain ## a host MX'ing for this host definition. + wildcard=no|yes ## add a DNS wildcard CNAME record that points to {host} +@@ -2082,16 +2082,16 @@ + Example ${program}.conf file entries: + ## single host update + protocol=dyndns1, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password \\ +- myhost.dyndns.org ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password \\ ++ myhost.dyndns.com + + ## multiple host update with wildcard'ing mx, and backupmx + protocol=dyndns1, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password, \\ ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password, \\ + mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ +- myhost.dyndns.org,my2ndhost.dyndns.org ++ myhost.dyndns.com,my2ndhost.dyndns.com + EoEXAMPLE + } + ###################################################################### +@@ -2177,13 +2177,13 @@ + o 'dyndns2' + + The 'dyndns2' protocol is a newer low-bandwidth protocol used by a +-free dynamic DNS service offered by www.dyndns.org. It supports ++free dynamic DNS service offered by www.dyndns.com. It supports + features of the older 'dyndns1' in addition to others. [These will be + supported in a future version of ${program}.] + + Configuration variables applicable to the 'dyndns2' protocol are: + protocol=dyndns2 ## +- server=fqdn.of.service ## defaults to members.dyndns.org ++ server=fqdn.of.service ## defaults to members.dyndns.com + backupmx=no|yes ## indicates that this host is the primary MX for the domain. + static=no|yes ## indicates that this host has a static IP address. + custom=no|yes ## indicates that this host is a 'custom' top-level domain name. +@@ -2196,21 +2196,21 @@ + Example ${program}.conf file entries: + ## single host update + protocol=dyndns2, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password \\ +- myhost.dyndns.org ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password \\ ++ myhost.dyndns.com + + ## multiple host update with wildcard'ing mx, and backupmx + protocol=dyndns2, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password, \\ ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password, \\ + mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ +- myhost.dyndns.org,my2ndhost.dyndns.org ++ myhost.dyndns.com,my2ndhost.dyndns.com + + ## multiple host update to the custom DNS service + protocol=dyndns2, \\ +- login=my-dyndns.org-login, \\ +- password=my-dyndns.org-password \\ ++ login=my-dyndns.com-login, \\ ++ password=my-dyndns.com-password \\ + my-toplevel-domain.com,my-other-domain.com + EoEXAMPLE + } +@@ -2234,8 +2234,8 @@ + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', + 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', + +- 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', +- 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', ++ 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.com', ++ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.com', + + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); +@@ -2507,7 +2507,7 @@ + + Configuration variables applicable to the 'hammernode1' protocol are: + protocol=hammernode1 ## +- server=fqdn.of.service ## defaults to members.dyndns.org ++ server=fqdn.of.service ## defaults to members.dyndns.com + login=service-login ## login name and password registered with the service + password=service-password ## + fully.qualified.host ## the host registered with the service. diff --git a/patches/ubuntu/sample_ubuntu.diff b/patches/ubuntu/sample_ubuntu.diff new file mode 100644 index 0000000..ab2a7cd --- /dev/null +++ b/patches/ubuntu/sample_ubuntu.diff @@ -0,0 +1,11 @@ +--- ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu.orig 2007-04-28 13:01:23.000000000 +0100 ++++ ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu 2007-04-28 13:01:51.000000000 +0100 +@@ -5,7 +5,7 @@ + # Submitted by paolo martinelli + + DDCLIENT=/usr/sbin/ddclient +-CONF=/etc/ddclient/ddclient.conf ++CONF=/etc/ddclient.conf + PIDFILE=/var/run/ddclient.pid + + test -x $DDCLIENT || exit 0 diff --git a/patches/ubuntu/series b/patches/ubuntu/series new file mode 100644 index 0000000..698bcdd --- /dev/null +++ b/patches/ubuntu/series @@ -0,0 +1,6 @@ +config_path.diff +dyndns_com.diff +daemon_interval.diff +sample_ubuntu.diff +smc-barricade-fw-alt.diff +checked_ssl_load.diff diff --git a/patches/ubuntu/smc-barricade-fw-alt.diff b/patches/ubuntu/smc-barricade-fw-alt.diff new file mode 100644 index 0000000..a91c63f --- /dev/null +++ b/patches/ubuntu/smc-barricade-fw-alt.diff @@ -0,0 +1,14 @@ +--- ddclient-3.7.1/ddclient.orig 2007-04-30 00:43:32.000000000 +0100 ++++ ddclient-3.7.1/ddclient 2007-05-03 23:07:24.000000000 +0100 +@@ -73,6 +73,11 @@ + 'url' => '/status.htm', + 'skip' => 'IP Address', + }, ++ 'smc-barricade-alt' => { ++ 'name' => 'SMC Barricade FW (alternate config)', ++ 'url' => '/status.HTM', ++ 'skip' => 'WAN IP', ++ }, + 'smc-barricade-7401bra' => { + 'name' => 'SMC Barricade 7401BRA FW', + 'url' => '/admin/wan1.htm', From b605c971863966a28ce935c20356199839b4dfce Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 07:13:33 +0000 Subject: [PATCH 100/231] Added not applied opendns.patch, see tracker #1758564 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@70 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/opendns.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 svn/patches/opendns.patch diff --git a/svn/patches/opendns.patch b/svn/patches/opendns.patch new file mode 100644 index 0000000..c4db577 --- /dev/null +++ b/svn/patches/opendns.patch @@ -0,0 +1,18 @@ +# +# patch created with `svn diff -r65 . > patches/opendns` +# on Mon Jul 23 14:20:22 CEST 2007 +# applied on r65 +# +Index: ddclient +=================================================================== +--- ddclient (revision 65) ++++ ddclient (working copy) +@@ -2272,7 +2272,7 @@ + verbose("UPDATE:","updating %s", $hosts); + + ## Select the DynDNS system to update +- my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ my $url = "https://updates.opendns.com/account/ddns.php?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; From 0857501e11c55c8e82cb39a19c4a4c1ba1776cec Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 07:13:33 +0000 Subject: [PATCH 101/231] Added not applied opendns.patch, see tracker #1758564 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@70 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/opendns.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patches/opendns.patch diff --git a/patches/opendns.patch b/patches/opendns.patch new file mode 100644 index 0000000..c4db577 --- /dev/null +++ b/patches/opendns.patch @@ -0,0 +1,18 @@ +# +# patch created with `svn diff -r65 . > patches/opendns` +# on Mon Jul 23 14:20:22 CEST 2007 +# applied on r65 +# +Index: ddclient +=================================================================== +--- ddclient (revision 65) ++++ ddclient (working copy) +@@ -2272,7 +2272,7 @@ + verbose("UPDATE:","updating %s", $hosts); + + ## Select the DynDNS system to update +- my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ my $url = "https://updates.opendns.com/account/ddns.php?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; From 2b9db93c05685122f9415433e0ee557ae72ba904 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 10:14:30 +0000 Subject: [PATCH 102/231] Removed patch since it's invalid git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@71 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/ubuntu/dyndns_com.diff | 144 ----------------------------- 1 file changed, 144 deletions(-) delete mode 100644 svn/patches/ubuntu/dyndns_com.diff diff --git a/svn/patches/ubuntu/dyndns_com.diff b/svn/patches/ubuntu/dyndns_com.diff deleted file mode 100644 index c66ce6c..0000000 --- a/svn/patches/ubuntu/dyndns_com.diff +++ /dev/null @@ -1,144 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-30 00:40:49.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-04-30 00:40:59.000000000 +0100 -@@ -54,7 +54,7 @@ - - ## strategies for obtaining an ip address. - my %builtinweb = ( -- 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, -+ 'dyndns' => { 'url' => 'http://checkip.dyndns.com/', 'skip' => 'Current IP Address:', }, - 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, - ); - my %builtinfw = ( -@@ -342,7 +342,7 @@ - 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), - }, - 'service-common-defaults' => { -- 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), -+ 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.com', undef), - 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), - 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), - 'host' => setv(T_STRING, 1, 1, 1, '', undef), -@@ -1915,7 +1915,7 @@ - For example: - protocol=hammernode1, \\ - login=my-hn-login, password=my-hn-password myhost.hn.org -- login=my-login, password=my-password myhost.dyndns.org,my2nd.dyndns.org -+ login=my-login, password=my-password myhost.dyndns.com,my2nd.dyndns.com - - specifies two host definitions. - -@@ -1925,7 +1925,7 @@ - - The second host definition will use the current default protocol - ('dyndns2'), my-login and my-password to update the ip-address of --myhost.dyndns.org and my2ndhost.dyndns.org. -+myhost.dyndns.com and my2ndhost.dyndns.com. - - The order of this sequence is significant because the values of any - global variable definitions are bound to a host definition when the -@@ -2065,13 +2065,13 @@ - o 'dyndns1' - - The 'dyndns1' protocol is a deprecated protocol used by the free dynamic --DNS service offered by www.dyndns.org. The 'dyndns2' should be used to --update the www.dyndns.org service. However, other services are also -+DNS service offered by www.dyndns.com. The 'dyndns2' should be used to -+update the www.dyndns.com service. However, other services are also - using this protocol so support is still provided by ${program}. - - Configuration variables applicable to the 'dyndns1' protocol are: - protocol=dyndns1 ## -- server=fqdn.of.service ## defaults to members.dyndns.org -+ server=fqdn.of.service ## defaults to members.dyndns.com - backupmx=no|yes ## indicates that this host is the primary MX for the domain. - mx=any.host.domain ## a host MX'ing for this host definition. - wildcard=no|yes ## add a DNS wildcard CNAME record that points to {host} -@@ -2082,16 +2082,16 @@ - Example ${program}.conf file entries: - ## single host update - protocol=dyndns1, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password \\ -- myhost.dyndns.org -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password \\ -+ myhost.dyndns.com - - ## multiple host update with wildcard'ing mx, and backupmx - protocol=dyndns1, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password, \\ -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password, \\ - mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ -- myhost.dyndns.org,my2ndhost.dyndns.org -+ myhost.dyndns.com,my2ndhost.dyndns.com - EoEXAMPLE - } - ###################################################################### -@@ -2177,13 +2177,13 @@ - o 'dyndns2' - - The 'dyndns2' protocol is a newer low-bandwidth protocol used by a --free dynamic DNS service offered by www.dyndns.org. It supports -+free dynamic DNS service offered by www.dyndns.com. It supports - features of the older 'dyndns1' in addition to others. [These will be - supported in a future version of ${program}.] - - Configuration variables applicable to the 'dyndns2' protocol are: - protocol=dyndns2 ## -- server=fqdn.of.service ## defaults to members.dyndns.org -+ server=fqdn.of.service ## defaults to members.dyndns.com - backupmx=no|yes ## indicates that this host is the primary MX for the domain. - static=no|yes ## indicates that this host has a static IP address. - custom=no|yes ## indicates that this host is a 'custom' top-level domain name. -@@ -2196,21 +2196,21 @@ - Example ${program}.conf file entries: - ## single host update - protocol=dyndns2, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password \\ -- myhost.dyndns.org -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password \\ -+ myhost.dyndns.com - - ## multiple host update with wildcard'ing mx, and backupmx - protocol=dyndns2, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password, \\ -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password, \\ - mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ -- myhost.dyndns.org,my2ndhost.dyndns.org -+ myhost.dyndns.com,my2ndhost.dyndns.com - - ## multiple host update to the custom DNS service - protocol=dyndns2, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password \\ -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password \\ - my-toplevel-domain.com,my-other-domain.com - EoEXAMPLE - } -@@ -2234,8 +2234,8 @@ - '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', - 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', - -- 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', -- 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', -+ 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.com', -+ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.com', - - 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', - ); -@@ -2507,7 +2507,7 @@ - - Configuration variables applicable to the 'hammernode1' protocol are: - protocol=hammernode1 ## -- server=fqdn.of.service ## defaults to members.dyndns.org -+ server=fqdn.of.service ## defaults to members.dyndns.com - login=service-login ## login name and password registered with the service - password=service-password ## - fully.qualified.host ## the host registered with the service. From b3c386329e9e334177241014051843c63db49fa7 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 10:14:30 +0000 Subject: [PATCH 103/231] Removed patch since it's invalid git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@71 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/ubuntu/dyndns_com.diff | 144 --------------------------------- 1 file changed, 144 deletions(-) delete mode 100644 patches/ubuntu/dyndns_com.diff diff --git a/patches/ubuntu/dyndns_com.diff b/patches/ubuntu/dyndns_com.diff deleted file mode 100644 index c66ce6c..0000000 --- a/patches/ubuntu/dyndns_com.diff +++ /dev/null @@ -1,144 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-30 00:40:49.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-04-30 00:40:59.000000000 +0100 -@@ -54,7 +54,7 @@ - - ## strategies for obtaining an ip address. - my %builtinweb = ( -- 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address', }, -+ 'dyndns' => { 'url' => 'http://checkip.dyndns.com/', 'skip' => 'Current IP Address:', }, - 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, - ); - my %builtinfw = ( -@@ -342,7 +342,7 @@ - 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), - }, - 'service-common-defaults' => { -- 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), -+ 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.com', undef), - 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), - 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), - 'host' => setv(T_STRING, 1, 1, 1, '', undef), -@@ -1915,7 +1915,7 @@ - For example: - protocol=hammernode1, \\ - login=my-hn-login, password=my-hn-password myhost.hn.org -- login=my-login, password=my-password myhost.dyndns.org,my2nd.dyndns.org -+ login=my-login, password=my-password myhost.dyndns.com,my2nd.dyndns.com - - specifies two host definitions. - -@@ -1925,7 +1925,7 @@ - - The second host definition will use the current default protocol - ('dyndns2'), my-login and my-password to update the ip-address of --myhost.dyndns.org and my2ndhost.dyndns.org. -+myhost.dyndns.com and my2ndhost.dyndns.com. - - The order of this sequence is significant because the values of any - global variable definitions are bound to a host definition when the -@@ -2065,13 +2065,13 @@ - o 'dyndns1' - - The 'dyndns1' protocol is a deprecated protocol used by the free dynamic --DNS service offered by www.dyndns.org. The 'dyndns2' should be used to --update the www.dyndns.org service. However, other services are also -+DNS service offered by www.dyndns.com. The 'dyndns2' should be used to -+update the www.dyndns.com service. However, other services are also - using this protocol so support is still provided by ${program}. - - Configuration variables applicable to the 'dyndns1' protocol are: - protocol=dyndns1 ## -- server=fqdn.of.service ## defaults to members.dyndns.org -+ server=fqdn.of.service ## defaults to members.dyndns.com - backupmx=no|yes ## indicates that this host is the primary MX for the domain. - mx=any.host.domain ## a host MX'ing for this host definition. - wildcard=no|yes ## add a DNS wildcard CNAME record that points to {host} -@@ -2082,16 +2082,16 @@ - Example ${program}.conf file entries: - ## single host update - protocol=dyndns1, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password \\ -- myhost.dyndns.org -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password \\ -+ myhost.dyndns.com - - ## multiple host update with wildcard'ing mx, and backupmx - protocol=dyndns1, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password, \\ -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password, \\ - mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ -- myhost.dyndns.org,my2ndhost.dyndns.org -+ myhost.dyndns.com,my2ndhost.dyndns.com - EoEXAMPLE - } - ###################################################################### -@@ -2177,13 +2177,13 @@ - o 'dyndns2' - - The 'dyndns2' protocol is a newer low-bandwidth protocol used by a --free dynamic DNS service offered by www.dyndns.org. It supports -+free dynamic DNS service offered by www.dyndns.com. It supports - features of the older 'dyndns1' in addition to others. [These will be - supported in a future version of ${program}.] - - Configuration variables applicable to the 'dyndns2' protocol are: - protocol=dyndns2 ## -- server=fqdn.of.service ## defaults to members.dyndns.org -+ server=fqdn.of.service ## defaults to members.dyndns.com - backupmx=no|yes ## indicates that this host is the primary MX for the domain. - static=no|yes ## indicates that this host has a static IP address. - custom=no|yes ## indicates that this host is a 'custom' top-level domain name. -@@ -2196,21 +2196,21 @@ - Example ${program}.conf file entries: - ## single host update - protocol=dyndns2, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password \\ -- myhost.dyndns.org -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password \\ -+ myhost.dyndns.com - - ## multiple host update with wildcard'ing mx, and backupmx - protocol=dyndns2, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password, \\ -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password, \\ - mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes \\ -- myhost.dyndns.org,my2ndhost.dyndns.org -+ myhost.dyndns.com,my2ndhost.dyndns.com - - ## multiple host update to the custom DNS service - protocol=dyndns2, \\ -- login=my-dyndns.org-login, \\ -- password=my-dyndns.org-password \\ -+ login=my-dyndns.com-login, \\ -+ password=my-dyndns.com-password \\ - my-toplevel-domain.com,my-other-domain.com - EoEXAMPLE - } -@@ -2234,8 +2234,8 @@ - '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', - 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', - -- 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', -- 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', -+ 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.com', -+ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.com', - - 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', - ); -@@ -2507,7 +2507,7 @@ - - Configuration variables applicable to the 'hammernode1' protocol are: - protocol=hammernode1 ## -- server=fqdn.of.service ## defaults to members.dyndns.org -+ server=fqdn.of.service ## defaults to members.dyndns.com - login=service-login ## login name and password registered with the service - password=service-password ## - fully.qualified.host ## the host registered with the service. From 5f10c9fbbc0a47a4337cc7db015f5e86c6f08c68 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 20:04:30 +0000 Subject: [PATCH 104/231] Notification about changed ChangeLog configuration git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@72 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/Changelog | 55 +++++++++++++++------------------------------------ 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/svn/Changelog b/svn/Changelog index 5d511f4..ca36ece 100644 --- a/svn/Changelog +++ b/svn/Changelog @@ -1,44 +1,21 @@ Changelog +3.7.3 + * Changelog moved to more correct ChangeLog + generated by svn2cl --group-by-day -i + See http://tinyurl.com/2fzhc6 -3.7.2 wimpunk - * Releasing 3.7.2 - -2007-02-21 wimpunk - - * [r43] Changelog, ddclient: Preventing unitialized values, check - https://sourceforge.net/forum/message.php?msg_id=4167772 - -2007-02-26 wimpunk - - * [r44] TODO: added a TODO list - -2007-05-19 wimpunk - - * [r46] ddclient: Removed the two empty lines at the end of - ddclient - * [r47] ddclient: Applied checked_ssl_load.diff from ubuntu - * [r48] ddclient: Cosmetic change about checkip - -2007-05-28 wimpunk - - * [r52] ddclient: Changed nic_namecheap_update following the - suggestion of edmdude on the forum - (https://sourceforge.net/forum/message.php?msg_id=4316938) - -2007-06-05 wimpunk - - * [r53] ddclient: Applied easydns.patch, patch 117054 - -2007-06-12 wimpunk - - * [r54] ddclient: 3com-oc-remote812 patch by The_Beast via IRC: see - patches/3com-oc-remote812.patch - -2007-06-14 wimpunk - - * [r55] patches, patches/3com-oc-remote812.patch, - patches/easydns.patch, patches/eurodns.patch: Patches directory - added +3.7.2 + * Preventing unitialized values, check + https://sourceforge.net/forum/message.php?msg_id=4167772 + * added a TODO list + * Removed the two empty lines at the end of ddclient + * Applied checked_ssl_load.diff from Ubuntu + * Cosmetic change about checkip + * Changed nic_namecheap_update following the suggestion of edmdude + on the forum (https://sourceforge.net/forum/message.php?msg_id=4316938) + * Applied easydns.patch + * 3com-oc-remote812 patch by The_Beast via IRC. + * Applied eurodns.patch 3.7.1 * URL of zoneedit has changed (see bug #1558483) From ebc443f9a2e96e25e1b6c9495ec930dca52e54db Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 20:04:30 +0000 Subject: [PATCH 105/231] Notification about changed ChangeLog configuration git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@72 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog | 55 ++++++++++++++++--------------------------------------- 1 file changed, 16 insertions(+), 39 deletions(-) diff --git a/Changelog b/Changelog index 5d511f4..ca36ece 100644 --- a/Changelog +++ b/Changelog @@ -1,44 +1,21 @@ Changelog +3.7.3 + * Changelog moved to more correct ChangeLog + generated by svn2cl --group-by-day -i + See http://tinyurl.com/2fzhc6 -3.7.2 wimpunk - * Releasing 3.7.2 - -2007-02-21 wimpunk - - * [r43] Changelog, ddclient: Preventing unitialized values, check - https://sourceforge.net/forum/message.php?msg_id=4167772 - -2007-02-26 wimpunk - - * [r44] TODO: added a TODO list - -2007-05-19 wimpunk - - * [r46] ddclient: Removed the two empty lines at the end of - ddclient - * [r47] ddclient: Applied checked_ssl_load.diff from ubuntu - * [r48] ddclient: Cosmetic change about checkip - -2007-05-28 wimpunk - - * [r52] ddclient: Changed nic_namecheap_update following the - suggestion of edmdude on the forum - (https://sourceforge.net/forum/message.php?msg_id=4316938) - -2007-06-05 wimpunk - - * [r53] ddclient: Applied easydns.patch, patch 117054 - -2007-06-12 wimpunk - - * [r54] ddclient: 3com-oc-remote812 patch by The_Beast via IRC: see - patches/3com-oc-remote812.patch - -2007-06-14 wimpunk - - * [r55] patches, patches/3com-oc-remote812.patch, - patches/easydns.patch, patches/eurodns.patch: Patches directory - added +3.7.2 + * Preventing unitialized values, check + https://sourceforge.net/forum/message.php?msg_id=4167772 + * added a TODO list + * Removed the two empty lines at the end of ddclient + * Applied checked_ssl_load.diff from Ubuntu + * Cosmetic change about checkip + * Changed nic_namecheap_update following the suggestion of edmdude + on the forum (https://sourceforge.net/forum/message.php?msg_id=4316938) + * Applied easydns.patch + * 3com-oc-remote812 patch by The_Beast via IRC. + * Applied eurodns.patch 3.7.1 * URL of zoneedit has changed (see bug #1558483) From 969c590c03848fc0d47f1482a896f313d85d85cf Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 20:12:56 +0000 Subject: [PATCH 106/231] Ignoring ChangeLog since autogenerated git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@73 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 9d68dba7aa6d548e8d5ad6726fbafdacce86ad9e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 30 Jul 2007 20:12:56 +0000 Subject: [PATCH 107/231] Ignoring ChangeLog since autogenerated git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@73 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 25092451707434e47fc13b30c17d0097ece181d6 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 31 Jul 2007 07:00:11 +0000 Subject: [PATCH 108/231] Removed line 183, comments on Vigor 2200 USB git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@74 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 1 - 1 file changed, 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index 5d328fd..ddff430 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -181,7 +181,6 @@ my %builtinfw = ( 'name' => 'Vigor 2200 USB', 'url' => '/doc/online.sht', 'skip' => 'PPPoA', -# 'skip' => 'PPPoA ', }, 'dlink-614' => { 'name' => 'D-Link DI-614+', From dd1128260f31de9c10c29f9f298f40c91bd7636c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 31 Jul 2007 07:00:11 +0000 Subject: [PATCH 109/231] Removed line 183, comments on Vigor 2200 USB git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@74 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 1 - 1 file changed, 1 deletion(-) diff --git a/ddclient b/ddclient index 5d328fd..ddff430 100755 --- a/ddclient +++ b/ddclient @@ -181,7 +181,6 @@ my %builtinfw = ( 'name' => 'Vigor 2200 USB', 'url' => '/doc/online.sht', 'skip' => 'PPPoA', -# 'skip' => 'PPPoA ', }, 'dlink-614' => { 'name' => 'D-Link DI-614+', From dcfb7d42810f725cb4eb08edd49f2e5cc5dd7dd7 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 31 Jul 2007 07:05:20 +0000 Subject: [PATCH 110/231] Removed ^M at line 37 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@75 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/README b/svn/README index d13ad61..9b7cc81 100644 --- a/svn/README +++ b/svn/README @@ -34,7 +34,7 @@ Comments, suggestions and requests: use the forums on http://sourceforge.net/projects/ddclient/ The code was originally written by Paul Burry and is now hosted and maintained -through sourceforge.net. Please check out http://ddclient.sf.net +through sourceforge.net. Please check out http://ddclient.sf.net ------------------------------------------------------------------------------- REQUIREMENTS: From f4996ca1631d1aedeca22da94aa4c8736d6f3bcc Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 31 Jul 2007 07:05:20 +0000 Subject: [PATCH 111/231] Removed ^M at line 37 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@75 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index d13ad61..9b7cc81 100644 --- a/README +++ b/README @@ -34,7 +34,7 @@ Comments, suggestions and requests: use the forums on http://sourceforge.net/projects/ddclient/ The code was originally written by Paul Burry and is now hosted and maintained -through sourceforge.net. Please check out http://ddclient.sf.net +through sourceforge.net. Please check out http://ddclient.sf.net ------------------------------------------------------------------------------- REQUIREMENTS: From 847e1d696500491eecb7222350524c66f20555e4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 31 Jul 2007 07:06:48 +0000 Subject: [PATCH 112/231] Renamed dyndns.org to dyndns.com git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@76 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/README.ssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/README.ssl b/svn/README.ssl index 70f9ca0..ba75d93 100644 --- a/svn/README.ssl +++ b/svn/README.ssl @@ -7,4 +7,4 @@ 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 +- dyndns.com From 8850e7d3271b70460c2c60091cf08964390d7cb9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 31 Jul 2007 07:06:48 +0000 Subject: [PATCH 113/231] Renamed dyndns.org to dyndns.com git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@76 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.ssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.ssl b/README.ssl index 70f9ca0..ba75d93 100644 --- a/README.ssl +++ b/README.ssl @@ -7,4 +7,4 @@ 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 +- dyndns.com From 5574607cec0a45901b8f9aed2880ae14edb822ab Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 1 Aug 2007 07:31:43 +0000 Subject: [PATCH 114/231] Applied typo_dnspark.patch send by Marco git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@77 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- svn/patches/typo_dnspark.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 svn/patches/typo_dnspark.patch diff --git a/svn/ddclient b/svn/ddclient index ddff430..a4a09fc 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -2875,7 +2875,7 @@ o 'dnspark' The 'dnspark' protocol is used by DNS service offered by www.dnspark.com. -Configuration variables applicable to the 'easydns' protocol are: +Configuration variables applicable to the 'dnspark' protocol are: protocol=dnspark ## server=fqdn.of.service ## defaults to www.dnspark.com backupmx=no|yes ## indicates that DNSPark should be the secondary MX diff --git a/svn/patches/typo_dnspark.patch b/svn/patches/typo_dnspark.patch new file mode 100644 index 0000000..aa9bbdd --- /dev/null +++ b/svn/patches/typo_dnspark.patch @@ -0,0 +1,15 @@ +# +# typo_dnspark.patch send by Marco. +# Applied on ddclient Rev 72 +# +--- ddclient.orig 2007-07-31 15:44:20.000000000 +0100 ++++ ddclient 2007-07-31 15:45:52.000000000 +0100 +@@ -2875,7 +2875,7 @@ + + The 'dnspark' protocol is used by DNS service offered by www.dnspark.com. + +-Configuration variables applicable to the 'easydns' protocol are: ++Configuration variables applicable to the 'dnspark' protocol are: + protocol=dnspark ## + server=fqdn.of.service ## defaults to www.dnspark.com + backupmx=no|yes ## indicates that DNSPark should be the secondary MX From 07e20debfebe6fd19e7a00aed6326c8b0238aa9f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 1 Aug 2007 07:31:43 +0000 Subject: [PATCH 115/231] Applied typo_dnspark.patch send by Marco git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@77 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- patches/typo_dnspark.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 patches/typo_dnspark.patch diff --git a/ddclient b/ddclient index ddff430..a4a09fc 100755 --- a/ddclient +++ b/ddclient @@ -2875,7 +2875,7 @@ o 'dnspark' The 'dnspark' protocol is used by DNS service offered by www.dnspark.com. -Configuration variables applicable to the 'easydns' protocol are: +Configuration variables applicable to the 'dnspark' protocol are: protocol=dnspark ## server=fqdn.of.service ## defaults to www.dnspark.com backupmx=no|yes ## indicates that DNSPark should be the secondary MX diff --git a/patches/typo_dnspark.patch b/patches/typo_dnspark.patch new file mode 100644 index 0000000..aa9bbdd --- /dev/null +++ b/patches/typo_dnspark.patch @@ -0,0 +1,15 @@ +# +# typo_dnspark.patch send by Marco. +# Applied on ddclient Rev 72 +# +--- ddclient.orig 2007-07-31 15:44:20.000000000 +0100 ++++ ddclient 2007-07-31 15:45:52.000000000 +0100 +@@ -2875,7 +2875,7 @@ + + The 'dnspark' protocol is used by DNS service offered by www.dnspark.com. + +-Configuration variables applicable to the 'easydns' protocol are: ++Configuration variables applicable to the 'dnspark' protocol are: + protocol=dnspark ## + server=fqdn.of.service ## defaults to www.dnspark.com + backupmx=no|yes ## indicates that DNSPark should be the secondary MX From 84646fdbdefee051383a91c0b1cb4b4f7e3eb69c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 7 Aug 2007 06:35:55 +0000 Subject: [PATCH 116/231] Updated version number to 3.7.3 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@78 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index a4a09fc..0b91579 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -17,7 +17,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.2"; +my $version = "3.7.3"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From fdfde09d7b7d938a156f7d6a1df44e9efbc32fd1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 7 Aug 2007 06:35:55 +0000 Subject: [PATCH 117/231] Updated version number to 3.7.3 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@78 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index a4a09fc..0b91579 100755 --- a/ddclient +++ b/ddclient @@ -17,7 +17,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.2"; +my $version = "3.7.3"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From cf90b72d7bc0ad2a4ed49289e2c301867dca99a9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 29 Aug 2007 09:04:33 +0000 Subject: [PATCH 118/231] Added ddclient-noip.patch send by Kurt Bussche. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@80 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 160 ++++++++++++++++++++++++++++ svn/patches/ddclient-noip.patch | 183 ++++++++++++++++++++++++++++++++ 2 files changed, 343 insertions(+) create mode 100644 svn/patches/ddclient-noip.patch diff --git a/svn/ddclient b/svn/ddclient index 0b91579..8936ff8 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -376,6 +376,25 @@ my %variables = ( 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), }, + 'noip-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'noip-service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, ); my %services = ( 'dyndns1' => { @@ -398,6 +417,16 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'noip' => { + 'updateable' => undef, + 'update' => \&nic_noip_update, + 'examples' => \&nic_noip_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'noip-common-defaults'}, + $variables{'noip-service-common-defaults'}, + ), + }, 'concont' => { 'updateable' => undef, 'update' => \&nic_concont_update, @@ -2359,6 +2388,137 @@ sub nic_dyndns2_update { if $state ne 'results2'; } } + + +###################################################################### +## nic_noip_update +## Note: uses same features as nic_dyndns2_update, less return codes +###################################################################### +sub nic_noip_update { + debug("\nnic_noip_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); + + my %errors = ( + 'badauth' => 'Invalid username or password', + 'badagent' => 'Invalid user agent', + 'nohost' => 'The hostname specified does not exist in the database', + '!donator' => 'The offline setting was set, when the user is not a donator', + 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', + 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + my $url = "http://$config{$h}{'server'}/nic/update?system="; + $url .= 'noip'; + $url .= "&hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + + print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; + + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status, $ip) = split / /, lc $line; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### +## nic_noip_examples +###################################################################### +sub nic_noip_examples { + return < setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), + }, ++ 'noip-common-defaults' => { ++ 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), ++ }, ++ 'noip-service-common-defaults' => { ++ 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), ++ 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), ++ 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), ++ 'host' => setv(T_STRING, 1, 1, 1, '', undef), ++ 'ip' => setv(T_IP, 0, 1, 0, undef, undef), ++ 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), ++ 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), ++ 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), ++ 'status' => setv(T_ANY, 0, 1, 0, '', undef), ++ 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), ++ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), ++ 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), ++ 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), ++ 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), ++ }, + ); + my %services = ( + 'dyndns1' => { +@@ -398,6 +417,16 @@ + $variables{'service-common-defaults'}, + ), + }, ++ 'noip' => { ++ 'updateable' => undef, ++ 'update' => \&nic_noip_update, ++ 'examples' => \&nic_noip_examples, ++ 'variables' => merge( ++ { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, ++ $variables{'noip-common-defaults'}, ++ $variables{'noip-service-common-defaults'}, ++ ), ++ }, + 'concont' => { + 'updateable' => undef, + 'update' => \&nic_concont_update, +@@ -2359,6 +2388,137 @@ + if $state ne 'results2'; + } + } ++ ++ ++###################################################################### ++## nic_noip_update ++## Note: uses same features as nic_dyndns2_update, less return codes ++###################################################################### ++sub nic_noip_update { ++ debug("\nnic_noip_update -------------------"); ++ ++ ## group hosts with identical attributes together ++ my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); ++ ++ my %errors = ( ++ 'badauth' => 'Invalid username or password', ++ 'badagent' => 'Invalid user agent', ++ 'nohost' => 'The hostname specified does not exist in the database', ++ '!donator' => 'The offline setting was set, when the user is not a donator', ++ 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', ++ 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', ++ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', ++ 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', ++ ); ++ ++ ## update each set of hosts that had similar configurations ++ foreach my $sig (keys %groups) { ++ my @hosts = @{$groups{$sig}}; ++ my $hosts = join(',', @hosts); ++ my $h = $hosts[0]; ++ ++ info("setting IP address to %s for %s", $ip, $hosts); ++ verbose("UPDATE:","updating %s", $hosts); ++ ++ my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ $url .= 'noip'; ++ $url .= "&hostname=$hosts"; ++ $url .= "&myip="; ++ $url .= $ip if $ip; ++ ++ ++ print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; ++ ++ ++ my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); ++ if (!defined($reply) || !$reply) { ++ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); ++ last; ++ } ++ last if !header_ok($hosts, $reply); ++ ++ my @reply = split /\n/, $reply; ++ my $state = 'header'; ++ foreach my $line (@reply) { ++ if ($state eq 'header') { ++ $state = 'body'; ++ ++ } elsif ($state eq 'body') { ++ $state = 'results' if $line eq ''; ++ ++ } elsif ($state =~ /^results/) { ++ $state = 'results2'; ++ ++ my ($status, $ip) = split / /, lc $line; ++ my $h = shift @hosts; ++ ++ $config{$h}{'status'} = $status; ++ if ($status eq 'good') { ++ $config{$h}{'ip'} = $ip; ++ $config{$h}{'mtime'} = $now; ++ success("updating %s: %s: IP address set to %s", $h, $status, $ip); ++ ++ } elsif (exists $errors{$status}) { ++ if ($status eq 'nochg') { ++ warning("updating %s: %s: %s", $h, $status, $errors{$status}); ++ $config{$h}{'ip'} = $ip; ++ $config{$h}{'mtime'} = $now; ++ $config{$h}{'status'} = 'good'; ++ ++ } else { ++ failed("updating %s: %s: %s", $h, $status, $errors{$status}); ++ } ++ ++ } elsif ($status =~ /w(\d+)(.)/) { ++ my ($wait, $units) = ($1, lc $2); ++ my ($sec, $scale) = ($wait, 1); ++ ++ ($scale, $units) = (1, 'seconds') if $units eq 's'; ++ ($scale, $units) = (60, 'minutes') if $units eq 'm'; ++ ($scale, $units) = (60*60, 'hours') if $units eq 'h'; ++ ++ $sec = $wait * $scale; ++ $config{$h}{'wtime'} = $now + $sec; ++ warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); ++ ++ } else { ++ failed("updating %s: %s: unexpected status (%s)", $h, $line); ++ } ++ } ++ } ++ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) ++ if $state ne 'results2'; ++ } ++} ++###################################################################### ++## nic_noip_examples ++###################################################################### ++sub nic_noip_examples { ++ return < Date: Wed, 29 Aug 2007 09:04:33 +0000 Subject: [PATCH 119/231] Added ddclient-noip.patch send by Kurt Bussche. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@80 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 160 +++++++++++++++++++++++++++++++ patches/ddclient-noip.patch | 183 ++++++++++++++++++++++++++++++++++++ 2 files changed, 343 insertions(+) create mode 100644 patches/ddclient-noip.patch diff --git a/ddclient b/ddclient index 0b91579..8936ff8 100755 --- a/ddclient +++ b/ddclient @@ -376,6 +376,25 @@ my %variables = ( 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), }, + 'noip-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, + 'noip-service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, ); my %services = ( 'dyndns1' => { @@ -398,6 +417,16 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'noip' => { + 'updateable' => undef, + 'update' => \&nic_noip_update, + 'examples' => \&nic_noip_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'noip-common-defaults'}, + $variables{'noip-service-common-defaults'}, + ), + }, 'concont' => { 'updateable' => undef, 'update' => \&nic_concont_update, @@ -2359,6 +2388,137 @@ sub nic_dyndns2_update { if $state ne 'results2'; } } + + +###################################################################### +## nic_noip_update +## Note: uses same features as nic_dyndns2_update, less return codes +###################################################################### +sub nic_noip_update { + debug("\nnic_noip_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); + + my %errors = ( + 'badauth' => 'Invalid username or password', + 'badagent' => 'Invalid user agent', + 'nohost' => 'The hostname specified does not exist in the database', + '!donator' => 'The offline setting was set, when the user is not a donator', + 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', + 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + my $url = "http://$config{$h}{'server'}/nic/update?system="; + $url .= 'noip'; + $url .= "&hostname=$hosts"; + $url .= "&myip="; + $url .= $ip if $ip; + + + print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; + + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); + last; + } + last if !header_ok($hosts, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + my ($status, $ip) = split / /, lc $line; + my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) + if $state ne 'results2'; + } +} +###################################################################### +## nic_noip_examples +###################################################################### +sub nic_noip_examples { + return < setv(T_OFQDN, 0, 1, 1, '', undef), + 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), + }, ++ 'noip-common-defaults' => { ++ 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), ++ }, ++ 'noip-service-common-defaults' => { ++ 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), ++ 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), ++ 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), ++ 'host' => setv(T_STRING, 1, 1, 1, '', undef), ++ 'ip' => setv(T_IP, 0, 1, 0, undef, undef), ++ 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), ++ 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), ++ 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), ++ 'status' => setv(T_ANY, 0, 1, 0, '', undef), ++ 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), ++ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), ++ 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), ++ 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), ++ 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), ++ }, + ); + my %services = ( + 'dyndns1' => { +@@ -398,6 +417,16 @@ + $variables{'service-common-defaults'}, + ), + }, ++ 'noip' => { ++ 'updateable' => undef, ++ 'update' => \&nic_noip_update, ++ 'examples' => \&nic_noip_examples, ++ 'variables' => merge( ++ { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, ++ $variables{'noip-common-defaults'}, ++ $variables{'noip-service-common-defaults'}, ++ ), ++ }, + 'concont' => { + 'updateable' => undef, + 'update' => \&nic_concont_update, +@@ -2359,6 +2388,137 @@ + if $state ne 'results2'; + } + } ++ ++ ++###################################################################### ++## nic_noip_update ++## Note: uses same features as nic_dyndns2_update, less return codes ++###################################################################### ++sub nic_noip_update { ++ debug("\nnic_noip_update -------------------"); ++ ++ ## group hosts with identical attributes together ++ my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); ++ ++ my %errors = ( ++ 'badauth' => 'Invalid username or password', ++ 'badagent' => 'Invalid user agent', ++ 'nohost' => 'The hostname specified does not exist in the database', ++ '!donator' => 'The offline setting was set, when the user is not a donator', ++ 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', ++ 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', ++ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', ++ 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', ++ ); ++ ++ ## update each set of hosts that had similar configurations ++ foreach my $sig (keys %groups) { ++ my @hosts = @{$groups{$sig}}; ++ my $hosts = join(',', @hosts); ++ my $h = $hosts[0]; ++ ++ info("setting IP address to %s for %s", $ip, $hosts); ++ verbose("UPDATE:","updating %s", $hosts); ++ ++ my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ $url .= 'noip'; ++ $url .= "&hostname=$hosts"; ++ $url .= "&myip="; ++ $url .= $ip if $ip; ++ ++ ++ print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; ++ ++ ++ my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); ++ if (!defined($reply) || !$reply) { ++ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); ++ last; ++ } ++ last if !header_ok($hosts, $reply); ++ ++ my @reply = split /\n/, $reply; ++ my $state = 'header'; ++ foreach my $line (@reply) { ++ if ($state eq 'header') { ++ $state = 'body'; ++ ++ } elsif ($state eq 'body') { ++ $state = 'results' if $line eq ''; ++ ++ } elsif ($state =~ /^results/) { ++ $state = 'results2'; ++ ++ my ($status, $ip) = split / /, lc $line; ++ my $h = shift @hosts; ++ ++ $config{$h}{'status'} = $status; ++ if ($status eq 'good') { ++ $config{$h}{'ip'} = $ip; ++ $config{$h}{'mtime'} = $now; ++ success("updating %s: %s: IP address set to %s", $h, $status, $ip); ++ ++ } elsif (exists $errors{$status}) { ++ if ($status eq 'nochg') { ++ warning("updating %s: %s: %s", $h, $status, $errors{$status}); ++ $config{$h}{'ip'} = $ip; ++ $config{$h}{'mtime'} = $now; ++ $config{$h}{'status'} = 'good'; ++ ++ } else { ++ failed("updating %s: %s: %s", $h, $status, $errors{$status}); ++ } ++ ++ } elsif ($status =~ /w(\d+)(.)/) { ++ my ($wait, $units) = ($1, lc $2); ++ my ($sec, $scale) = ($wait, 1); ++ ++ ($scale, $units) = (1, 'seconds') if $units eq 's'; ++ ($scale, $units) = (60, 'minutes') if $units eq 'm'; ++ ($scale, $units) = (60*60, 'hours') if $units eq 'h'; ++ ++ $sec = $wait * $scale; ++ $config{$h}{'wtime'} = $now + $sec; ++ warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); ++ ++ } else { ++ failed("updating %s: %s: unexpected status (%s)", $h, $line); ++ } ++ } ++ } ++ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) ++ if $state ne 'results2'; ++ } ++} ++###################################################################### ++## nic_noip_examples ++###################################################################### ++sub nic_noip_examples { ++ return < Date: Mon, 29 Oct 2007 21:02:20 +0000 Subject: [PATCH 120/231] Added and applied default timeout patch from https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@81 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- svn/patches/ubuntu/default-timeout.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 svn/patches/ubuntu/default-timeout.patch diff --git a/svn/ddclient b/svn/ddclient index 8936ff8..93e97de 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -323,7 +323,7 @@ my %variables = ( 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), - 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), + 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), diff --git a/svn/patches/ubuntu/default-timeout.patch b/svn/patches/ubuntu/default-timeout.patch new file mode 100644 index 0000000..1f7197f --- /dev/null +++ b/svn/patches/ubuntu/default-timeout.patch @@ -0,0 +1,13 @@ +# patch original from ubuntu forum: +# https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 +--- ddclient 2007-10-25 19:39:46.000000000 +0300 ++++ ddclient 2007-10-25 19:36:41.000000000 +0300 +@@ -328,7 +328,7 @@ + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), + +- 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), ++ 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), From 6fb184641d5c3229a629a90782a37010ff8b4532 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 29 Oct 2007 21:02:20 +0000 Subject: [PATCH 121/231] Added and applied default timeout patch from https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@81 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- patches/ubuntu/default-timeout.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 patches/ubuntu/default-timeout.patch diff --git a/ddclient b/ddclient index 8936ff8..93e97de 100755 --- a/ddclient +++ b/ddclient @@ -323,7 +323,7 @@ my %variables = ( 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), - 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), + 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), diff --git a/patches/ubuntu/default-timeout.patch b/patches/ubuntu/default-timeout.patch new file mode 100644 index 0000000..1f7197f --- /dev/null +++ b/patches/ubuntu/default-timeout.patch @@ -0,0 +1,13 @@ +# patch original from ubuntu forum: +# https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 +--- ddclient 2007-10-25 19:39:46.000000000 +0300 ++++ ddclient 2007-10-25 19:36:41.000000000 +0300 +@@ -328,7 +328,7 @@ + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), + +- 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), ++ 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), From 53ccfe931d0df295905f92b30cb0867f6366ab47 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Feb 2008 08:16:11 +0000 Subject: [PATCH 122/231] Added creation of cache dir git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@82 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/svn/README b/svn/README index 9b7cc81..a00cda5 100644 --- a/svn/README +++ b/svn/README @@ -51,6 +51,7 @@ INSTALLATION: cp ddclient /usr/sbin/ mkdir /etc/ddclient + mkdir /var/cache/ddclient cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf vi /etc/ddclient/ddclient.conf -- and change hostnames, logins, and passwords appropriately @@ -58,6 +59,7 @@ INSTALLATION: ## For those using Redhat style rc files and using daemon-mode: cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient ## enable automatic startup when booting + ## check your distribution /sbin/chkconfig --add ddclient ## start the first time by hand /etc/rc.d/init.d/ddclient start From 67f751b1543e0767452201ca48e330a8f1191471 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Feb 2008 08:16:11 +0000 Subject: [PATCH 123/231] Added creation of cache dir git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@82 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README b/README index 9b7cc81..a00cda5 100644 --- a/README +++ b/README @@ -51,6 +51,7 @@ INSTALLATION: cp ddclient /usr/sbin/ mkdir /etc/ddclient + mkdir /var/cache/ddclient cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf vi /etc/ddclient/ddclient.conf -- and change hostnames, logins, and passwords appropriately @@ -58,6 +59,7 @@ INSTALLATION: ## For those using Redhat style rc files and using daemon-mode: cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient ## enable automatic startup when booting + ## check your distribution /sbin/chkconfig --add ddclient ## start the first time by hand /etc/rc.d/init.d/ddclient start From a97eed732fe511de9625abd39a9054bc57806f1c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Feb 2008 08:31:06 +0000 Subject: [PATCH 124/231] Sending mail when killed, not after TERM-signal git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@83 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index 93e97de..c0a3db5 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -602,8 +602,10 @@ if (!opt('daemon') && $programd =~ /d$/) { } my $caught_hup = 0; my $caught_term = 0; +my $caught_kill = 0; $SIG{'HUP'} = sub { $caught_hup = 1; }; $SIG{'TERM'} = sub { $caught_term = 1; }; +$SIG{'KILL'} = sub { $caught_kill = 1; }; if (opt('daemon') && !opt('force')) { $SIG{'CHLD'} = 'IGNORE'; my $pid = fork; @@ -665,7 +667,7 @@ do { sendmail(); my $left = $daemon; - while (($left > 0) && !$caught_hup && !$caught_term) { + while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) { my $delay = $left > 10 ? 10 : $left; $0 = sprintf("%s - sleeping for %s seconds", $program, $left); @@ -681,9 +683,9 @@ do { } else { $result = $result eq 'OK' ? 0 : 1; } -} while ($daemon && !$result && !$caught_term); +} while ($daemon && !$result && !$caught_term && !$caught_kill); -warning("caught SIGTERM; exiting") if $caught_term; +warning("caught SIGKILL; exiting") if $caught_kill; unlink_pid(); sendmail(); From 8c5ba3a09cf9a5d5b2f09a49dd47348515e45ac0 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Feb 2008 08:31:06 +0000 Subject: [PATCH 125/231] Sending mail when killed, not after TERM-signal git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@83 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ddclient b/ddclient index 93e97de..c0a3db5 100755 --- a/ddclient +++ b/ddclient @@ -602,8 +602,10 @@ if (!opt('daemon') && $programd =~ /d$/) { } my $caught_hup = 0; my $caught_term = 0; +my $caught_kill = 0; $SIG{'HUP'} = sub { $caught_hup = 1; }; $SIG{'TERM'} = sub { $caught_term = 1; }; +$SIG{'KILL'} = sub { $caught_kill = 1; }; if (opt('daemon') && !opt('force')) { $SIG{'CHLD'} = 'IGNORE'; my $pid = fork; @@ -665,7 +667,7 @@ do { sendmail(); my $left = $daemon; - while (($left > 0) && !$caught_hup && !$caught_term) { + while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) { my $delay = $left > 10 ? 10 : $left; $0 = sprintf("%s - sleeping for %s seconds", $program, $left); @@ -681,9 +683,9 @@ do { } else { $result = $result eq 'OK' ? 0 : 1; } -} while ($daemon && !$result && !$caught_term); +} while ($daemon && !$result && !$caught_term && !$caught_kill); -warning("caught SIGTERM; exiting") if $caught_term; +warning("caught SIGKILL; exiting") if $caught_kill; unlink_pid(); sendmail(); From 03838725fc473ad70c0244634eaa7b60568aa52e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 8 Feb 2008 10:08:24 +0000 Subject: [PATCH 126/231] Added mail-on-kill patch to patches section git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@84 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/mail-on-kill.patch | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 svn/patches/mail-on-kill.patch diff --git a/svn/patches/mail-on-kill.patch b/svn/patches/mail-on-kill.patch new file mode 100644 index 0000000..dd38ada --- /dev/null +++ b/svn/patches/mail-on-kill.patch @@ -0,0 +1,44 @@ +# +# patch created with `svn diff -r82 . > patches/mail-on-kill.patch` +# on Fri Feb 8 11:03:01 CET 2008 +# applied on r82 +# +# This patch prevent ddclient sending out mail when interrupted by +# a TERM signal. It still sends mail ended by a KILL signal. +# +Index: ddclient +=================================================================== +--- ddclient (revision 82) ++++ ddclient (working copy) +@@ -602,8 +602,10 @@ + } + my $caught_hup = 0; + my $caught_term = 0; ++my $caught_kill = 0; + $SIG{'HUP'} = sub { $caught_hup = 1; }; + $SIG{'TERM'} = sub { $caught_term = 1; }; ++$SIG{'KILL'} = sub { $caught_kill = 1; }; + if (opt('daemon') && !opt('force')) { + $SIG{'CHLD'} = 'IGNORE'; + my $pid = fork; +@@ -665,7 +667,7 @@ + sendmail(); + + my $left = $daemon; +- while (($left > 0) && !$caught_hup && !$caught_term) { ++ while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) { + my $delay = $left > 10 ? 10 : $left; + + $0 = sprintf("%s - sleeping for %s seconds", $program, $left); +@@ -681,9 +683,9 @@ + } else { + $result = $result eq 'OK' ? 0 : 1; + } +-} while ($daemon && !$result && !$caught_term); ++} while ($daemon && !$result && !$caught_term && !$caught_kill); + +-warning("caught SIGTERM; exiting") if $caught_term; ++warning("caught SIGKILL; exiting") if $caught_kill; + unlink_pid(); + sendmail(); + From 54a61d76a6ae7592d384a64d34666c3f74724b0c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 8 Feb 2008 10:08:24 +0000 Subject: [PATCH 127/231] Added mail-on-kill patch to patches section git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@84 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/mail-on-kill.patch | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 patches/mail-on-kill.patch diff --git a/patches/mail-on-kill.patch b/patches/mail-on-kill.patch new file mode 100644 index 0000000..dd38ada --- /dev/null +++ b/patches/mail-on-kill.patch @@ -0,0 +1,44 @@ +# +# patch created with `svn diff -r82 . > patches/mail-on-kill.patch` +# on Fri Feb 8 11:03:01 CET 2008 +# applied on r82 +# +# This patch prevent ddclient sending out mail when interrupted by +# a TERM signal. It still sends mail ended by a KILL signal. +# +Index: ddclient +=================================================================== +--- ddclient (revision 82) ++++ ddclient (working copy) +@@ -602,8 +602,10 @@ + } + my $caught_hup = 0; + my $caught_term = 0; ++my $caught_kill = 0; + $SIG{'HUP'} = sub { $caught_hup = 1; }; + $SIG{'TERM'} = sub { $caught_term = 1; }; ++$SIG{'KILL'} = sub { $caught_kill = 1; }; + if (opt('daemon') && !opt('force')) { + $SIG{'CHLD'} = 'IGNORE'; + my $pid = fork; +@@ -665,7 +667,7 @@ + sendmail(); + + my $left = $daemon; +- while (($left > 0) && !$caught_hup && !$caught_term) { ++ while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) { + my $delay = $left > 10 ? 10 : $left; + + $0 = sprintf("%s - sleeping for %s seconds", $program, $left); +@@ -681,9 +683,9 @@ + } else { + $result = $result eq 'OK' ? 0 : 1; + } +-} while ($daemon && !$result && !$caught_term); ++} while ($daemon && !$result && !$caught_term && !$caught_kill); + +-warning("caught SIGTERM; exiting") if $caught_term; ++warning("caught SIGKILL; exiting") if $caught_kill; + unlink_pid(); + sendmail(); + From cb4b18e620a28c43a422901044f31031b50cb827 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 19 Feb 2008 15:01:04 +0000 Subject: [PATCH 128/231] Patch modified to apply on ddclient 3.7.3 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@85 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/eurodns.patch | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/svn/patches/eurodns.patch b/svn/patches/eurodns.patch index ced8da3..5d542cc 100644 --- a/svn/patches/eurodns.patch +++ b/svn/patches/eurodns.patch @@ -1,7 +1,23 @@ -2252a2253,2254 -> #my $url = "http://$config{$h}{'server'}/nic/update?system="; -> -2253a2256,2258 -> if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { #hack for EuroDynDNS -> $url = "http://$config{$h}{'server'}/update/?system="; -> } +# +# patch created with `svn diff -r83 . > patches/eurodns` +# on Tue Feb 19 15:57:27 CET 2008 +# +# This patch is based on the original patch from patch #1668836 +# It's currently not applied to subversion version of ddclient +# +Index: ddclient +=================================================================== +--- ddclient (revision 83) ++++ ddclient (working copy) +@@ -2303,6 +2303,11 @@ + + ## Select the DynDNS system to update + my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ # hack for EuroDynDNS ++ if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { ++ $url = "http://$config{$h}{'server'}/update/?system="; ++ } ++ + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; From 751664bb66f8b2e5a04177a2e73a870222a7c499 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 19 Feb 2008 15:01:04 +0000 Subject: [PATCH 129/231] Patch modified to apply on ddclient 3.7.3 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@85 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/eurodns.patch | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/patches/eurodns.patch b/patches/eurodns.patch index ced8da3..5d542cc 100644 --- a/patches/eurodns.patch +++ b/patches/eurodns.patch @@ -1,7 +1,23 @@ -2252a2253,2254 -> #my $url = "http://$config{$h}{'server'}/nic/update?system="; -> -2253a2256,2258 -> if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { #hack for EuroDynDNS -> $url = "http://$config{$h}{'server'}/update/?system="; -> } +# +# patch created with `svn diff -r83 . > patches/eurodns` +# on Tue Feb 19 15:57:27 CET 2008 +# +# This patch is based on the original patch from patch #1668836 +# It's currently not applied to subversion version of ddclient +# +Index: ddclient +=================================================================== +--- ddclient (revision 83) ++++ ddclient (working copy) +@@ -2303,6 +2303,11 @@ + + ## Select the DynDNS system to update + my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ # hack for EuroDynDNS ++ if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { ++ $url = "http://$config{$h}{'server'}/update/?system="; ++ } ++ + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; From a899e4112710d3e4eeda6f09a51172e3df92de70 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 4 Mar 2008 08:33:41 +0000 Subject: [PATCH 130/231] Added patch which was applied to rev 27 (posted by James deBoer) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@86 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/ddclient.daemon-timeout.patch | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 svn/patches/ddclient.daemon-timeout.patch diff --git a/svn/patches/ddclient.daemon-timeout.patch b/svn/patches/ddclient.daemon-timeout.patch new file mode 100644 index 0000000..ca973d2 --- /dev/null +++ b/svn/patches/ddclient.daemon-timeout.patch @@ -0,0 +1,33 @@ +# +# patch added to revision 28 +# +Index: ddclient +=================================================================== +--- ddclient (revision 27) ++++ ddclient (working copy) +@@ -593,7 +593,7 @@ + usage("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n",ip_strategies_usage())) + unless exists $ip_strategies{lc opt('use')}; + +- $daemon = define($opt{'daemon'}, $globals{'daemon'}); ++ $daemon = $opt{'daemon'}; + $daemon = 0 if opt('force'); + + ## obtain the IP address to use. +@@ -979,9 +979,13 @@ + $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); + + $opt{'timeout'} = 0 if opt('timeout') < 0; +- $opt{'daemon'} = minimum('daemon') +- if define($opt{'daemon'},$globals{'daemon'},0) +- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); ++ ++ ## only set $opt{'daemon'} if it has been explicitly passed in ++ if (define($opt{'daemon'},$globals{'daemon'},0)) { ++ $opt{'daemon'} = interval(opt('daemon')); ++ $opt{'daemon'} = minimum('daemon') ++ if ($opt{'daemon'} < minimum('daemon')); ++ } + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { From 08d827bb5c7e571c2abc331ae407364738ad2a76 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 4 Mar 2008 08:33:41 +0000 Subject: [PATCH 131/231] Added patch which was applied to rev 27 (posted by James deBoer) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@86 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/ddclient.daemon-timeout.patch | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 patches/ddclient.daemon-timeout.patch diff --git a/patches/ddclient.daemon-timeout.patch b/patches/ddclient.daemon-timeout.patch new file mode 100644 index 0000000..ca973d2 --- /dev/null +++ b/patches/ddclient.daemon-timeout.patch @@ -0,0 +1,33 @@ +# +# patch added to revision 28 +# +Index: ddclient +=================================================================== +--- ddclient (revision 27) ++++ ddclient (working copy) +@@ -593,7 +593,7 @@ + usage("invalid argument '-use %s'; possible values are:\n%s", $opt{'use'}, join("\n",ip_strategies_usage())) + unless exists $ip_strategies{lc opt('use')}; + +- $daemon = define($opt{'daemon'}, $globals{'daemon'}); ++ $daemon = $opt{'daemon'}; + $daemon = 0 if opt('force'); + + ## obtain the IP address to use. +@@ -979,9 +979,13 @@ + $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); + + $opt{'timeout'} = 0 if opt('timeout') < 0; +- $opt{'daemon'} = minimum('daemon') +- if define($opt{'daemon'},$globals{'daemon'},0) +- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); ++ ++ ## only set $opt{'daemon'} if it has been explicitly passed in ++ if (define($opt{'daemon'},$globals{'daemon'},0)) { ++ $opt{'daemon'} = interval(opt('daemon')); ++ $opt{'daemon'} = minimum('daemon') ++ if ($opt{'daemon'} < minimum('daemon')); ++ } + + ## define or modify host options specified on the command-line + if (exists $opt{'options'} && defined $opt{'options'}) { From ded79ea64e60032faca2a0cbc1ac9604dd9d13ae Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 2 Jun 2008 21:10:25 +0000 Subject: [PATCH 132/231] Modified documentation about zoneedit based on the comments from Oren Held git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@87 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- svn/sample-etc_ddclient.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index c0a3db5..9bef661 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -2767,7 +2767,7 @@ Configuration variables applicable to the 'zoneedit1' protocol are: Example ${program}.conf file entries: ## single host update protocol=zoneedit1, \\ - server=www.zoneedit.com, \\ + server=dynamic.zoneedit.com, \\ login=my-zoneedit-login, \\ password=my-zoneedit-password \\ my.domain.name diff --git a/svn/sample-etc_ddclient.conf b/svn/sample-etc_ddclient.conf index fc02218..92eb989 100644 --- a/svn/sample-etc_ddclient.conf +++ b/svn/sample-etc_ddclient.conf @@ -98,7 +98,7 @@ ssl=yes # use ssl-support. Works with ## ## ZoneEdit (zoneedit.com) ## -# server=www.zoneedit.com, \ +# server=dynamic.zoneedit.com, \ # protocol=zoneedit1, \ # login=your-zoneedit-login, \ # password=your-zoneedit-password \ From f2bdafd2a07619bc9e6c31ccfc3e737a6e879425 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 2 Jun 2008 21:10:25 +0000 Subject: [PATCH 133/231] Modified documentation about zoneedit based on the comments from Oren Held git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@87 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- sample-etc_ddclient.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index c0a3db5..9bef661 100755 --- a/ddclient +++ b/ddclient @@ -2767,7 +2767,7 @@ Configuration variables applicable to the 'zoneedit1' protocol are: Example ${program}.conf file entries: ## single host update protocol=zoneedit1, \\ - server=www.zoneedit.com, \\ + server=dynamic.zoneedit.com, \\ login=my-zoneedit-login, \\ password=my-zoneedit-password \\ my.domain.name diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index fc02218..92eb989 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -98,7 +98,7 @@ ssl=yes # use ssl-support. Works with ## ## ZoneEdit (zoneedit.com) ## -# server=www.zoneedit.com, \ +# server=dynamic.zoneedit.com, \ # protocol=zoneedit1, \ # login=your-zoneedit-login, \ # password=your-zoneedit-password \ From 20bfbfbbef5ecaed2c95bbc04c7e66c33847dd20 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 07:04:20 +0000 Subject: [PATCH 134/231] Preventing an error when trying to send a message on mail-failure git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@88 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svn/ddclient b/svn/ddclient index 9bef661..69aa908 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -1403,7 +1403,7 @@ sub logger { sub sendmail { my $recipients = opt('mail'); - if (opt('mail-failure') && ($result ne 'OK' && $result != 0)) { + if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) { $recipients = opt('mail-failure'); } if ($msgs && $recipients && $msgs ne $last_msgs) { From e4856a0adde3ac54ce4ebdb7c2f04a60d0aecf49 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 07:04:20 +0000 Subject: [PATCH 135/231] Preventing an error when trying to send a message on mail-failure git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@88 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 9bef661..69aa908 100755 --- a/ddclient +++ b/ddclient @@ -1403,7 +1403,7 @@ sub logger { sub sendmail { my $recipients = opt('mail'); - if (opt('mail-failure') && ($result ne 'OK' && $result != 0)) { + if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) { $recipients = opt('mail-failure'); } if ($msgs && $recipients && $msgs ne $last_msgs) { From 5fc7106be723c2c7de321099ecb95fb11a8ac90a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 19:10:53 +0000 Subject: [PATCH 136/231] Preventing error while reading cache when ip wasn't set correctly before git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@89 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index 69aa908..d83fb84 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -2026,8 +2026,10 @@ sub nic_updateable { ); $update = 1; - } elsif ($cache{$host}{'ip'} ne $ip) { - if (($cache{$host}{'status'} eq 'good') && !interval_expired($host, 'mtime', 'min-interval')) { + } elsif ((!exists($cache{$host}{'ip'})) || + ("$cache{$host}{'ip'}" ne "$ip")) { + if (($cache{$host}{'status'} eq 'good') && + !interval_expired($host, 'mtime', 'min-interval')) { warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", $host, From 2c82f89c547f8faf6bc212437f0abdc14a580815 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 19:10:53 +0000 Subject: [PATCH 137/231] Preventing error while reading cache when ip wasn't set correctly before git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@89 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index 69aa908..d83fb84 100755 --- a/ddclient +++ b/ddclient @@ -2026,8 +2026,10 @@ sub nic_updateable { ); $update = 1; - } elsif ($cache{$host}{'ip'} ne $ip) { - if (($cache{$host}{'status'} eq 'good') && !interval_expired($host, 'mtime', 'min-interval')) { + } elsif ((!exists($cache{$host}{'ip'})) || + ("$cache{$host}{'ip'}" ne "$ip")) { + if (($cache{$host}{'status'} eq 'good') && + !interval_expired($host, 'mtime', 'min-interval')) { warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", $host, From 5b02058fb898b878a362ceb3d5f222d32aa975e8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 19:33:41 +0000 Subject: [PATCH 138/231] Added more info about the daemon interval git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@90 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/ddclient | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/svn/ddclient b/svn/ddclient index d83fb84..0031866 100755 --- a/svn/ddclient +++ b/svn/ddclient @@ -518,7 +518,7 @@ $variables{'merged'} = merge($variables{'global-defaults'}, my @opt = ( "usage: ${program} [options]", "options are:", - [ "daemon", "=s", "-daemon delay : run as a daemon" ], + [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], [ "server", "=s", "-server host : update DNS information on 'host'" ], [ "protocol", "=s", "-protocol type : update protocol used" ], @@ -1959,7 +1959,8 @@ For example: specifies that ${program} should operate as a daemon, checking the eth0 interface for an IP address change every 5 minutes and use the -'dyndns2' protocol by default. +'dyndns2' protocol by default. The daemon interval can be specified +as seconds (600s), minutes (5m), hours (1h) or days (1d). Host definitions look like: [name=value [,name=value]*]* a.host.domain [,b.host.domain] [login] [password] From 28aae6ba086945c6e641864221394f1f71adbb01 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 5 Jun 2008 19:33:41 +0000 Subject: [PATCH 139/231] Added more info about the daemon interval git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@90 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index d83fb84..0031866 100755 --- a/ddclient +++ b/ddclient @@ -518,7 +518,7 @@ $variables{'merged'} = merge($variables{'global-defaults'}, my @opt = ( "usage: ${program} [options]", "options are:", - [ "daemon", "=s", "-daemon delay : run as a daemon" ], + [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], [ "server", "=s", "-server host : update DNS information on 'host'" ], [ "protocol", "=s", "-protocol type : update protocol used" ], @@ -1959,7 +1959,8 @@ For example: specifies that ${program} should operate as a daemon, checking the eth0 interface for an IP address change every 5 minutes and use the -'dyndns2' protocol by default. +'dyndns2' protocol by default. The daemon interval can be specified +as seconds (600s), minutes (5m), hours (1h) or days (1d). Host definitions look like: [name=value [,name=value]*]* a.host.domain [,b.host.domain] [login] [password] From f453209e8236cd194c39d7bd5e59e4d284b6ab7c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 19:54:45 +0000 Subject: [PATCH 140/231] Moved old html directory to new location git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@91 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- html/ddclient.css | 299 ------------------------------- html/doc.php | 144 --------------- html/faq.php | 42 ----- html/home.php | 145 --------------- html/index.php | 208 ---------------------- html/protocol.php | 344 ------------------------------------ html/router.php | 73 -------- html/sinorca-print.css | 143 --------------- html/sinorca-screen-alt.css | 300 ------------------------------- html/sinorca-screen.css | 296 ------------------------------- html/todo.txt | 4 - html/xml.php | 19 -- 12 files changed, 2017 deletions(-) delete mode 100644 html/ddclient.css delete mode 100644 html/doc.php delete mode 100644 html/faq.php delete mode 100644 html/home.php delete mode 100644 html/index.php delete mode 100644 html/protocol.php delete mode 100644 html/router.php delete mode 100644 html/sinorca-print.css delete mode 100644 html/sinorca-screen-alt.css delete mode 100644 html/sinorca-screen.css delete mode 100644 html/todo.txt delete mode 100644 html/xml.php diff --git a/html/ddclient.css b/html/ddclient.css deleted file mode 100644 index bcd68be..0000000 --- a/html/ddclient.css +++ /dev/null @@ -1,299 +0,0 @@ -/************************************* - * TITLE: Sinorca Screen Stylesheet * - * URI : sinorca/sinorca-screen.css * - * MODIF: 2003-Apr-30 19:31 +0800 * - *************************************/ - - -/* ##### Common Styles ##### */ - -body { - color: black; - background-color: rgb(153,153,153); - font-family: verdana, helvetica, arial, sans-serif; - font-size: 71%; /* Enables font size scaling in MSIE */ - margin: 0; - padding: 0; -} - -html > body { - font-size: 8.5pt; -} - -acronym, .titleTip { - border-bottom: 1px dotted rgb(153,153,153); - cursor: help; - margin: 0; - padding: 0 0 0.4px 0; -} - -.doNotDisplay { - display: none; -} - -.smallCaps { - font-size: 110%; - font-variant: small-caps; -} - - -/* ##### Header ##### */ - -.superHeader { - color: white; - background-color: rgb(100,135,220); - height: 2em; -} - -.superHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-size: 91%; - margin: 0; - padding: 0 0.5ex 0 0.25ex; -} - -.superHeader a:hover { - text-decoration: underline; -} - -.superHeader .left { - position: absolute; - left: 1.5mm; - top: 0.75ex; -} - -.superHeader .right { - position: absolute; - right: 1.5mm; - top: 0.75ex; -} - -.midHeader { - color: rgb(255,255,102); - background-color: rgb(0,0,255); -} - -.headerTitle { - font-size: 337%; - font-weight: normal; - margin: 0 0 0 4mm; - padding: 0.25ex 0; -} - -.subHeader { - color: white; - background-color: rgb(0,51,153); - margin: 0; - padding: 1ex 1ex 1ex 1.5mm; -} - -.subHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 0 0.75ex 0 0.5ex; -} - -.subHeader a:hover { - text-decoration: underline; -} - -.superHeader .highlight, .subHeader .highlight { - color: rgb(253,160,91); - background-color: transparent; -} - - -/* ##### Side Bar ##### */ - -#side-bar { - width: 15em; - float: left; - clear: left; - border-right: 1px solid rgb(153,153,153); -} - -#side-bar div { - border-bottom: 1px solid rgb(153,153,153); -} - -.sideBarTitle { - font-weight: bold; - margin: 0 0 0.5em 2.5mm; - padding: 1em 0 0 0; -} - -#side-bar ul { - list-style-type: none; - list-style-position: outside; - margin: 0; - padding: 0 0 1.1em 0; -} - -#side-bar li { - margin: 0; - padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ -} - -#side-bar a, .thisPage { - color: rgb(51,51,204); - background-color: transparent; - text-decoration: none; - margin: 0; - padding: 0.75em 1ex 0.75em 5mm; - display: block; -} - -.thisPage { - color: black; - background-color: white; - padding-left: 4mm; - border-top: 1px solid rgb(153,153,153); - border-bottom: 1px solid rgb(153,153,153); -} - -#side-bar a:hover { - color: white; - background-color: rgb(0,0,255); - text-decoration: none; -} - -.sideBarText { - line-height: 1.5em; - margin: 0 0 1em 0; - padding: 0 1.5ex 0 2.5mm; - display: block; -} - -#side-bar .sideBarText a { - text-decoration: underline; - margin: 0; - padding: 0; - display: inline; -} - -#side-bar .sideBarText a:hover { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; -} - -.lighterBackground { - color: inherit; - background-color: rgb(204,204,204) -} - - -/* ##### Main Copy ##### */ - -#main-copy { - color: black; - background-color: white; - background-color: rgb(255,255,204); - - - text-align: justify; - line-height: 1.5em; - margin: 0 0 0 15em; - padding: 0.5mm 5mm 5mm 5mm; - border-left: 1px solid rgb(153,153,153); -} - -#main-copy .code { -border: 1px solid; -background: white; - padding: 0.5mm 0.5mm 0.5mm 5mm; -} - -#main-copy p { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -#main-copy a { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: underline; -} - -#main-copy a:hover { - text-decoration: none; -} - -#main-copy h1 { - color: white; - background-color: rgb(255,0,0); - - font-size: 100%; - font-weight: bold; - margin: 3em 0 0 0; - padding: 0.5ex 0 0.5ex 1ex; -} - -#main-copy .topOfPage { - color: white; - background-color: transparent; - font-size: 91%; - font-weight: bold; - text-decoration: none; - margin: 2.5ex 1ex 0 0; /* For MSIE */ - padding: 0; - float: right; -} - -#main-copy > .topOfPage { - margin: 2.75ex 1ex 0 0; /* For fully standards-compliant user agents */ -} - -dl { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0 0 0 0; - padding: 0; -} - -dd { - margin: 0 0 2em 2em; - padding: 0; -} - - -/* ##### Footer ##### */ - -#footer { - color: rgb(255,255,151); - background-color: rgb(0,0,255); - font-size: 91%; - margin: 0; - padding: 1em 2.5mm 2.5ex 2.5mm; - clear: both; -} - -#footer .left { - line-height: 1.45em; - float: left; - clear: left; -} - -#footer .right { - text-align: right; - line-height: 1.45em; -} - -#footer a { - color: white; - background-color: transparent; - text-decoration: underline; -} - -#footer a:hover { - text-decoration: none; -} \ No newline at end of file diff --git a/html/doc.php b/html/doc.php deleted file mode 100644 index d29ffd6..0000000 --- a/html/doc.php +++ /dev/null @@ -1,144 +0,0 @@ -\n" . - "This page describes the configuration for ddclient. If you need\n". - "anymore info about supported routers or supported protocols, check the\n" . - "other pages. Other options are described here.\n" . - "\n" . - "

    Normally you don't need many arguments when starting ddclient. " . - "You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" \n" . - "which should be enough for most configuration. You can put all the needed\n" . - "parameters in the configuration file.\n" . - "

    \n" . - "

    " . - "\n" . - "\n" . - "\n" . - "\n" . - "

    \n" ; -$main[] = $text; - -$text['id'] = "usage"; -$text['title'] = "Usage"; -$text['menu'] = "usage"; -$text['body'] = - "usage: ddclient [options]
    \n". - "options are:
    \n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "" . - "\n" . - "\n" . - - "\n" . - "\n" . - - "\n" . - "\n" . - - "\n" . - "\n" . - "\n" . - "\n" . - - "\n" . - "\n" . - - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
    -daemon delay run as a daemon (default: 0).
    -proxy host use 'host' as the HTTP proxy.
    -server host update DNS information on 'host' (default: members.dyndns.org).
    -protocol type update protocol used (default: dyndns2).
    -file path load configuration information from 'path' (default: /etc/ddclient/ddclient.conf).
    -cache path record address used in 'path' (default: /etc/ddclient/ddclient.cache).
    -pid path record process id in 'path'.
    -use which how the should IP address be obtained. (default: ip). \n" . - " More information about the possible use-arguments can be found on \n" . - " the supported routers page
    -ip address set the IP address to 'address'.
    -postscript script run 'script' after updating.
    -if interface obtain IP address from 'interface' (default: ppp0).
    -if-skip pattern skip any IP addresses before 'pattern' in the output of ifconfig {if}.
    -web provider|url obtain IP address from provider's IP checking page (default: dyndns).
    -web-skip pattern skip any IP addresses before 'pattern' on the web provider|url.
    -fw address|url obtain IP address from firewall at 'address'.
    -fw-skip pattern skip any IP addresses before 'pattern' on the firewall address|url.
    -fw-login login use 'login' when getting IP from fw.
    -fw-password secret use password 'secret' when getting IP from fw.
    -cmd program obtain IP address from by calling {program}.
    -cmd-skip pattern skip any IP addresses before 'pattern' in the output of {cmd}.
    -login user login as 'user'.
    -password secret use password 'secret'.
    -host host update DNS information for 'host'.
    -{no}retry retry failed updates. (default: noretry).
    -{no}force force an update even if the update may be unnecessary (default: noforce).
    -timeout max wait at most 'max' seconds for the host to respond (default: 0).
    -{no}syslog log messages to syslog (default: nosyslog).
    -facility {type} log messages to syslog to facility {type} (default: daemon).
    -priority {pri} log messages to syslog with priority {pri} (default: notice).
    -mail address e-mail messages to {address}.
    -mail-failure address e-mail messages for failed updates to {address}.
    -{no}exec do {not} execute; just show what would be done (default: exec).
    -{no}debug print {no} debugging information (default: nodebug).
    -{no}verbose print {no} verbose information (default: noverbose).
    -{no}quiet print {no} messages for unnecessary updates (default: noquiet).
    -help this message (default: 0).
    -{no}query print {no} ip addresses and exit.
    \n" ; - -$main[] = $text; -// config -$text['id'] = "config"; -$text['title'] = "Configuring ddclient"; -$text['menu'] = "config"; -$text['body'] = - "

    \n" . - "The configuration file, ddclient.conf, can be used to define the \n" . - "default behaviour and operation of ddclient. The file consists of \n" . - "sequences of global variable definitions and host definitions. \n" . - "Since version 3.6.5, ddclient.conf is located by default in \n" . - "/etc/ddclient/ddclient.conf. Another location can be forced \n" . - "by using the -file option" . - "

    \n" . - "

    \n" . - "Global definitions look like: \n" . - "name=value [,name=value]* \n" . - "

    \n" . - "

    \n" . - "Next example \n" . - "specifies that ddclient should operate as a daemon, checking the \n" . - "eth0 interface for an IP address change every 5 minutes and use the \n" . - "'dyndns2' protocol by default. \n" . - "

    \n" . - "
    \n" .
    -  	"daemon=600                   \n" .
    -  	"use=if, if=eth0              \n" .
    -  	"proxy=proxy.myisp.com        \n" .
    -  	"protocol=dyndns2 \n" .
    -	"
    \n" . - "
    ". - "

    \n" . - "

    Host definitions look like: \n" . - "[name=value [,name=value]*]* a.host.domain [,b.host.domain] [login] [password] \n" . - "

    \n" . - "Next example specifies two host definitions. \n" . - "The first definition will use the hammernode1 protocol, \n" . - "my-hn-login and my-hn-password to update the ip-address of \n" . - "myhost.hn.org and my2ndhost.hn.org. \n" . - "

    \n" . - "The second host definition will use the current default protocol \n" . - "('dyndns2'), my-login and my-password to update the ip-address of \n" . - "myhost.dyndns.org and my2ndhost.dyndns.org. \n" . - "

    \n" . - "The order of this sequence is significant because the values of any \n" . - "global variable definitions are bound to a host definition when the \n" . - "host definition is encountered. \n" . - "

    \n" . - "

    \n" . - "
    \n" .
    -  	"protocol=hammernode1, \ \n" .
    -  	"login=my-hn-login, password=my-hn-password  myhost.hn.org \n" .
    -  	"login=my-login, password=my-password  myhost.dyndns.org,my2nd.dyndns.org \n" .
    -	"
    \n" . - "
    ". - "

    See the sample-ddclient.conf file for further examples.

    \n" ; - -$main[] = $text; -?> diff --git a/html/faq.php b/html/faq.php deleted file mode 100644 index 2a3ef16..0000000 --- a/html/faq.php +++ /dev/null @@ -1,42 +0,0 @@ - - Ddclient doesn't check the dns result when it tries to update. - It checks its cache file an when value saved in the cache - differs from the result it got, it does an update. So if - you want to force an update, you could do it this way: -
      -
    • stop the normal instance of ddclient
    • -
    • force a value by running ddclient -use=ip -ip=1.2.3.4 -daemon=0
    • -
    • start the normal instance of ddclient
    • -
    - This way, ddclient changes its cache and will see an changed IP - adres. -

    \n"; - $main[] = $text; -/* - $text['id'] = "nonrouter"; - $text['title'] = "Non router option"; - $text['menu'] = "Non router"; - $text['body'] = - "" . - "\n" . - "" . - "\n" . - "" . - "" . - "
    -use=web obtain IP from an IP discovery page on the web. This is the default way if none is specified
    -use=if obtain IP from the -if {interface}.
    -use=ip obtain IP from -ip {address}.
    -use=cmd obtain IP from the -cmd {external-command}.
    -use=fw obtain IP from the firewall specified by -fw {type|address}.
    "; - $main[] = $text; -*/ -?> diff --git a/html/home.php b/html/home.php deleted file mode 100644 index 4775e58..0000000 --- a/html/home.php +++ /dev/null @@ -1,145 +0,0 @@ -" . - "Ddclient is a Perl client used to update dynamic DNS entries for accounts " . - "on Dynamic DNS Network Services' free DNS service. It was origanally " . - "written by Paul Burry and is now maintaned by ".$link['developers'].". " . - "It has the capability to update more than only " . - "dyndns and it can fetch your WAN-ipaddress on a few different ways. Check the " . - "configuration pages to find how to do this." . - "

    \n" . - "

    \n" . - "According to cudeso.be:
    " . - "DDclient is a small but full featured client requiring only Perl " . - "and no additional modules. It runs under most UNIX OSes and has " . - "been tested under GNU/Linux and FreeBSD. 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." . - "

    "; -$main[] = $text; - -// install -$text['id'] = "install"; -$text['title'] = "How to install"; -$text['menu'] = "Quick Installation"; -$text['body'] = - "

    \n -Ddclient doesn't have any automatic installation procedure. Get the tar-file -from " . $link['download'] . " and untar it. Copy the perl script to your -favorit location (ex. /usr/sbin) and create a /etc/ddclient/ddclient.conf -configuration file. If you want the bleeding edge of ddclient, you can get -the subversion-version using -

     svn co https://svn.sourceforge.net/svnroot/ddclient/trunk/svn ddclient
    -

    -There are a few configuration examples provided which you can copy to -/etc/ddclient/ddclient.conf and modify. More info about the configuration -can be found on the usage page. There's also -a sample configuration delivered with ddclient. -

    -

    -A typical configuration like: -

    -
    -#
    -# /etc/ddclient/ddclient.conf
    -#
    -protocol=dyndns2
    -use=web
    -login=mylogin
    -password=mypassword
    -myhost.dyndns.org
    -
    -
    -

    -

    -You can run ddclient as "/usr/sbin/ddclient -daemon 300 -syslog" -and put it in your startup scripts. There are samples of startup scripts -provided with ddclient. -

    \n"; -$main[] = $text; - -// help part -$text['id'] = "doc"; -$text['title'] = "Documentation"; -$text['menu'] = "Documentation"; -$text['body'] = " -

    -The documentation about the configuration has been splitted in three -sections. The usage page describes the most parts -of the configuration while the supported protocols -page describes the protocol-specific options. If you want to know how -to use ddclient with your router, check the -supported routers. -

    - -

    -We're currently working on a wiki version of this pages. You can find -them here. -

    - -

    -Debugging ddclient looks pretty hard but it isn't. First try to put \n". - "as less as necessary in your configuration. Try to run \n". - "`./ddclient -daemon=0 -noquiet -debug` and check the result. \n" . - "Try to add the features you need and check it again. Once \n". - "you're happy with the result, run it as a daemon.\n" . - "

    \n" . - "

    \n" . - "If this doesn't work for you, \n". - "there are a few places where you can look for help. If you need \n". - "any help in configuring ddclient, you could try ddclient --help. \n". - "It should give you all the possible configuration options so.\n" . - "

    \n". - "

    \n" . - "If you think your configuration is correct, but ddclient doesn't \n" . - "work as you expected, you can enable debug and verbose messages \n" . - "by running ddclient -daemon=0 -debug -verbose -noquiet.\n". - "

    \n"; -$main[] = $text; -unset ($text); - -$text['id'] = "help"; -$text['title'] = "Getting help"; -$text['menu'] = "Help"; -$text['body'] = " - -

    -Please note: if you are using ubuntu, contact the ubuntu forum -since there are a few differences between ubuntu and the original ddclient -

    -

    -If this doesn't help for you, maybe - -the help forum on sourceforge can bring some help. -If you don't want to register on sf.net, you can try - -the ddclient-support mailinglist on sf.net. -If you're lucky you can find some help on -#ddclient on irc.freenode.net. -Please be a little patient, we're regulary running idle when we're -out there. -

    \n

    " . -"I know the manual is not very clear, you have to read the example\n" . -"configurations included in the tar-file or you can run\n" . -""ddclient --help" to get more help. " . -"

    \n" . -"

    -More info about the ddclient project can be found on " . - $link['project'] . - "

    "; -$main[] = $text; -?> diff --git a/html/index.php b/html/index.php deleted file mode 100644 index ef78dc8..0000000 --- a/html/index.php +++ /dev/null @@ -1,208 +0,0 @@ - - -'. - 'the ddclient project page on sourceforge'; -$link['download'] = ''. - 'sourceforge'."\n"; -$link['developers'] = "developers for ddclient on sourceforge"; - -// Setting debugshit -if (isset($_REQUEST['debug'])) { - $debug = !($_REQUEST['debug'] == 0); -} else if (isset($_SESSION['debug'])) { - $debug = $_SESSION['debug']; -} else { - $debug = 0; -} -$_SESSION['debug'] = $debug; - -// pages information; should be in a database - - -define('HOME', 0); -define('USAGE', 1); -define('PROTOCOL',2); -define('ROUTER', 3); -define('FAQ', 4); -define('XML', 5); - -// main -$pages[HOME]['nr'] = HOME; -$pages[HOME]['title'] = "home"; -$pages[HOME]['php'] = "home.php"; - -// documentation -$pages[USAGE]['nr'] = USAGE; -$pages[USAGE]['title'] = "usage"; -$pages[USAGE]['php'] = "doc.php"; - -$pages[PROTOCOL]['nr'] = PROTOCOL; -$pages[PROTOCOL]['title'] = "supported protocols"; -$pages[PROTOCOL]['php'] = "protocol.php"; - -$pages[ROUTER]['nr'] = ROUTER; -$pages[ROUTER]['title'] = "supported routers"; -$pages[ROUTER]['php'] = "router.php"; - -$pages[FAQ]['nr'] = FAQ; -$pages[FAQ]['title'] = "faq"; -$pages[FAQ]['php'] = "faq.php"; - -if ($debug) { - $pages[XML]['nr'] = XML; - $pages[XML]['title'] = "xml"; - $pages[XML]['php'] = "xml.php"; -} - - -$curpage = isset($_GET['page'])?$_GET['page']:0; -$titleextra = $pages[$curpage]['title']; -$page = $pages[$curpage]['nr']; - -require($pages[$page]['php']); - -?> - - - - - - - - - - <?php echo "$title $titleextra" ?> - - - - - - - - - - - - - - - - -
    - ^ TOP\n"); - printf("

    %s

    \n",$text['id'],$text['title']); - printf("%s\n",$text['body']); - } -?> -
    - - - - - - diff --git a/html/protocol.php b/html/protocol.php deleted file mode 100644 index 2984718..0000000 --- a/html/protocol.php +++ /dev/null @@ -1,344 +0,0 @@ -". - "This is an incomplete list of the services supported by ddclient. ". - "If your favoriet dynamic dns provider isn't here, check the result " . - "ddclient --help with the most recent version of ddclient. If it's " . - "there, check the patches section on sf.net and if it's really not " . - "supported by ddclient you can try to modify ddclient yourself. " . - "

    " . - "

    -Since ddclient version 3.7, ddclient also supports https to update -your favorit provider. Use the ssl=yes option to use this feature. -

    "; - - $main[] = $text; -// dnspark -$text['id'] = "dnspark"; -$text['title'] = "dnspark protocol"; -$text['menu'] = "dnspark"; -$text['body'] = - "

    The 'dnspark' protocol is used by DNS service offered by www.dnspark.com.

    \n ". - "

    Configuration variables applicable to the 'dsnpark' protocol are:

    \n ". - "\n" . - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "\n". - "
    protocol=dnspark
    server=fqdn.of.service defaults to www.dnspark.com
    backupmx=no|yes indicates that DNSPark should be the secondary MX " . - "for this domain or host.
    mx=any.host.domain a host MX'ing for this host or domain.
    mxpri=priority MX priority.
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    \n" . - "
    \n" . - "
    \n" .
    -  	"## single host update\n" .
    -  	"protocol=dnspark,                                         \\\n" .
    -  	"login=my-dnspark.com-login,                               \\\n" .
    -  	"password=my-dnspark.com-password                          \\\n" .
    -  	"myhost.dnspark.com \n" .
    -	"\n" .
    -  	"## multiple host update with wildcard'ing mx, and backupmx\n" .
    -  	"protocol=dnspark,                                         \\\n" .
    -  	"login=my-dnspark.com-login,                               \\\n" .
    -  	"password=my-dnspark.com-password,                         \\\n" .
    -  	"mx=a.host.willing.to.mx.for.me,                           \\\n" .
    -  	"mxpri=10,                                                 \\\n" .
    -  	"my-toplevel-domain.com,my-other-domain.com\n" .
    -	"\n" .
    -  	"## multiple host update to the custom DNS service\n" .
    -  	"protocol=dnspark,                                         \\\n" .
    -  	"login=my-dnspark.com-login,                               \\\n" .
    -  	"password=my-dnspark.com-password                          \\\n" .
    -  	"my-toplevel-domain.com,my-other-domain.com\n" .
    -	"
    \n" . - "
    \n" ; - -$main[] = $text; -// dslreports -$text['id'] = "dslreports"; -$text['title'] = "dslreports"; -$text['menu'] = "dslreports"; -$text['body'] = -"

    The 'dslreports1' protocol is used by a free DSL monitoring service\n" . -"offered by www.dslreports.com.

    \n" . - -"

    Configuration variables applicable to the 'dslreports1' protocol are:

    - - - - - - -
    protocol=dslreports1
    server=fqdn.of.service defaults to www.dslreports.com
    login=service-login login name and password registered with the service
    password=service-password
    unique-number the host registered with the service.
    - -

    Example ddclient.conf file entries:

    " . - "
    \n" . - "
    \n" .
    -  "## single host update\n" .
    -  "protocol=dslreports1,                                     \\\n" .
    -  "server=www.dslreports.com,                                \\\n" .
    -  "login=my-dslreports-login,                                \\\n" .
    -  "password=my-dslreports-password                           \\\n" .
    -  "123456\n" .
    -"
    \n" . -"
    \n" . - -"

    Note: DSL Reports uses a unique number as the host name. This number\n" . -"can be found on the Monitor Control web page.

    \n" ; -$main[] = $text; -$text['id'] = "dyndns1"; -$text['title'] = "dyndns1"; -$text['menu'] = "dyndns1"; -$text['body'] = -"

    The 'dyndns1' protocol is a deprecated protocol used by the free dynamic \n". -"DNS service offered by www.dyndns.org. The 'dyndns2' should be used to \n". -"update the www.dyndns.org service. However, other services are also \n". -"using this protocol so support is still provided by ddclient.

    \n". -" \n". -"

    Configuration variables applicable to the 'dyndns1' protocol are:

    \n". -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . -"
    protocol=dyndns1
    server=fqdn.of.service defaults to members.dyndns.org
    backupmx=no|yes indicates that this host is the primary MX for the domain.
    mx=any.host.domain a host MX'ing for this host definition.
    wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    " . - "
    \n" . - "
    \n" .
    -  "## single host update\n" . 
    -  "protocol=dyndns1,                                         \\\n" . 
    -  "login=my-dyndns.org-login,                                \\\n" . 
    -  "password=my-dyndns.org-password                           \\\n" . 
    -  "myhost.dyndns.org \n" . 
    -"\n" . 
    -  "## multiple host update with wildcard'ing mx, and backupmx\n" . 
    -  "protocol=dyndns1,                                         \\\n" . 
    -  "login=my-dyndns.org-login,                                \\\n" . 
    -  "password=my-dyndns.org-password,                          \\\n" . 
    -  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" . 
    -  "myhost.dyndns.org,my2ndhost.dyndns.org \n" . 
    -	"
    \n" . - "
    \n" . - "

    Note: you only need one of the examples

    \n"; - -$main[] = $text; -// dyndns2 -$text['id'] = "dyndns2"; -$text['title'] = "dyndns2"; -$text['menu'] = "dyndns2"; -$text['body'] = -"

    The 'dyndns2' protocol is a newer low-bandwidth protocol used by a\n" . -"free dynamic DNS service offered by www.dyndns.org. It supports\n" . -"features of the older 'dyndns1' in addition to others. [These will be\n" . -"supported in a future version of ddclient.]

    \n" . -"\n". -"

    Configuration variables applicable to the 'dyndns2' protocol are:

    \n" . -"\n". - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . -"
    protocol=dyndns2
    server=fqdn.of.service defaults to members.dyndns.org
    backupmx=no|yes indicates that this host is the primary MX for the domain.
    static=no|yes indicates that this host has a static IP address.
    custom=no|yes indicates that this host is a 'custom' top-level domain name.
    mx=any.host.domain a host MX'ing for this host definition.
    wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    " . - "
    \n" . - "
    \n" .
    -  "## single host update\n" .
    -  "protocol=dyndns2,                                         \\\n" .
    -  "login=my-dyndns.org-login,                                \\\n" .
    -  "password=my-dyndns.org-password                           \\\n" .
    -  "myhost.dyndns.org \n" .
    -"\n" .
    -  "## multiple host update with wildcard'ing mx, and backupmx\n" .
    -  "protocol=dyndns2,                                         \\\n" .
    -  "login=my-dyndns.org-login,                                \\\n" .
    -  "password=my-dyndns.org-password,                          \\\n" .
    -  "mx=a.host.willing.to.mx.for.me,backupmx=yes,wildcard=yes  \\\n" .
    -  "myhost.dyndns.org,my2ndhost.dyndns.org \n" .
    -"\n" .
    -  "## multiple host update to the custom DNS service\n" .
    -  "protocol=dyndns2,                                         \\\n" .
    -  "login=my-dyndns.org-login,                                \\\n" .
    -  "password=my-dyndns.org-password                           \\\n" .
    -  "my-toplevel-domain.com,my-other-domain.com\n" .
    -	"
    \n" . - "
    \n" . - "

    Note: you only need one of the examples

    \n"; - -$main[] = $text; -// easydns -$text['id'] = "easydns"; -$text['title'] = "easydns"; -$text['menu'] = "easydns"; -$text['body'] = -"

    The 'easydns' protocol is used by the for fee DNS service offered \n" . -"by www.easydns.com.

    \n" . - -"

    Configuration variables applicable to the 'easydns' protocol are:

    \n". -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
    protocol=easydns
    server=fqdn.of.service defaults to members.easydns.com
    backupmx=no|yes indicates that EasyDNS should be the secondary MX for this domain or host.
    mx=any.host.domain a host MX'ing for this host or domain.
    wildcard=no|yes add a DNS wildcard CNAME record that points to {host}
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    " . - "
    \n" . - "
    \n" .
    -  "## single host update\n" .
    -  "protocol=easydns,                                         \\\n" .
    -  "login=my-easydns.com-login,                               \\\n" .
    -  "password=my-easydns.com-password                          \\\n" .
    -  "myhost.easydns.com \n" .
    -"\n" .
    -  "## multiple host update with wildcard'ing mx, and backupmx\n" .
    -  "protocol=easydns,                                         \\\n" .
    -  "login=my-easydns.com-login,                               \\\n" .
    -  "password=my-easydns.com-password,                         \\\n" .
    -  "mx=a.host.willing.to.mx.for.me,                           \\\n" .
    -  "backupmx=yes,                                             \\\n" .
    -  "wildcard=yes                                              \\\n" .
    -  "my-toplevel-domain.com,my-other-domain.com\n" .
    -"\n" .
    -  "## multiple host update to the custom DNS service\n" .
    -  "protocol=easydns,                                         \\\n" .
    -  "login=my-easydns.com-login,                               \\\n" .
    -  "password=my-easydns.com-password                          \\\n" .
    -  "my-toplevel-domain.com,my-other-domain.com\n" .
    -  "
    \n" . - "
    \n" . - "

    "; -$main[] = $text; -// hammernode -$text['id'] = "hammernode"; -$text['title'] = "hammernode"; -$text['menu'] = "hammernode"; -$text['body'] = -"

    " . -"The 'hammernode1' protocol is the protocol used by the free dynamic \n" . -"DNS service offered by Hammernode at www.hn.org

    \n" . - -"

    Configuration variables applicable to the 'hammernode1' protocol are:

    \n" . -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
    protocol=hammernode1
    server=fqdn.of.service defaults to members.dyndns.org
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    \n" . - "
    \n" . - "
    \n" .
    -  "## single host update\n" .
    -  "protocol=hammernode1,                                 \\\n" .
    -  "login=my-hn.org-login,                                \\\n" .
    -  "password=my-hn.org-password                           \\\n" .
    -  "myhost.hn.org \n" .
    -"\n" .
    -  "## multiple host update\n" .
    -  "protocol=hammernode1,                                 \\\n" .
    -  "login=my-hn.org-login,                                \\\n" .
    -  "password=my-hn.org-password,                          \\\n" .
    -  "myhost.hn.org,my2ndhost.hn.org\n" .
    -  "
    \n" . - "
    \n" . - ""; - -$main[] = $text; -// namecheap -$text['id'] = "namecheap"; -$text['title'] = "namecheap"; -$text['menu'] = "namecheap"; -$text['body'] = -"

    The 'namecheap' protocol is used by DNS service offered by www.namecheap.com.

    \n" . -"\n" . -"

    Configuration variables applicable to the 'easydns' protocol are:

    \n" . -"\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . -"
    protocol=namecheap
    server=fqdn.of.service defaults to dynamicdns.park-your-domain.com
    login=service-login login name and password registered with the service
    password=service-password
    fully.qualified.host the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    ". - "
    \n" . - "
    \n" .
    -  "## single host update\n" .
    -  "protocol=namecheap,                                         \\\n" .
    -  "login=my-namecheap.com-login,                               \\\n" .
    -  "password=my-namecheap.com-password                          \\\n" .
    -  "myhost.namecheap.com \n" .
    -    "
    \n" . - "
    \n" . - "

    "; - - -$main[] = $text; -$text['id'] = "zoneedit1"; -$text['title'] = "zoneedit1"; -$text['menu'] = "zoneedit1"; -$text['body'] = " -

    The 'zoneedit1' protocol is used by a DNS service offered by -www.zoneedit.com.

    -

    Configuration variables applicable to the 'zoneedit1' -protocol are:

    - - - - - - -
    protocol=zoneedit1
    server=fqdn.of.service defaults to www.zoneedit.com
    login=service-login login name and password registered with the service
    password=service-password
    your.domain.name the host registered with the service.
    \n" . - -"

    Example ddclient.conf file entries:

    \n" . - "
    \n" . - "
    \n" .
    -  "## single host update\n" .
    -  "protocol=zoneedit1,                                     \\\n" .
    -  "server=www.zoneedit.com,                                \\\n" .
    -  "login=my-zoneedit-login,                                \\\n" .
    -  "password=my-zoneedit-password                           \\\n" .
    -  "my.domain.name\n" .
    -  "\n" .
    -  "## multiple host update                                 \\\n" .
    -  "protocol=zoneedit1,                                     \\\n" .
    -  "server=www.zoneedit.com,                                \\\n" .
    -  "login=my-zoneedit-login,                                \\\n" .
    -  "password=my-zoneedit-password                           \\\n" .
    -  "my.domain.name,my2nd.domain.com\n" .
    -    "
    \n" . - "
    \n" . - "

    "; -$main[] = $text; -?> diff --git a/html/router.php b/html/router.php deleted file mode 100644 index df856fa..0000000 --- a/html/router.php +++ /dev/null @@ -1,73 +0,0 @@ -". - "Ddclient can get the needed IP-address on a lot of different\n". - "ways. By default, it fetches it's IP from the internet but \n". - "you can it also from a router or specify it yourself.\n". - "

    \n". - "

    Ddclient supports a lot of different routers. To configure ". - "your favorit router, modify your use-line in your configuration ". - "to something like -use=linksys-ver2. Don't forget to put your ". - "router password and login in the configuration.". - "

    ". - "

    ". - "If your favorit router isn't here, try to run ddclient --help. \n". - "This list is rather incomplete so there are a few more routers \n". - "supported by the most recent version of ddclient. \n". - "

    "; - $main[] = $text; - - $text['id'] = "nonrouter"; - $text['title'] = "Non router option"; - $text['menu'] = "Non router"; - $text['body'] = - "" . - "\n" . - "" . - "\n" . - "" . - "" . - "
    -use=web obtain IP from an IP discovery page on the web. This is the default way if none is specified
    -use=if obtain IP from the -if {interface}.
    -use=ip obtain IP from -ip {address}.
    -use=cmd obtain IP from the -cmd {external-command}.
    -use=fw obtain IP from the firewall specified by -fw {type|address}.
    "; - $main[] = $text; - - $text['title'] = "Incomplete list of supported routers"; - $text['menu'] = "routers"; - $text['body'] = - "". - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "\n" . - "
    -use=3com-3c886a obtain IP from 3com 3c886a 56k Lan Modem at the -fw {address}.
    -use=3com-oc-remote812 obtain IP from 3com OfficeConnect Remote 812 at the -fw {address}.
    -use=alcatel-stp obtain IP from Alcatel Speed Touch Pro at the -fw {address}.
    -use=allnet-1298 obtain IP from Allnet 1298 at the -fw {address}.
    -use=cayman-3220h obtain IP from Cayman 3220-H DSL at the -fw {address}.
    -use=cisco obtain IP from Cisco FW at the -fw {address}.
    -use=dlink-604 obtain IP from D-Link DI-604 at the -fw {address}.
    -use=dlink-614 obtain IP from D-Link DI-614+ at the -fw {address}.
    -use=e-tech obtain IP from E-tech Router at the -fw {address}.
    -use=elsa-lancom-dsl10 obtain IP from ELSA LanCom DSL/10 DSL FW at the -fw {address}.
    -use=elsa-lancom-dsl10-ch01 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
    -use=elsa-lancom-dsl10-ch02 obtain IP from ELSA LanCom DSL/10 DSL FW (isdn ch01) at the -fw {address}.
    -use=linksys obtain IP from Linksys FW at the -fw {address}.
    -use=linksys2 obtain IP from Linksys FW ver 2 at the -fw {address}.
    -use=maxgate-ugate3x00 obtain IP from MaxGate UGATE-3x00 FW at the -fw {address}.
    -use=netgear-rt3xx obtain IP from Netgear FW at the -fw {address}.
    -use=netopia-r910 obtain IP from Netopia R910 FW at the -fw {address}.
    -use=smc-barricade obtain IP from SMC Barricade FW at the -fw {address}.
    -use=sohoware-nbg800 obtain IP from SOHOWare BroadGuard NBG800 at the -fw {address}.
    -use=vigor-2200usb obtain IP from Vigor 2200 USB at the -fw {address}.
    -use=watchguard-soho obtain IP from Watchguard SOHO FW at the -fw {address}.
    -use=xsense-aero obtain IP from Xsense Aero at the -fw {address}.
    ". - "

    Remember, if your router isn't here, check the result of ddclient --help

    "; - $main[] = $text; -?> diff --git a/html/sinorca-print.css b/html/sinorca-print.css deleted file mode 100644 index 619df68..0000000 --- a/html/sinorca-print.css +++ /dev/null @@ -1,143 +0,0 @@ -/************************************ - * TITLE: Sinorca Print Stylesheet * - * URI : sinorca/sinorca-print.css * - * MODIF: 2003-May-01 19:30 +0800 * - ************************************/ -/* - * $Id$ - * - * $LastChangedDate$ - * $Rev$ - * $Author$ - * - * */ - -/* ##### Common Styles ##### */ - -body { - color: black; - background-color: white; - font-family: "times new roman", times, roman, serif; - font-size: 12pt; - margin: 0; - padding: 0; -} - -acronym, .titleTip { - font-style: italic; - border-bottom: none; -} - -acronym:after, .titleTip:after { /* Prints titles after the acronyms/titletips. Doesn't work in MSIE */ - content: "(" attr(title) ")"; - font-size: 90%; - font-style: normal; - padding-left: 1ex; -} - -.doNotPrint { - display: none !important; -} - - -/* ##### Header ##### */ - -#header { - margin: 0; - padding: 0; - border-bottom: 1px solid black; -} - -.superHeader { - display: none; -} - -.headerTitle { - color: black; - background-color: transparent; - font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; - font-size: 200%; - font-weight: normal; - text-decoration: none; - margin: 0; - padding: 0 0 0.5ex 0; -} - -.subHeader { - display: none; -} - - -/* ##### Side Bar ##### */ - -#side-bar { - display: none; -} - - -/* ##### Main Copy ##### */ - -#main-copy { - text-align: justify; - margin: 0; - padding: 0; -} - -#main-copy h1 { - font-family: "trebuchet ms", verdana, helvetica, arial, sans-serif; - font-size: 120%; - margin: 2ex 0 1ex 0; - padding: 0; -} - -#main-copy a { - color: black; - background-color: transparent; - text-decoration: none; -} - -#main-copy a:after { /* Prints the links' URIs after the links' texts. Doesn't work in MSIE */ - content: "<" attr(href) ">"; - font-size: 90%; - padding-left: 1ex; -} - -p { - margin: 0 0 2ex 0; - padding: 0; -} - -dl { - margin: 0; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0; - padding: 0 0 1ex 0; -} - -dd { - margin: 0 0 2ex 1.5em; - padding: 0; -} - -.topOfPage { - display: none; -} - - -/* ##### Footer ##### */ - -#footer { - margin: 2em 0 0 0; - padding: 1ex 0 0 0; - border-top: 1px solid black; -} - -#footer a { - color: black; - background-color: transparent; - text-decoration: none; -} diff --git a/html/sinorca-screen-alt.css b/html/sinorca-screen-alt.css deleted file mode 100644 index 73c2a34..0000000 --- a/html/sinorca-screen-alt.css +++ /dev/null @@ -1,300 +0,0 @@ -/*********************************************** - * TITLE: Sinorca Alterative Screen Stylesheet * - * URI : sinorca/sinorca-screen-alt.css * - * MODIF: 2003-May-13 18:48 +0800 * - ***********************************************/ -/* - * $Id$ - * - * $LastChangedDate$ - * $Rev$ - * $Author$ - * - * */ - - -/* ##### Common Styles ##### */ - -body { - color: black; - background-color: white; - font-family: verdana, helvetica, arial, sans-serif; - font-size: 71%; /* Enables font size scaling in MSIE */ - margin: 0; - padding: 0; -} - -html > body { - font-size: 8.5pt; -} - -acronym, .titleTip { - border-bottom: 1px dotted rgb(153,153,153); - cursor: help; - margin: 0; - padding: 0 0 0.4px 0; -} - -.doNotDisplay { - display: none; -} - -.smallCaps { - font-size: 110%; - font-variant: small-caps; -} - - -/* ##### Header ##### */ - -.superHeader { - color: white; - background-color: rgb(100,135,220); - height: 2em; -} - -.superHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-size: 91%; - margin: 0; - padding: 0 0.5ex 0 0.25ex; -} - -.superHeader a:hover { - text-decoration: underline; -} - -.superHeader .left { - position: absolute; - left: 1.5mm; - top: 0.75ex; -} - -.superHeader .right { - position: absolute; - right: 1.5mm; - top: 0.75ex; -} - -.midHeader { - color: rgb(39,78,144); - background-color: rgb(140,170,230); -} - -.headerTitle { - font-size: 337%; - font-weight: normal; - margin: 0 0 0 4mm; - padding: 0.25ex 0; -} - -.subHeader { - color: white; - background-color: rgb(0,51,153); - margin: 0; - padding: 1ex 1ex 1ex 1.5mm; -} - -.subHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 0 0.75ex 0 0.5ex; -} - -.subHeader a:hover { - text-decoration: underline; -} - -.superHeader .highlight, .subHeader .highlight { - color: rgb(253,160,91); - background-color: transparent; -} - - -/* ##### Side Boxes ##### */ - -#side-bar { - width: 14em; - margin: 2.5em 0 0 1.25mm; - float: left; - clear: left; -} - -body > #side-bar { - margin-left: 2.5mm; /* Circumvents a rendering bug in MSIE (6.0) */ -} - -.sideBarTitle { - color: white; - background-color: rgb(100,135,220); - font-weight: bold; - margin: 0; - padding: 0.4ex 0 0.4ex 0.6ex; -} - -#side-bar ul { - list-style-type: none; - list-style-position: outside; - margin: 0; - padding: 0 0 2.25em 0; -} - -#side-bar li { - margin: 0; - padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE (6.0) */ -} - -#side-bar a, .thisPage { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 1.3ex 2ex; - display: block; -} - -.thisPage { - color: black; - background-color: transparent; -} - -#side-bar a:hover { - color: white; - background-color: rgb(100,135,220); - text-decoration: none; -} - -.sideBarText { - line-height: 1.5em; - margin: 0 0 2.5em 0; - padding: 1ex 0.5ex 0 0.5ex; - display: block; -} - -.sideBarText + .sideBarText { /* Not recognised by MSIE (6.0) */ - margin-top: -1.5em; -} - -#side-bar .sideBarText a { - text-decoration: underline; - font-weight: normal; - margin: 0; - padding: 0; - display: inline; -} - -#side-bar .sideBarText a:hover { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; -} - - -/* ##### Main Copy ##### */ - -#main-copy { - color: black; - background-color: transparent; - text-align: justify; - line-height: 1.5em; - margin: -1em 0 0 15em; - padding: 0.5mm 5mm 5mm 5mm; -} - -#bodyText { - margin: 0 0 0 15.5em; - padding: 2mm 5mm 2mm 5mm; -} - - -#main-copy p { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -#main-copy a { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: underline; -} - -#main-copy a:hover { - text-decoration: none; -} - -#main-copy h1 { - color: rgb(0,102,204); - background-color: transparent; - font-size: 145.5%; - font-weight: bold; - margin: 2em 0 0 0; - padding: 0.5ex 0 0.5ex 0.6ex; - border-bottom: 1px solid rgb(0,102,204); -} - -#main-copy .topOfPage { - color: rgb(0,102,204); - background-color: transparent; - font-size: 91%; - font-weight: bold; - text-decoration: none; - margin: 3ex 1ex 0 0; - padding: 0; - float: right; -} - -dl { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0 0 0 0; - padding: 0; -} - -dd { - margin: 0 0 2em 2em; - padding: 0; -} - - -/* ##### Footer ##### */ - -#footer { - color: white; - background-color: rgb(100,135,220); - font-size: 91%; - margin: 0; - padding: 1em 2.5mm 2.5ex 2.5mm; - clear: both; -} - -#footer .left { - text-align: left; - line-height: 1.45em; - float: left; - clear: left; -} - -#footer .right { - text-align: right; - line-height: 1.45em; -} - -#footer a { - color: white; - background-color: transparent; - text-decoration: underline; -} - -#footer a:hover { - text-decoration: none; -} diff --git a/html/sinorca-screen.css b/html/sinorca-screen.css deleted file mode 100644 index 1c9ee01..0000000 --- a/html/sinorca-screen.css +++ /dev/null @@ -1,296 +0,0 @@ -/************************************* - * TITLE: Sinorca Screen Stylesheet * - * URI : sinorca/sinorca-screen.css * - * MODIF: 2003-Apr-30 19:31 +0800 * - *************************************/ -/* - * $Id$ - * - * $LastChangedDate$ - * $Rev$ - * $Author$ - * - * */ - -/* ##### Common Styles ##### */ - -body { - color: black; - background-color: rgb(240,240,240); - font-family: verdana, helvetica, arial, sans-serif; - font-size: 71%; /* Enables font size scaling in MSIE */ - margin: 0; - padding: 0; -} - -html > body { - font-size: 8.5pt; -} - -acronym, .titleTip { - border-bottom: 1px dotted rgb(153,153,153); - cursor: help; - margin: 0; - padding: 0 0 0.4px 0; -} - -.doNotDisplay { - display: none; -} - -.smallCaps { - font-size: 110%; - font-variant: small-caps; -} - - -/* ##### Header ##### */ - -.superHeader { - color: white; - background-color: rgb(100,135,220); - height: 2em; -} - -.superHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-size: 91%; - margin: 0; - padding: 0 0.5ex 0 0.25ex; -} - -.superHeader a:hover { - text-decoration: underline; -} - -.superHeader .left { - position: absolute; - left: 1.5mm; - top: 0.75ex; -} - -.superHeader .right { - position: absolute; - right: 1.5mm; - top: 0.75ex; -} - -.midHeader { - color: rgb(39,78,144); - background-color: rgb(140,170,230); -} - -.headerTitle { - font-size: 337%; - font-weight: normal; - margin: 0 0 0 4mm; - padding: 0.25ex 0; -} - -.subHeader { - color: white; - background-color: rgb(0,51,153); - margin: 0; - padding: 1ex 1ex 1ex 1.5mm; -} - -.subHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 0 0.75ex 0 0.5ex; -} - -.subHeader a:hover { - text-decoration: underline; -} - -.superHeader .highlight, .subHeader .highlight { - color: rgb(253,160,91); - background-color: transparent; -} - - -/* ##### Side Bar ##### */ - -#side-bar { - width: 15em; - float: left; - clear: left; - border-right: 1px solid rgb(153,153,153); -} - -#side-bar div { - border-bottom: 1px solid rgb(153,153,153); -} - -.sideBarTitle { - font-weight: bold; - margin: 0 0 0.5em 2.5mm; - padding: 1em 0 0 0; -} - -#side-bar ul { - list-style-type: none; - list-style-position: outside; - margin: 0; - padding: 0 0 1.1em 0; -} - -#side-bar li { - margin: 0; - padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ -} - -#side-bar a, .thisPage { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; - margin: 0; - padding: 0.75em 1ex 0.75em 5mm; - display: block; -} - -.thisPage { - color: black; - background-color: white; - padding-left: 4mm; - border-top: 1px solid rgb(153,153,153); - border-bottom: 1px solid rgb(153,153,153); -} - -#side-bar a:hover { - color: white; - background-color: rgb(100,135,220); - text-decoration: none; -} - -.sideBarText { - line-height: 1.5em; - margin: 0 0 1em 0; - padding: 0 1.5ex 0 2.5mm; - display: block; -} - -#side-bar .sideBarText a { - text-decoration: underline; - margin: 0; - padding: 0; - display: inline; -} - -#side-bar .sideBarText a:hover { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; -} - -.lighterBackground { - color: inherit; - background-color: white; -} - - -/* ##### Main Copy ##### */ - -#main-copy { - color: black; - background-color: white; - text-align: justify; - line-height: 1.5em; - margin: 0 0 0 15em; - padding: 0.5mm 5mm 5mm 5mm; - border-left: 1px solid rgb(153,153,153); -} - -#main-copy p { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -#main-copy a { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: underline; -} - -#main-copy a:hover { - text-decoration: none; -} - -#main-copy h1 { - color: white; - background-color: rgb(100,135,220); - font-size: 100%; - font-weight: bold; - margin: 3em 0 0 0; - padding: 0.5ex 0 0.5ex 1ex; -} - -#main-copy .topOfPage { - color: white; - background-color: transparent; - font-size: 91%; - font-weight: bold; - text-decoration: none; - margin: 2.5ex 1ex 0 0; /* For MSIE */ - padding: 0; - float: right; -} - -#main-copy > .topOfPage { - margin: 2.75ex 1ex 0 0; /* For fully standards-compliant user agents */ -} - -dl { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0 0 0 0; - padding: 0; -} - -dd { - margin: 0 0 2em 2em; - padding: 0; -} - - -/* ##### Footer ##### */ - -#footer { - color: white; - background-color: rgb(100,135,220); - font-size: 91%; - margin: 0; - padding: 1em 2.5mm 2.5ex 2.5mm; - clear: both; -} - -#footer .left { - line-height: 1.45em; - float: left; - clear: left; -} - -#footer .right { - text-align: right; - line-height: 1.45em; -} - -#footer a { - color: white; - background-color: transparent; - text-decoration: underline; -} - -#footer a:hover { - text-decoration: none; -} diff --git a/html/todo.txt b/html/todo.txt deleted file mode 100644 index 76ecdd8..0000000 --- a/html/todo.txt +++ /dev/null @@ -1,4 +0,0 @@ -IRC: There are not that much people on irc. Mostly it's just wimpunk and a few bots. It could take a while before you get an answer it it mostly get there. -README: Adding the README's to the html-code -Pastbin: Handy to post your config, doesn't mess up your lines. -STEP BY STEP: Some people need some help on how to use ddclient, maybe it's good to be more detailed. diff --git a/html/xml.php b/html/xml.php deleted file mode 100644 index aeca389..0000000 --- a/html/xml.php +++ /dev/null @@ -1,19 +0,0 @@ -". -"This page is just a test about the xml-functionality. It has \n". -"nothing special.". -"

    "; -$main[] = $text; -?> From 1e5829363fd0d89b86673faa117563c8a4b205ed Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 19:56:44 +0000 Subject: [PATCH 141/231] Removed xml directory from trunk git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@92 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 2c3faf69c73006cb25b4d94eb91ff4b6effc2a75 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:08:38 +0000 Subject: [PATCH 142/231] Added not used no-host patch to patches section git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@93 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/no-host.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/no-host.patch diff --git a/patches/no-host.patch b/patches/no-host.patch new file mode 100644 index 0000000..a5121d3 --- /dev/null +++ b/patches/no-host.patch @@ -0,0 +1,13 @@ +Index: ddclient +=================================================================== +--- ddclient (revision 88) ++++ ddclient (working copy) +@@ -1996,7 +1996,7 @@ + my $sub = shift; + my $update = 0; + +- if ($config{$host}{'login'} eq '') { ++ if (!($config{$host}{'login'})) { + warning("null login name specified for host %s.", $host); + + } elsif ($config{$host}{'password'} eq '') { From 365a1b3598bd380b41184991ba837b9627e00250 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:08:38 +0000 Subject: [PATCH 143/231] Added not used no-host patch to patches section git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@93 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/patches/no-host.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 svn/patches/no-host.patch diff --git a/svn/patches/no-host.patch b/svn/patches/no-host.patch new file mode 100644 index 0000000..a5121d3 --- /dev/null +++ b/svn/patches/no-host.patch @@ -0,0 +1,13 @@ +Index: ddclient +=================================================================== +--- ddclient (revision 88) ++++ ddclient (working copy) +@@ -1996,7 +1996,7 @@ + my $sub = shift; + my $update = 0; + +- if ($config{$host}{'login'} eq '') { ++ if (!($config{$host}{'login'})) { + warning("null login name specified for host %s.", $host); + + } elsif ($config{$host}{'password'} eq '') { From 7d03b7a6a06d76ab3100969f4d4d573c878c8cb8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:11:07 +0000 Subject: [PATCH 144/231] Added some release related files git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@94 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- .cvsignore | 4 ++++ RELEASENOTE | 0 UPGRADE | 0 3 files changed, 4 insertions(+) create mode 100644 .cvsignore create mode 100644 RELEASENOTE create mode 100644 UPGRADE diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..56552e7 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,4 @@ +.svn +patches +release +.cvsignore diff --git a/RELEASENOTE b/RELEASENOTE new file mode 100644 index 0000000..e69de29 diff --git a/UPGRADE b/UPGRADE new file mode 100644 index 0000000..e69de29 From 561fb5bbd8784eff658e816a178cbeafbf89ef97 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:11:07 +0000 Subject: [PATCH 145/231] Added some release related files git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@94 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/.cvsignore | 4 ++++ svn/RELEASENOTE | 0 svn/UPGRADE | 0 3 files changed, 4 insertions(+) create mode 100644 svn/.cvsignore create mode 100644 svn/RELEASENOTE create mode 100644 svn/UPGRADE diff --git a/svn/.cvsignore b/svn/.cvsignore new file mode 100644 index 0000000..56552e7 --- /dev/null +++ b/svn/.cvsignore @@ -0,0 +1,4 @@ +.svn +patches +release +.cvsignore diff --git a/svn/RELEASENOTE b/svn/RELEASENOTE new file mode 100644 index 0000000..e69de29 diff --git a/svn/UPGRADE b/svn/UPGRADE new file mode 100644 index 0000000..e69de29 From 3eb6a3af25c4c40de66fcecb4e8017e5c06136a0 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:21:02 +0000 Subject: [PATCH 146/231] Ignoring test configuration git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk/svn@95 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 9346074251791ea1ebb5f6b84963ddd3773cace3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:21:02 +0000 Subject: [PATCH 147/231] Ignoring test configuration git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@95 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 6fa269d37d6e73829f3750bcf8711c37c18fc0b3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:24:24 +0000 Subject: [PATCH 148/231] Moved old trunk/svn to ddclient and it will be the new trunk git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/ddclient@96 3873ddee-7413-0410-b6c4-c2c57c1ab35a From 34828d3d47b1b6a073efb7fdcb4d708ac74e1479 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 13 Jun 2008 20:24:24 +0000 Subject: [PATCH 149/231] Moved old trunk/svn to ddclient and it will be the new trunk git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@96 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- svn/.cvsignore | 4 - svn/COPYING | 340 -- svn/COPYRIGHT | 19 - svn/Changelog | 304 -- svn/README | 175 - svn/README.cisco | 35 - svn/README.ssl | 10 - svn/RELEASENOTE | 0 svn/TODO | 12 - svn/UPGRADE | 0 svn/ddclient | 3337 ----------------- svn/patches/3com-oc-remote812.patch | 20 - svn/patches/create_patch.sh | 16 - svn/patches/ddclient-noip.patch | 183 - svn/patches/ddclient.daemon-timeout.patch | 33 - svn/patches/debianpatches/abuse_msg.diff | 14 - svn/patches/debianpatches/cachedir.diff | 22 - svn/patches/debianpatches/cisco_fw.diff | 14 - svn/patches/debianpatches/config_path.diff | 14 - svn/patches/debianpatches/daemon_check.diff | 16 - .../debianpatches/daemon_interval.diff | 14 - .../debianpatches/help_nonroot(2).diff | 46 - svn/patches/debianpatches/help_nonroot.diff | 46 - .../debianpatches/ip-up_run-parts.diff | 14 - svn/patches/debianpatches/maxinterval.diff | 14 - svn/patches/debianpatches/readme.txt | 24 - svn/patches/debianpatches/sample_path.diff | 26 - .../debianpatches/smc-barricade-7401bra.patch | 23 - .../debianpatches/smc-barricade-fw-alt.diff | 17 - .../debianpatches/update-new-config.patch | 22 - svn/patches/easydns.patch | 44 - svn/patches/eurodns.patch | 23 - svn/patches/mail-on-kill.patch | 44 - svn/patches/no-host.patch | 13 - svn/patches/opendns.patch | 18 - svn/patches/readme.patch | 24 - svn/patches/regex_vlan.patch | 23 - svn/patches/typo_dnspark.patch | 15 - svn/patches/typo_namecheap_patch.diff.new | 18 - svn/patches/ubuntu/checked_ssl_load.diff | 34 - svn/patches/ubuntu/config_path.diff | 11 - svn/patches/ubuntu/daemon_interval.diff | 11 - svn/patches/ubuntu/default-timeout.patch | 13 - svn/patches/ubuntu/sample_ubuntu.diff | 11 - svn/patches/ubuntu/series | 6 - svn/patches/ubuntu/smc-barricade-fw-alt.diff | 14 - svn/release/readme.txt | 36 - svn/sample-etc_cron.d_ddclient | 17 - svn/sample-etc_ddclient.conf | 160 - svn/sample-etc_dhclient-exit-hooks | 17 - svn/sample-etc_dhcpc_dhcpcd-eth0.exe | 20 - svn/sample-etc_ppp_ip-up.local | 40 - svn/sample-etc_rc.d_init.d_ddclient | 91 - svn/sample-etc_rc.d_init.d_ddclient.lsb | 66 - svn/sample-etc_rc.d_init.d_ddclient.redhat | 41 - svn/sample-etc_rc.d_init.d_ddclient.ubuntu | 47 - 56 files changed, 5671 deletions(-) delete mode 100644 svn/.cvsignore delete mode 100644 svn/COPYING delete mode 100644 svn/COPYRIGHT delete mode 100644 svn/Changelog delete mode 100644 svn/README delete mode 100644 svn/README.cisco delete mode 100644 svn/README.ssl delete mode 100644 svn/RELEASENOTE delete mode 100644 svn/TODO delete mode 100644 svn/UPGRADE delete mode 100755 svn/ddclient delete mode 100644 svn/patches/3com-oc-remote812.patch delete mode 100755 svn/patches/create_patch.sh delete mode 100644 svn/patches/ddclient-noip.patch delete mode 100644 svn/patches/ddclient.daemon-timeout.patch delete mode 100644 svn/patches/debianpatches/abuse_msg.diff delete mode 100644 svn/patches/debianpatches/cachedir.diff delete mode 100644 svn/patches/debianpatches/cisco_fw.diff delete mode 100644 svn/patches/debianpatches/config_path.diff delete mode 100644 svn/patches/debianpatches/daemon_check.diff delete mode 100644 svn/patches/debianpatches/daemon_interval.diff delete mode 100644 svn/patches/debianpatches/help_nonroot(2).diff delete mode 100644 svn/patches/debianpatches/help_nonroot.diff delete mode 100644 svn/patches/debianpatches/ip-up_run-parts.diff delete mode 100644 svn/patches/debianpatches/maxinterval.diff delete mode 100644 svn/patches/debianpatches/readme.txt delete mode 100644 svn/patches/debianpatches/sample_path.diff delete mode 100644 svn/patches/debianpatches/smc-barricade-7401bra.patch delete mode 100644 svn/patches/debianpatches/smc-barricade-fw-alt.diff delete mode 100644 svn/patches/debianpatches/update-new-config.patch delete mode 100644 svn/patches/easydns.patch delete mode 100644 svn/patches/eurodns.patch delete mode 100644 svn/patches/mail-on-kill.patch delete mode 100644 svn/patches/no-host.patch delete mode 100644 svn/patches/opendns.patch delete mode 100644 svn/patches/readme.patch delete mode 100644 svn/patches/regex_vlan.patch delete mode 100644 svn/patches/typo_dnspark.patch delete mode 100644 svn/patches/typo_namecheap_patch.diff.new delete mode 100644 svn/patches/ubuntu/checked_ssl_load.diff delete mode 100644 svn/patches/ubuntu/config_path.diff delete mode 100644 svn/patches/ubuntu/daemon_interval.diff delete mode 100644 svn/patches/ubuntu/default-timeout.patch delete mode 100644 svn/patches/ubuntu/sample_ubuntu.diff delete mode 100644 svn/patches/ubuntu/series delete mode 100644 svn/patches/ubuntu/smc-barricade-fw-alt.diff delete mode 100644 svn/release/readme.txt delete mode 100644 svn/sample-etc_cron.d_ddclient delete mode 100644 svn/sample-etc_ddclient.conf delete mode 100644 svn/sample-etc_dhclient-exit-hooks delete mode 100644 svn/sample-etc_dhcpc_dhcpcd-eth0.exe delete mode 100644 svn/sample-etc_ppp_ip-up.local delete mode 100755 svn/sample-etc_rc.d_init.d_ddclient delete mode 100755 svn/sample-etc_rc.d_init.d_ddclient.lsb delete mode 100755 svn/sample-etc_rc.d_init.d_ddclient.redhat delete mode 100755 svn/sample-etc_rc.d_init.d_ddclient.ubuntu diff --git a/svn/.cvsignore b/svn/.cvsignore deleted file mode 100644 index 56552e7..0000000 --- a/svn/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -.svn -patches -release -.cvsignore diff --git a/svn/COPYING b/svn/COPYING deleted file mode 100644 index 60549be..0000000 --- a/svn/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/svn/COPYRIGHT b/svn/COPYRIGHT deleted file mode 100644 index 57342b6..0000000 --- a/svn/COPYRIGHT +++ /dev/null @@ -1,19 +0,0 @@ -ddclient - update client for www.dyndns.org accounts - -Copyright (C) 1999 Paul Burry (paul@burry.ca) -Copyright (C) 2000 Paul Burry (paul@burry.ca) -Copyright (C) 2001 Paul Burry (paul@burry.ca) - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA diff --git a/svn/Changelog b/svn/Changelog deleted file mode 100644 index ca36ece..0000000 --- a/svn/Changelog +++ /dev/null @@ -1,304 +0,0 @@ -Changelog -3.7.3 - * Changelog moved to more correct ChangeLog - generated by svn2cl --group-by-day -i - See http://tinyurl.com/2fzhc6 - -3.7.2 - * Preventing unitialized values, check - https://sourceforge.net/forum/message.php?msg_id=4167772 - * added a TODO list - * Removed the two empty lines at the end of ddclient - * Applied checked_ssl_load.diff from Ubuntu - * Cosmetic change about checkip - * Changed nic_namecheap_update following the suggestion of edmdude - on the forum (https://sourceforge.net/forum/message.php?msg_id=4316938) - * Applied easydns.patch - * 3com-oc-remote812 patch by The_Beast via IRC. - * Applied eurodns.patch - -3.7.1 - * URL of zoneedit has changed (see bug #1558483) - * Added initscript for Ubuntu (posted by Paolo Martinelli) - * Added patch "Patch: Treat --daemon values as intervals" - (submitted by James deBoer) - * Don't send any mail when in not running daemon mode - (patch submitted by Daniel Thaler) - * Changed Changelog syntax - * Applied patches submitted by Torsten: - abuse_msg.diff: ddclient still reports the email to contact dyndns.org - but they prefer a web form today (IIRC). This patch adjusts the abuse - warning printed by ddclient. - cachedir.diff: Original ddclient stores a cache file in /etc which - would belong in /var/cache in my opinion and according to the FHS. - help_nonroot.diff: Allow calling the help function as non-root. - update-new-config.patch: Force update if config has changed - smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW - firewall - cisco_fw.diff: Use configured hostname for firewall access - with -use=cisco (closes: #345712). Thanks to Per Carlson for the - patch! See http://bugs.debian.org/345712. - maxinterval.diff: Increase max interval for updates. - See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 - http://www.dyndns.com/support/services/dyndns/faq.html#q15 - * Changed max-interval to 25days. See - https://www.dyndns.com/services/dns/dyndns/faq.html - - -3.7.0 -- 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 -- corrected a few writing mistakes -- support for 'NetComm NB3' adsl modem (submitted by crazyprog) -- Added Sitelutions DynDNS, fixed minor Namecheap bug (patch #1346867) - -3.6.6 -- support for olitec-SX200 -- added sample-etc_rc.d_init.d_ddclient.lsb as a sample script for lsb-compliant systems. -- support for linksys wrt854g (thanks to Nick Triantos) -- support for linksys ver 3 -- support for Thomson (Alcatel) SpeedTouch 510 (thanks to Aldoir) -- Cosmetic fixes submitted by John Owens - -3.6.5 -- there was a bug in the linksys-ver2 -- support for postscript (thanks to Larry Hendrickson) -- Changelog out of README -- modified all documentation to use /etc/ddclient/ddclient.conf (notified by nicolasmartin in bug [1070646]) - -3.6.4 -- added support for NameCheap service (thanks to Dan Boardman) -- added support for linksys ver2 (thanks to Dan Perik) - -3.6.3 -- renamed sample-etc_dhclient-enter-hooks to sample-etc_dhclient-exit-hooks -- add support for the Allnet 1298 Router -- add -a to ifconfig to query all interfaces (for Solaris and OpenBSD) -- update the process status to reflect what is happening. -- add a To: line when sending e-mail -- add mail-failure to send mail on failures only -- try all addresses for multihomed hosts (like check.dyndns.org) -- add support for dnspark -- add sample for OrgDNS.org - -3.6.2 -- add support for Xsense Aero -- add support for Alcatel Speedtouch Pro -- do authentication when either the login or password are defined. -- fix parsing of web status pages - -- 3.6 -- add support for EasyDNS (see easydns.com) -- add warning for possible incorrect continuation lines in the .conf file. -- add if-skip with the default as was used before. -- add cmd-skip. - -- 3.5.4 -- added !active result code for DynDNS.org - -- 3.5.2 -- avoid undefined variable in get_ip - -- 3.5.1 -- fix parsing of quoted strings in .conf file -- add filename and line number to any warnings regarding files. - -- 3.5 -- allow any url to be specified for -fw {address|url} - use -fw-skip {pattern} to specify a string preceding the IP address at the URL's page -- allow any url to be specified for -web {address|url} - use -web-skip {pattern} to specify a string preceding the IP address at the URL's page -- modify -test to display any IP addresses that could be obtained from - any interfaces, builtin fw definitions, or web status pages. - -- 3.4.6 (not released) -- fix errors in -help -- allow non-FQDNs as hosts; dslreports requires this. -- handle german ifconfig output -- try to get english messages from ifconfig so other languages are handled too. -- added support for com 3c886a 56k Lan Modem - -- 3.4.5 -- handle french ifconfig output - -- 3.4.4 -- added support for obtaining the IP address from a Cisco DHCP interface. - (Thanks, Tim) - -- 3.4.2 -- update last modified time when nochg is returned from dyndns -- add example regarding fw-login and fw-password's required by some - home routers - -- 3.4.1 -- add option (-pid) to record process id in a file. This option should be - defined in the .conf file as it is done in the sample. -- add detection of SIGHUP. When this signal is received, ddclient will - wake up immediately, reload it's configuration file, and update - the IP addresses if necessary. - -- 3.4 -- ALL PEOPLE USING THIS CLIENT ARE URGED TO UPGRADE TO 3.4 or better. -- fixed several timer related bugs. -- reformatted some messages. - -- 3.3.8 -- added support for the ISDN channels on ELSA LANCOM DSL/10 router - -- 3.3.7 -- suppress repeated identical e-mail messages. - -- 3.3.6 -- added support for the ELSA LANCOM DSL/10 router -- ignore 0.0.0.0 when obtained from any FW/router. - -- 3.3.5 -- fixed sample ddclient.conf. fw-ip= should be fw= -- fixed problem getting status pages for some routers - -- 3.3.4 -- added support for the MaxGate's UGATE-3x00 routers - -- 3.3.3 -- sample* correct checks for private addresses -- add redhat specific sample-etc_rc.d_init.d_ddclient.redhat -- make daemon-mode be the default when named ddclientd -- added support for the Linksys BEF* Internet Routers - -- 3.3.2 -- (sample-etc_rc.d_init.d_ddclient) set COLUMNS to a large number so that - 'ps -aef' will not prematurely truncate the CMD. - -- 3.3 -- added rpm (thanks to Bo Forslund) -- added support for the Netgear RT3xx Internet Routers -- modified sample-etc_rc.d_init.d_ddclient to work with other Unix beside RedHat. -- avoid rewritting the ddclient.cache file unnecessarily -- fixed other minor bugs - -- 3.2.0 -- add support for DynDNS's custom domain service. -- change suggested directory to /usr/sbin - -- 3.1.0 -- clean up; fix minor bugs. -- removed -refresh -- add min-interval to avoid too frequent update attempts. -- add min-error-interval to avoid too frequent update attempts when the - service is unavailable. - -- 3.0.1 -- make all values case sensitive (ie. passwords) - -- 3.0 -- new release! -- new ddclient.conf format -- rewritten to support DynDNS's NIC2 and other dynamic DNS services -- added Hammernode (hn.org) -- added ZoneEdit (zoneedit.com) -- added DSLreports (dslreports.com) host monitoring -- added support for obtaining IP addresses from -- interfaces, -- commands, -- web, -- external commands, -- Watchguard's SOHO router -- Netopia's R910 router -- and SMC's Barracade -- added daemon mode -- added logging msgs to syslog and e-mail - -- 2.3.7 -- add -refresh to the sample scripts so default arguments are obtained from the cache -- added local-ip script for obtaining the address of an interface -- added public-ip script for obtaining the ip address as seen from a public web page - -- 2.3.6 -- fixed bug the broke enabling retrying when members.dyndns.org was down. - -- 2.3.5 -- prevent warnings from earlier versions of Perl. - -- 2.3.4 -- added sample-etc_dhclient-enter-hooks for those using the ISC DHCP client (dhclient) - -- 2.3.3 -- make sure that ddclient.conf is only readable by the owner so that no one -- else can see the password (courtesy of Steve Greenland). --- NOTE: you will need to change the permissions on ddclient.conf to prevent --- others from obtaining viewing your password. --- ie. chmod go-rwx /etc/ddclient.conf - -- 2.3.2 -- make sure 'quiet' messages are printed when -verbose or -debug is enabled -- fix error messages for those people using proxies. - -- 2.3 -- fixed a problem reading in cached entries - - -- 2.2.1 -- sample-etc_ppp_ip-up.local - local ip address is $4 or $PPP_LOCAL (for debian) -- use as the line terminator (some proxies are strict about this) - -- 2.2 -- added support (-static) for updating static DNS (thanks Marc Sira) -- changed ddclient.cache format (old style is still read) -- sample-etc_ppp_ip-up.local - detect improper calling sequences -- sample-etc_ppp_ip-up.local - local ip address is $3 or $PPP_LOCAL (for debian) - -- 2.1.2 -- updated README - -- 2.1.1 -- make sure result code reflects any failures -- optionally (-quiet) omit messages for unnecessary updates -- update sample-etc_cron.d_ddclient to use -quiet - -- 2.1 -- avoid unnecessary updates by recording the last hosts updated in a - cache file (default /etc/ddclient.cache) - -- optionally (-force) force an update, even if it may be unnecessary. - - This can be used to prevent dyndns.org from deleting a host that has not - required an update for a long period of time. - -- optionally (-refresh), reissue all host updates. - - This can be used together with cron to periodically update DynDNS. - See sample-etc-cron.d-ddclient for details. - -- optionally (-retry) save failed updates for future processing. - - This feature can be used to reissue updates that may have failed due to - network connectivity problems or a DynDNS server outage - -------------------------------------------------------------------------------- -$Id$ ------------------------------------------------------------------------- diff --git a/svn/README b/svn/README deleted file mode 100644 index a00cda5..0000000 --- a/svn/README +++ /dev/null @@ -1,175 +0,0 @@ -=============================================================================== -DDCLIENT v3.6.7 - -ddclient is a Perl client used to update dynamic DNS entries for accounts -on many dynamic DNS services. - -IMPORTANT: The format and options used by ddclient have CHANGED. - Please examine the sample configuration file. - It is highly recommended that you take advantage of the - new daemon mode of operation. - -IMPORTANT: The installation location for the ddclient script has changed from - /root/bin/ - to - /usr/sbin/ - -=============================================================================== - -Dynamic DNS services currently supported include: - -DynDNS.com - See http://www.dyndns.com 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: use the forums on - http://sourceforge.net/projects/ddclient/ - -The code was originally written by Paul Burry and is now hosted and maintained -through sourceforge.net. Please check out http://ddclient.sf.net - -------------------------------------------------------------------------------- -REQUIREMENTS: - -- 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 - -------------------------------------------------------------------------------- -INSTALLATION: - - cp ddclient /usr/sbin/ - mkdir /etc/ddclient - mkdir /var/cache/ddclient - cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf - vi /etc/ddclient/ddclient.conf - -- and change hostnames, logins, and passwords appropriately - - ## For those using Redhat style rc files and using daemon-mode: - cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient - ## enable automatic startup when booting - ## check your distribution - /sbin/chkconfig --add ddclient - ## start the first time by hand - /etc/rc.d/init.d/ddclient start - - ## If you are not using daemon-mode, configure cron and dhcp or ppp - ## as described below. - -------------------------------------------------------------------------------- -TROUBLESHOOTING: - - 1. enable debugging and verbose messages. - $ ddclient -daemon=0 -debug -verbose -noquiet - - 2. Do you need to specify a proxy? - If so, just add a - proxy=your.isp.proxy - to the ddclient.conf file. - - 3. Define the IP address of your router with fw=xxx.xxx.xxx.xxx in - /etc/ddclient/ddclient.conf and then try - $ ddclient -daemon=0 -query - to see if the router status web page can be understood. - - 4. Need support for another router/firewall? - Define the router status page yourself with: - fw=url-to-your-router's-status-page - fw-skip=any-string-preceding-your-IP-address - - ddclient does something like this to provide builtin support for - common routers. - For example, the Linksys routers could have been added with: - fw=192.168.1.1/Status.htm - fw-skip=WAN.*?IP Address - - OR - Send me the output from: - $ ddclient -geturl {fw-ip-status-url} [-login login [-password password]] - and I'll add it to the next release! - - ie. for my fw/router I used: - $ ddclient -geturl 192.168.1.254/status.htm - - 5. Some broadband routers require the use of a password when ddclient - accesses its status page to determine the router's WAN IP address. - If this is the case for your router, add - fw-login=your-router-login - fw-password=your-router-password - to the beginning of your ddclient.conf file. - Note that some routers use either 'root' or 'admin' as their login - while some others accept anything. - -------------------------------------------------------------------------------- -USING DDCLIENT WITH ppp - -If you are using a ppp connection, you can easily update your DynDNS -entry with each connection, with: - ## configure pppd to update DynDNS with each connection - cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local - -Alternatively, you may just configure ddclient to operate as a daemon -and monitor your ppp interface. - -------------------------------------------------------------------------------- -USING DDCLIENT WITH cron - -If you have not configured ddclient to use daemon-mode, you'll need to -configure cron to force an update once a month so that the dns entry will -not become stale. - - ## configure cron to force an update twice a month - cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient - vi /etc/cron.d/ddclient - -------------------------------------------------------------------------------- -USING DDCLIENT WITH dhcpcd-1.3.17 - -If you are using dhcpcd-1.3.17 or thereabouts, you can easily update -your DynDNS entry automatically every time your lease is obtained -or renewed by creating an executable file named: - /etc/dhcpc/dhcpcd-{your-interface}.exe -ie.: - cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe - -In my case, it is named dhcpcd-eth0.exe and contains the lines: - #!/bin/sh - PATH=/usr/sbin:/root/bin:${PATH} - logger -t dhcpcd IP address changed to $1 - ddclient -proxy fasthttp.sympatico.ca -wildcard -ip $1 | logger -t ddclient - exit 0 - -Other DHCP clients may have another method of calling out to programs -for updating DNS entries. - -Alternatively, you may just configure ddclient to operate as a daemon -and monitor your ethernet interface. - -------------------------------------------------------------------------------- -USING DDCLIENT WITH dhclient - -If you are using the ISC DHCP client (dhclient), you can update -your DynDNS entry automatically every time your lease is obtained -or renewed by creating an executable file named: - /etc/dhclient-exit-hooks -ie.: - cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks - -Edit /etc/dhclient-exit-hooks to change any options required. - -Alternatively, you may just configure ddclient to operate as a daemon -and monitor your ethernet interface. - -------------------------------------------------------------------------------- -$Id$ diff --git a/svn/README.cisco b/svn/README.cisco deleted file mode 100644 index 2d7e337..0000000 --- a/svn/README.cisco +++ /dev/null @@ -1,35 +0,0 @@ -$Id$ -Method 1 ------------------------------------------------------ - -The following config will allow the Linux machine (10.1.1.2) to read -the IP address from the DHCP interface on the Cisco router (eth0) as -user ddclient. Since ddclient is configured with a priv level of 1 it -cannot do anything except look at the routers stats, ip addresses, -etc. This should be pretty harmless even if ddclient's password were -to be discovered. - -This has been tested with Cisco IOS 12.1(5)T5 running on a Cisco 2621 -router. - -Cisco Router Config (Assuming eth0 is DHCP interface) ------------------------------------------------------ -user ddclient password password -user ddclient priv 1 -ip http auth local -ip http access-class 99 -ip http port 1021 -ip http server -access-list 99 permit host 10.1.1.2 - -DDClient Config ---------------------------------------------------- -use=cisco, fw=10.1.1.1, if=eth0, fw-login=ddclient, fw-password=password - - -Method 2 ------------------------------------------------------ - -use=fw -fw=192.168.1.1/exec/show/interfaces/CR -fw-skip=FastEthernet0/0 -fw-login=ddclient -fw-password=xxxxxxxx diff --git a/svn/README.ssl b/svn/README.ssl deleted file mode 100644 index ba75d93..0000000 --- a/svn/README.ssl +++ /dev/null @@ -1,10 +0,0 @@ -$Id$ - -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.com diff --git a/svn/RELEASENOTE b/svn/RELEASENOTE deleted file mode 100644 index e69de29..0000000 diff --git a/svn/TODO b/svn/TODO deleted file mode 100644 index adf5ed6..0000000 --- a/svn/TODO +++ /dev/null @@ -1,12 +0,0 @@ -* ssl: - - check if the library can be used - - ssl on routers - - ssl on other providers - -* notice about irc: there's almost always someone there but we're sometimes idle -or at work... -* adding router: halted, only in patches section. -* add doc postscript -* FAQ: bad hostname (checkip) -* note about init-scripts. -* request from dyndns: http://tinyurl.com/2l3twf diff --git a/svn/UPGRADE b/svn/UPGRADE deleted file mode 100644 index e69de29..0000000 diff --git a/svn/ddclient b/svn/ddclient deleted file mode 100755 index 0031866..0000000 --- a/svn/ddclient +++ /dev/null @@ -1,3337 +0,0 @@ -#!/usr/bin/perl -w -#!/usr/local/bin/perl -w -###################################################################### -# $Id$ -# -# DDCLIENT - a Perl client for updating DynDNS information -# -# Author: Paul Burry (paul+ddclient@burry.ca) -# ddclient-developers: see https://sourceforge.net/project/memberlist.php?group_id=116817 -# -# website: http://ddclient.sf.net -# -###################################################################### -require 5.004; -use strict; -use Getopt::Long; -use Sys::Hostname; -use IO::Socket; - -my $version = "3.7.3"; -my $programd = $0; -$programd =~ s%^.*/%%; -my $program = $programd; -$program =~ s/d$//; -my $now = time; -my $hostname = hostname(); -my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; -my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; -my $msgs = ''; -my $last_msgs = ''; - -use vars qw($file $lineno); -local $file = ''; -local $lineno = ''; - -$ENV{'PATH'} = (exists($ENV{PATH}) ? "$ENV{PATH}:" : "") . "/sbin:/usr/sbin:/bin:/usr/bin:/etc:/usr/lib:"; - -sub T_ANY {'any'}; -sub T_STRING {'string'}; -sub T_EMAIL {'e-mail address'}; -sub T_NUMBER {'number'}; -sub T_DELAY {'time delay (ie. 1d, 1hour, 1m)'}; -sub T_LOGIN {'login'}; -sub T_PASSWD {'password'}; -sub T_BOOL {'boolean value'}; -sub T_FQDN {'fully qualified host name'}; -sub T_OFQDN {'optional fully qualified host name'}; -sub T_FILE {'file name'}; -sub T_FQDNP {'fully qualified host name and optional port number'}; -sub T_PROTO {'protocol'} -sub T_USE {'ip strategy'} -sub T_IF {'interface'} -sub T_PROG {'program name'} -sub T_IP {'ip'} -sub T_POSTS {'postscript'}; - -## strategies for obtaining an ip address. -my %builtinweb = ( - 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => - 'Current IP Address:', }, - 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, -); -my %builtinfw = ( - 'watchguard-soho' => { - 'name' => 'Watchguard SOHO FW', - 'url' => '/pubnet.htm', - 'skip' => 'NAME=IPAddress VALUE=', - }, - 'netopia-r910' => { - 'name' => 'Netopia R910 FW', - 'url' => '/WanEvtLog', - 'skip' => 'local:', - }, - 'smc-barricade' => { - 'name' => 'SMC Barricade FW', - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, - 'smc-barricade-7401bra' => { - 'name' => 'SMC Barricade 7401BRA FW', - 'url' => '/admin/wan1.htm', - 'skip' => 'IP Address', - }, - 'netgear-rt3xx' => { - 'name' => 'Netgear FW', - 'url' => '/mtenSysStatus.html', - 'skip' => 'IP Address', - }, - 'elsa-lancom-dsl10' => { - 'name' => 'ELSA LanCom DSL/10 DSL FW', - 'url' => '/config/1/6/8/3/', - 'skip' => 'IP.Address', - }, - 'elsa-lancom-dsl10-ch01' => { - 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', - 'url' => '/config/1/6/8/3/', - 'skip' => 'IP.Address.*?CH01', - }, - 'elsa-lancom-dsl10-ch02' => { - 'name' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)', - 'url' => '/config/1/6/8/3/', - 'skip' => 'IP.Address.*?CH02', - }, - 'linksys' => { - 'name' => 'Linksys FW', - 'url' => '/Status.htm', - 'skip' => 'WAN.*?Address', - }, - 'linksys-ver2' => { - 'name' => 'Linksys FW version 2', - 'url' => '/RouterStatus.htm', - 'skip' => 'WAN.*?Address', - }, - 'linksys-ver3' => { - 'name' => 'Linksys FW version 3', - 'url' => '/Status_Router.htm', - 'skip' => 'WAN.*?Address', - }, - 'linksys-wrt854g' => { - 'name' => 'Linksys WRT854G FW', - 'url' => '/Status_Router.asp', - 'skip' => 'IP Address:', - }, - 'maxgate-ugate3x00' => { - 'name' => 'MaxGate UGATE-3x00 FW', - 'url' => '/Status.htm', - 'skip' => 'WAN.*?IP Address', - }, - 'netcomm-nb3' => { - 'name' => 'NetComm NB3', - 'url' => '/MainPage?id=6', - 'skip' => 'ppp-0', - }, - '3com-3c886a' => { - 'name' => '3com 3c886a 56k Lan Modem', - 'url' => '/stat3.htm', - 'skip' => 'IP address in use', - }, - 'sohoware-nbg800' => { - 'name' => 'SOHOWare BroadGuard NBG800', - 'url' => '/status.htm', - 'skip' => 'Internet IP', - }, - 'xsense-aero' => { - 'name' => 'Xsense Aero', - 'url' => '/A_SysInfo.htm', - 'skip' => 'WAN.*?IP Address', - }, - 'alcatel-stp' => { - 'name' => 'Alcatel Speed Touch Pro', - 'url' => '/cgi/router/', - 'skip' => 'Brt', - }, - 'alcatel-510' => { - 'name' => 'Alcatel Speed Touch 510', - 'url' => '/cgi/ip/', - 'skip' => 'ppp', - }, - 'allnet-1298' => { - 'name' => 'Allnet 1298', - 'url' => '/cgi/router/', - 'skip' => 'WAN', - }, - '3com-oc-remote812' => { - 'name' => '3com OfficeConnect Remote 812', - 'url' => '/callEvent', - 'skip' => '.*LOCAL', - }, - 'e-tech' => { - 'name' => 'E-tech Router', - 'url' => '/Status.htm', - 'skip' => 'Public IP Address', - }, - 'cayman-3220h' => { - 'name' => 'Cayman 3220-H DSL', - 'url' => '/shell/show+ip+interfaces', - 'skip' => '.*inet', - }, - 'vigor-2200usb' => { - 'name' => 'Vigor 2200 USB', - 'url' => '/doc/online.sht', - 'skip' => 'PPPoA', - }, - 'dlink-614' => { - 'name' => 'D-Link DI-614+', - 'url' => '/st_devic.html', - 'skip' => 'WAN', - }, - 'dlink-604' => { - 'name' => 'D-Link DI-604', - 'url' => '/st_devic.html', - 'skip' => 'WAN.*?IP.*Address', - }, - 'olitec-SX200' => { - 'name' => 'olitec-SX200', - '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', - }, - '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}", - 'web' => ": obtain IP from an IP discovery page on the web", - 'fw' => ": obtain IP from the firewall specified by -fw {type|address}", - 'if' => ": obtain IP from the -if {interface}", - 'cmd' => ": obtain IP from the -cmd {external-command}", - 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", - map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, -); -sub ip_strategies_usage { - return map { sprintf(" -use=%-22s %s.", $_, $ip_strategies{$_}) } sort keys %ip_strategies; -} - -my %web_strategies = ( - 'dyndns'=> 1, - 'dnspark'=> 1, -); - -sub setv { - return { - 'type' => shift, - 'required' => shift, - 'cache' => shift, - 'config' => shift, - 'default' => shift, - 'minimum' => shift, - }; -}; -my %variables = ( - 'global-defaults' => { - 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), - 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), - 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), - 'pid' => setv(T_FILE, 0, 0, 1, "", undef), - 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), - 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), - - 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), - 'ip' => setv(T_IP, 0, 0, 1, undef, undef), - 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), - 'if-skip' => setv(T_STRING,1, 0, 1, '', undef), - 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), - 'web-skip' => setv(T_STRING,1, 0, 1, '', undef), - 'fw' => setv(T_ANY, 0, 0, 1, '', undef), - 'fw-skip' => setv(T_STRING,1, 0, 1, '', undef), - 'fw-login' => setv(T_LOGIN, 1, 0, 1, '', undef), - 'fw-password' => setv(T_PASSWD,1, 0, 1, '', undef), - 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), - 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), - - 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), - 'priority' => setv(T_STRING,0, 0, 1, 'notice', undef), - 'mail' => setv(T_EMAIL, 0, 0, 1, '', undef), - 'mail-failure' => setv(T_EMAIL, 0, 0, 1, '', undef), - - 'exec' => setv(T_BOOL, 0, 0, 1, 1, undef), - 'debug' => setv(T_BOOL, 0, 0, 1, 0, undef), - 'verbose' => setv(T_BOOL, 0, 0, 1, 0, undef), - 'quiet' => setv(T_BOOL, 0, 0, 1, 0, undef), - 'help' => setv(T_BOOL, 0, 0, 1, 0, undef), - 'test' => setv(T_BOOL, 0, 0, 1, 0, undef), - 'geturl' => setv(T_STRING,0, 0, 0, '', undef), - - 'postscript' => setv(T_POSTS, 0, 0, 1, '', undef), - }, - 'service-common-defaults' => { - 'server' => setv(T_FQDNP, 1, 0, 1, 'members.dyndns.org', undef), - 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), - 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), - 'host' => setv(T_STRING, 1, 1, 1, '', undef), - 'ip' => setv(T_IP, 0, 1, 0, undef, undef), - 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), - 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), - 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), - 'status' => setv(T_ANY, 0, 1, 0, '', undef), - 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), - 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), - 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), - - 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), - 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), - }, - 'dyndns-common-defaults' => { - 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), - 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), - }, - 'easydns-common-defaults' => { - 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), - }, - 'dnspark-common-defaults' => { - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), - }, - 'noip-common-defaults' => { - 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), - }, - 'noip-service-common-defaults' => { - 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), - 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), - 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), - 'host' => setv(T_STRING, 1, 1, 1, '', undef), - 'ip' => setv(T_IP, 0, 1, 0, undef, undef), - 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), - 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), - 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), - 'status' => setv(T_ANY, 0, 1, 0, '', undef), - 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), - 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), - 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), - 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), - 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), - }, -); -my %services = ( - 'dyndns1' => { - 'updateable' => \&nic_dyndns2_updateable, - 'update' => \&nic_dyndns1_update, - 'examples' => \&nic_dyndns1_examples, - 'variables' => merge( - $variables{'dyndns-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, - 'dyndns2' => { - 'updateable' => \&nic_dyndns2_updateable, - 'update' => \&nic_dyndns2_update, - 'examples' => \&nic_dyndns2_examples, - 'variables' => merge( - { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, -# { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, - $variables{'dyndns-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, - 'noip' => { - 'updateable' => undef, - 'update' => \&nic_noip_update, - 'examples' => \&nic_noip_examples, - 'variables' => merge( - { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, - $variables{'noip-common-defaults'}, - $variables{'noip-service-common-defaults'}, - ), - }, - 'concont' => { - 'updateable' => undef, - 'update' => \&nic_concont_update, - 'examples' => \&nic_concont_examples, - 'variables' => merge( - $variables{'service-common-defaults'}, - { 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), }, - { 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), }, - ), - }, - 'dslreports1' => { - 'updateable' => undef, - 'update' => \&nic_dslreports1_update, - 'examples' => \&nic_dslreports1_examples, - 'variables' => merge( - { 'host' => setv(T_NUMBER, 1, 1, 1, 0, undef) }, - $variables{'service-common-defaults'}, - ), - }, - 'hammernode1' => { - 'updateable' => undef, - 'update' => \&nic_hammernode1_update, - 'examples' => \&nic_hammernode1_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'dup.hn.org', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, - $variables{'service-common-defaults'}, - ), - }, - 'zoneedit1' => { - 'updateable' => undef, - 'update' => \&nic_zoneedit1_update, - 'examples' => \&nic_zoneedit1_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamic.zoneedit.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, - $variables{'service-common-defaults'}, - ), - }, - 'easydns' => { - 'updateable' => undef, - 'update' => \&nic_easydns_update, - 'examples' => \&nic_easydns_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, - $variables{'easydns-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, - 'dnspark' => { - 'updateable' => undef, - 'update' => \&nic_dnspark_update, - 'examples' => \&nic_dnspark_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.dnspark.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, - $variables{'dnspark-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, - 'namecheap' => { - 'updateable' => undef, - 'update' => \&nic_namecheap_update, - 'examples' => \&nic_namecheap_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamicdns.park-your-domain.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, - $variables{'service-common-defaults'}, - ), - }, - 'sitelutions' => { - 'updateable' => undef, - 'update' => \&nic_sitelutions_update, - 'examples' => \&nic_sitelutions_examples, - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.sitelutions.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, - $variables{'service-common-defaults'}, - ), - }, -); -$variables{'merged'} = merge($variables{'global-defaults'}, - $variables{'service-common-defaults'}, - $variables{'dyndns-common-defaults'}, - map { $services{$_}{'variables'} } keys %services, -); - -my @opt = ( - "usage: ${program} [options]", - "options are:", - [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], - [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], - [ "server", "=s", "-server host : update DNS information on 'host'" ], - [ "protocol", "=s", "-protocol type : update protocol used" ], - [ "file", "=s", "-file path : load configuration information from 'path'" ], - [ "cache", "=s", "-cache path : record address used in 'path'" ], - [ "pid", "=s", "-pid path : record process id in 'path'" ], - "", - [ "use", "=s", "-use which : how the should IP address be obtained." ], - &ip_strategies_usage(), - "", - [ "ip", "=s", "-ip address : set the IP address to 'address'" ], - "", - [ "if", "=s", "-if interface : obtain IP address from 'interface'" ], - [ "if-skip", "=s", "-if-skip pattern : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ], - "", - [ "web", "=s", "-web provider|url : obtain IP address from provider's IP checking page" ], - [ "web-skip", "=s", "-web-skip pattern : skip any IP addresses before 'pattern' on the web provider|url" ], - "", - [ "fw", "=s", "-fw address|url : obtain IP address from firewall at 'address'" ], - [ "fw-skip", "=s", "-fw-skip pattern : skip any IP addresses before 'pattern' on the firewall address|url" ], - [ "fw-login", "=s", "-fw-login login : use 'login' when getting IP from fw" ], - [ "fw-password", "=s", "-fw-password secret : use password 'secret' when getting IP from fw" ], - "", - [ "cmd", "=s", "-cmd program : obtain IP address from by calling {program}" ], - [ "cmd-skip", "=s", "-cmd-skip pattern : skip any IP addresses before 'pattern' in the output of {cmd}" ], - "", - [ "login", "=s", "-login user : login as 'user'" ], - [ "password", "=s", "-password secret : use password 'secret'" ], - [ "host", "=s", "-host host : update DNS information for 'host'" ], - "", - [ "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" ], - - [ "syslog", "!", "-{no}syslog : log messages to syslog" ], - [ "facility", "=s", "-facility {type} : log messages to syslog to facility {type}" ], - [ "priority", "=s", "-priority {pri} : log messages to syslog with priority {pri}" ], - [ "mail", "=s", "-mail address : e-mail messages to {address}" ], - [ "mail-failure","=s", "-mail-failure address : e-mail messages for failed updates to {address}" ], - [ "exec", "!", "-{no}exec : do {not} execute; just show what would be done" ], - [ "debug", "!", "-{no}debug : print {no} debugging information" ], - [ "verbose", "!", "-{no}verbose : print {no} verbose information" ], - [ "quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates" ], - [ "help", "", "-help : this message" ], - - [ "query", "!", "-{no}query : print {no} ip addresses and exit" ], - [ "test", "!", "" ], ## hidden - [ "geturl", "=s", "" ], ## hidden - "", - nic_examples(), - "$program version $version, ", - " originally written by Paul Burry, paul+ddclient\@burry.ca", - " project now maintained on http://ddclient.sourceforge.net" -); - -## process args -my ($opt_usage, %opt) = process_args(@opt); -my ($result, %config, %globals, %cache); -my $saved_cache = ''; -my %saved_opt = %opt; -$result = 'OK'; - -test_geturl(opt('geturl')) if opt('geturl'); - -## process help option -if (opt('help')) { - *STDERR = *STDOUT; - usage(0); -} - -## read config file because 'daemon' mode may be defined there. -read_config(define($opt{'file'}, default('file')), \%config, \%globals); -init_config(); -test_possible_ip() if opt('query'); - -if (!opt('daemon') && $programd =~ /d$/) { - $opt{'daemon'} = minimum('daemon'); -} -my $caught_hup = 0; -my $caught_term = 0; -my $caught_kill = 0; -$SIG{'HUP'} = sub { $caught_hup = 1; }; -$SIG{'TERM'} = sub { $caught_term = 1; }; -$SIG{'KILL'} = sub { $caught_kill = 1; }; -if (opt('daemon') && !opt('force')) { - $SIG{'CHLD'} = 'IGNORE'; - my $pid = fork; - if ($pid < 0) { - print STDERR "${program}: can not fork ($!)\n"; - exit -1; - } elsif ($pid) { - exit 0; - } - $SIG{'CHLD'} = 'DEFAULT'; - $opt{'syslog'} = 1; - open(STDOUT, ">/dev/null"); - open(STDERR, ">/dev/null"); - open(STDIN, " 0) && !$caught_hup && !$caught_term && !$caught_kill) { - my $delay = $left > 10 ? 10 : $left; - - $0 = sprintf("%s - sleeping for %s seconds", $program, $left); - $left -= sleep $delay; - } - $caught_hup = 0; - $result = 0; - - } elsif (! scalar(%config)) { - warning("no hosts to update.") unless !opt('quiet') || opt('verbose') || !$daemon; - $result = 1; - - } else { - $result = $result eq 'OK' ? 0 : 1; - } -} while ($daemon && !$result && !$caught_term && !$caught_kill); - -warning("caught SIGKILL; exiting") if $caught_kill; -unlink_pid(); -sendmail(); - -exit($result); - -###################################################################### -## runpostscript -###################################################################### - -sub runpostscript { - my ($ip) = @_; - - if ( defined $globals{postscript} ) { - if ( -x $globals{postscript}) { - system ("$globals{postscript} $ip &"); - } else { - warning ("Can not execute post script: %s", $globals{postscript}); - } - } -} - -###################################################################### -## update_nics -###################################################################### -sub update_nics { - my %examined = (); - - foreach my $s (sort keys %services) { - my @hosts = (); - my $updateable = $services{$s}{'updateable'}; - my $update = $services{$s}{'update'}; - - foreach my $h (sort keys %config) { - next if $config{$h}{'protocol'} ne lc($s); - $examined{$h} = 1; - next if !nic_updateable($h, $updateable); - push @hosts, $h; - } - if (@hosts) { - $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); - &$update(@hosts); - runpostscript($ip); - } - } - foreach my $h (sort keys %config) { - if (!exists $examined{$h}) { - failed("%s was not updated because protocol %s is not supported.", - $h, define($config{$h}{'protocol'}, '') - ); - } - } - write_cache(opt('cache')); -} -###################################################################### -## unlink_pid() -###################################################################### -sub unlink_pid { - if (opt('pid') && opt('daemon')) { - unlink opt('pid'); - } -} - -###################################################################### -## write_pid() -###################################################################### -sub write_pid { - my $file = opt('pid'); - - if ($file && opt('daemon')) { - local *FD; - if (! open(FD, "> $file")) { - warning("Cannot create file '%s'. ($!)", $file); - - } else { - printf FD "$$\n"; - close(FD); - } - } -} - -###################################################################### -## write_cache($file) -###################################################################### -sub write_cache { - my ($file) = @_; - - ## merge the updated host entries into the cache. - foreach my $h (keys %config) { - if (! exists $cache{$h} || $config{$h}{'update'}) { - map {$cache{$h}{$_} = $config{$h}{$_} } @{$config{$h}{'cacheable'}}; - - } else { - map {$cache{$h}{$_} = $config{$h}{$_} } qw(atime wtime status); - } - } - - ## construct the cache file. - my $cache = ""; - foreach my $h (sort keys %cache) { - my $opt = join(',', map { "$_=".define($cache{$h}{$_},'') } sort keys %{$cache{$h}}); - - $cache .= sprintf "%s%s%s\n", $opt, ($opt ? ' ' : ''), $h; - } - $file = '' if defined($saved_cache) && $cache eq $saved_cache; - - ## write the updates and other entries to the cache file. - if ($file) { - $saved_cache = undef; - local *FD; - if (! open(FD, "> $file")) { - fatal("Cannot create file '%s'. ($!)", $file); - } - printf FD "## $program-$version\n"; - printf FD "## last updated at %s (%d)\n", prettytime($now), $now; - printf FD $cache; - - close(FD); - } -} -###################################################################### -## read_cache($file) - called before reading the .conf -###################################################################### -sub read_cache { - my $file = shift; - my $config = shift; - my $globals = {}; - - %{$config} = (); - ## read the cache file ignoring anything on the command-line. - if (-e $file) { - my %saved = %opt; - %opt = (); - $saved_cache = _read_config($config, $globals, "##\\s*$program-$version\\s*", $file); - %opt = %saved; - - foreach my $h (keys %cache) { - if (exists $config{$h}) { - foreach (qw(atime mtime wtime ip status)) { - $config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; - } - } - } - } -} -###################################################################### -## parse_assignments(string) return (rest, %variables) -## parse_assignment(string) return (name, value, rest) -###################################################################### -sub parse_assignments { - my $rest = shift; - my @args = @_; - my %variables = (); - my ($name, $value); - - while (1) { - $rest =~ s/^\s+//; - ($name, $value, $rest) = parse_assignment($rest, @args); - if (defined $name) { - $variables{$name} = $value; - } else { - last; - } - } - return ($rest, %variables); -} -sub parse_assignment { - my $rest = shift; - my $stop = @_ ? shift : '[\n\s,]'; - my ($c, $name, $value); - my ($escape, $quote) = (0, ''); - - if ($rest =~ /^\s*([a-z][a-z_-]*)=(.*)/i) { - ($name, $rest, $value) = ($1, $2, ''); - - while (length($c = substr($rest,0,1))) { - $rest = substr($rest,1); - if ($escape) { - $value .= $c; - $escape = 0; - } elsif ($c eq "\\") { - $escape = 1; - } elsif ($quote && $c eq $quote) { - $quote = '' - } elsif (!$quote && $c =~ /[\'\"]/) { - $quote = $c; - } elsif (!$quote && $c =~ /^${stop}/) { - last; - } else { - $value .= $c; - } - } - } - warning("assignment ended with an open quote") if $quote; - return ($name, $value, $rest); -} -###################################################################### -## read_config -###################################################################### -sub read_config { - my $file = shift; - my $config = shift; - my $globals = shift; - my %globals = (); - - _read_config($config, $globals, '', $file, %globals); -} -sub _read_config { - my $config = shift; - my $globals = shift; - my $stamp = shift; - local $file = shift; - my %globals = @_; - my %config = (); - my $content = ''; - - local *FD; - if (! open(FD, "< $file")) { - # fatal("Cannot open file '%s'. ($!)", $file); - warning("Cannot open file '%s'. ($!)", $file); - } - # Check for only owner has any access to config file - my ($dev, $ino, $mode, @statrest) = stat(FD); - if ($mode & 077) { - if (-f FD && (chmod 0600, $file)) { - warning("file $file must be accessible only by its owner (fixed)."); - } else { - # fatal("file $file must be accessible only by its owner."); - warning("file $file must be accessible only by its owner."); - } - } - - local $lineno = 0; - my $continuation = ''; - while () { - s/[\r\n]//g; - - $lineno++; - - ## check for the program version stamp - if (($. == 1) && $stamp && ($_ !~ /^$stamp$/i)) { - warning("program version mismatch; ignoring %s", $file); - last; - } - 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 /^#/; - # 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$_"; - if (/\\$/) { - chop; - $continuation = $_; - next; - } - $continuation = ''; - - s/^\s+//; # remove leading white space - s/\s+$//; # remove trailing white space - s/\s+/ /g; # canonify - next if /^$/; - - ## expected configuration line is: - ## [opt=value,opt=..] [host [login [password]]] - my %locals; - ($_, %locals) = parse_assignments($_); - s/\s*,\s*/,/g; - my @args = split; - - ## 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}; - } 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}"; - } - ## accumulate globals - if ($#args < 0) { - map { $globals{$_} = $locals{$_} } keys %locals; - } - - ## process this host definition - if (@args) { - my ($host, $login, $password) = @args; - - ## add in any globals.. - %locals = %{ merge(\%locals, \%globals) }; - - ## override login and password if specified the old way. - $locals{'login'} = $login if defined $login; - $locals{'password'} = $password if defined $password; - - ## allow {host} to be a comma separated list of hosts - foreach my $h (split_by_comma($host)) { - ## save a copy of the current globals - $config{$h} = { %locals }; - $config{$h}{'host'} = $h; - } - } - } - close(FD); - - warning("file ends while expecting a continuation line.") - if $continuation; - - %$globals = %globals; - %$config = %config; - - return $content; -} -###################################################################### -## init_config - -###################################################################### -sub init_config { - %opt = %saved_opt; - - ## - $opt{'quiet'} = 0 if opt('verbose'); - - ## infer the IP strategy if possible - $opt{'use'} = 'ip' if !define($opt{'use'}) && defined($opt{'ip'}); - $opt{'use'} = 'if' if !define($opt{'use'}) && defined($opt{'if'}); - $opt{'use'} = 'web' if !define($opt{'use'}) && defined($opt{'web'}); - - ## sanity check - $opt{'max-interval'} = max(interval(opt('max-interval')), interval(default('max-interval'))); - $opt{'min-interval'} = max(interval(opt('min-interval')), interval(default('min-interval'))); - $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); - - $opt{'timeout'} = 0 if opt('timeout') < 0; - - ## only set $opt{'daemon'} if it has been explicitly passed in - if (define($opt{'daemon'},$globals{'daemon'},0)) { - $opt{'daemon'} = interval(opt('daemon')); - $opt{'daemon'} = minimum('daemon') - if ($opt{'daemon'} < minimum('daemon')); - } - - ## define or modify host options specified on the command-line - if (exists $opt{'options'} && defined $opt{'options'}) { - ## collect cmdline configuration options. - my %options = (); - foreach my $opt (split_by_comma($opt{'options'})) { - my ($name,$var) = split /\s*=\s*/, $opt; - $options{$name} = $var; - } - ## determine hosts specified with -host - my @hosts = (); - if (exists $opt{'host'}) { - foreach my $h (split_by_comma($opt{'host'})) { - push @hosts, $h; - } - } - ## and those in -options=... - if (exists $options{'host'}) { - foreach my $h (split_by_comma($options{'host'})) { - push @hosts, $h; - } - delete $options{'host'}; - } - ## merge options into host definitions or globals - if (@hosts) { - foreach my $h (@hosts) { - $config{$h} = %{ merge(\%options, $config{$h}) }; - } - $opt{'host'} = join(',', @hosts); - } else { - %globals = %{ merge(\%options, \%globals) }; - } - } - - ## override global options with those on the command-line. - foreach my $o (keys %opt) { - if (defined $opt{$o} && exists $variables{'global-defaults'}{$o}) { - $globals{$o} = $opt{$o}; - } - } - - ## sanity check - if (defined $opt{'host'} && defined $opt{'retry'}) { - usage("options -retry and -host (or -option host=..) are mutually exclusive"); - } - - ## determine hosts to update (those on the cmd-line, config-file, or failed cached) - my @hosts = keys %config; - if (opt('host')) { - @hosts = split_by_comma($opt{'host'}); - } - if (opt('retry')) { - @hosts = map { $_ if $cache{$_}{'status'} ne 'good' } keys %cache; - } - - ## remove any other hosts - my %hosts; - map { $hosts{$_} = undef } @hosts; - map { delete $config{$_} unless exists $hosts{$_} } keys %config; - - ## collect the cacheable variables. - foreach my $proto (keys %services) { - my @cacheable = (); - foreach my $k (keys %{$services{$proto}{'variables'}}) { - push @cacheable, $k if $services{$proto}{'variables'}{$k}{'cache'}; - } - $services{$proto}{'cacheable'} = [ @cacheable ]; - } - - ## sanity check.. - ## make sure config entries have all defaults and they meet minimums - ## first the globals... - foreach my $k (keys %globals) { - my $def = $variables{'merged'}{$k}; - my $ovalue = define($globals{$k}, $def->{'default'}); - my $value = check_value($ovalue, $def); - if ($def->{'required'} && !defined $value) { - $value = default($k); - warning("'%s=%s' is an invalid %s. (using default of %s)", $k, $ovalue, $def->{'type'}, $value); - } - $globals{$k} = $value; - } - - ## now the host definitions... - HOST: - foreach my $h (keys %config) { - my $proto; - $proto = $config{$h}{'protocol'}; - $proto = opt('protocol') if !defined($proto); - - if (!exists($services{$proto})) { - warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); - delete $config{$h}; - - } else { - my $svars = $services{$proto}{'variables'}; - my $conf = { 'protocol' => $proto }; - - foreach my $k (keys %$svars) { - my $def = $svars->{$k}; - my $ovalue = define($config{$h}{$k}, $def->{'default'}); - my $value = check_value($ovalue, $def); - if ($def->{'required'} && !defined $value) { - warning("skipping host: %s: '%s=%s' is an invalid %s.", $h, $k, $ovalue, $def->{'type'}); - delete $config{$h}; - next HOST; - } - $conf->{$k} = $value; - - } - $config{$h} = $conf; - $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; - } - } -} - -###################################################################### -## usage -###################################################################### -sub usage { - my $exitcode = 1; - $exitcode = shift if @_ != 0; # use first arg if given - my $msg = ''; - if (@_) { - my $format = shift; - $msg .= sprintf $format, @_; - 1 while chomp($msg); - $msg .= "\n"; - } - printf STDERR "%s%s\n", $msg, $opt_usage; - sendmail(); - exit $exitcode; -} - -###################################################################### -## process_args - -###################################################################### -sub process_args { - my @spec = (); - my $usage = ""; - my %opts = (); - - foreach (@_) { - if (ref $_) { - my ($key, $specifier, $arg_usage) = @$_; - my $value = default($key); - - ## add a option specifier - push @spec, $key . $specifier; - - ## define the default value which can be overwritten later - $opt{$key} = undef; - - next unless $arg_usage; - - ## add a line to the usage; - $usage .= " $arg_usage"; - if (defined($value) && $value ne '') { - $usage .= " (default: "; - if ($specifier eq '!') { - $usage .= "no" if ($specifier eq '!') && !$value; - $usage .= $key; - } else { - $usage .= $value; - } - $usage .= ")"; - } - $usage .= "."; - } else { - $usage .= $_; - } - $usage .= "\n"; - } - ## process the arguments - if (! GetOptions(\%opt, @spec)) { - $opt{"help"} = 1; - } - return ($usage, %opt); -} -###################################################################### -## test_possible_ip - print possible IPs -###################################################################### -sub test_possible_ip { - local $opt{'debug'} = 0; - - printf "use=ip, ip=%s address is %s\n", opt('ip'), define(get_ip('ip'), 'NOT FOUND') - if defined opt('ip'); - - { - local $opt{'use'} = 'if'; - foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) { - $if =~ s/:?\s.*//is; - local $opt{'if'} = $if; - printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND'); - } - } - if (opt('fw')) { - if (opt('fw') !~ m%/%) { - foreach my $fw (sort keys %builtinfw) { - local $opt{'use'} = $fw; - printf "use=$fw address is %s\n", define(get_ip($fw), 'NOT FOUND'); - } - } - local $opt{'use'} = 'fw'; - printf "use=fw, fw=%s address is %s\n", opt('fw'), define(get_ip(opt('fw')), 'NOT FOUND') - if ! exists $builtinfw{opt('fw')}; - - } - { - local $opt{'use'} = 'web'; - foreach my $web (sort keys %builtinweb) { - local $opt{'web'} = $web; - printf "use=web, web=$web address is %s\n", define(get_ip('web'), 'NOT FOUND'); - } - printf "use=web, web=%s address is %s\n", opt('web'), define(get_ip('web'), 'NOT FOUND') - if ! exists $builtinweb{opt('web')}; - } - if (opt('cmd')) { - local $opt{'use'} = 'cmd'; - printf "use=cmd, cmd=%s address is %s\n", opt('cmd'), define(get_ip('cmd'), 'NOT FOUND'); - } - exit 0 unless opt('debug'); -} -###################################################################### -## test_geturl - print (and save if -test) result of fetching a URL -###################################################################### -sub test_geturl { - my $url = shift; - - my $reply = geturl(opt('proxy'), $url, opt('login'), opt('password')); - print "URL $url\n";; - print defined($reply) ? $reply : "\n"; - exit; -} -###################################################################### -## load_file -###################################################################### -sub load_file { - my $file = shift; - my $buffer = ''; - - if (exists($ENV{'TEST_CASE'})) { - my $try = "$file-$ENV{'TEST_CASE'}"; - $file = $try if -f $try; - } - - local *FD; - if (open(FD, "< $file")) { - read(FD, $buffer, -s FD); - close(FD); - debug("Loaded %d bytes from %s", length($buffer), $file); - } else { - debug("Load failed from %s ($!)", $file); - } - return $buffer -} -###################################################################### -## save_file -###################################################################### -sub save_file { - my ($file, $buffer, $opt) = @_; - - $file .= "-$ENV{'TEST_CASE'}" if exists $ENV{'TEST_CASE'}; - if (defined $opt) { - my $i = 0; - while (-f "$file-$i") { - if ('unique' =~ /^$opt/i) { - my $a = join('\n', grep {!/^Date:/} split /\n/, $buffer); - my $b = join('\n', grep {!/^Date:/} split /\n/, load_file("$file-$i")); - last if $a eq $b; - } - $i++; - } - $file = "$file-$i"; - } - debug("Saving to %s", $file); - local *FD; - open(FD, "> $file") or return; - print FD $buffer; - close(FD); - return $buffer; -} -###################################################################### -## print_opt -## print_globals -## print_config -## print_cache -## print_info -###################################################################### -sub _print_hash { - my ($string, $ptr) = @_; - my $value = $ptr; - - if (! defined($ptr)) { - $value = ""; - } elsif (ref $ptr eq 'HASH') { - foreach my $key (sort keys %$ptr) { - _print_hash("${string}\{$key\}", $ptr->{$key}); - } - return; - } - printf "%-36s : %s\n", $string, $value; -} -sub print_hash { - my ($string, $hash) = @_; - printf "=== %s ====\n", $string; - _print_hash($string, $hash); -} -sub print_opt { print_hash("opt", \%opt); } -sub print_globals { print_hash("globals", \%globals); } -sub print_config { print_hash("config", \%config); } -sub print_cache { print_hash("cache", \%cache); } -sub print_info { - print_opt(); - print_globals(); - print_config(); - print_cache(); -} -###################################################################### -## pipecmd - run an external command -## logger -## sendmail -###################################################################### -sub pipecmd { - my $cmd = shift; - my $stdin = join("\n", @_); - my $ok = 0; - - ## remove trailing newlines - 1 while chomp($stdin); - - ## override when debugging. - $cmd = opt('exec') ? "| $cmd" : "> /dev/null"; - - ## execute the command. - local *FD; - if (! open(FD, $cmd)) { - printf STDERR "$program: cannot execute command %s.\n", $cmd; - - } elsif ($stdin && (! print FD "$stdin\n")) { - printf STDERR "$program: failed writting to %s.\n", $cmd; - close(FD); - - } elsif (! close(FD)) { - printf STDERR "$program: failed closing %s.($@)\n", $cmd; - - } elsif (opt('exec') && $?) { - printf STDERR "$program: failed %s. ($@)\n", $cmd; - - } else { - $ok = 1; - } - return $ok; -} -sub logger { - if (opt('syslog') && opt('facility') && opt('priority')) { - my $facility = opt('facility'); - my $priority = opt('priority'); - return pipecmd("logger -p$facility.$priority -t${program}\[$$\]", @_); - } - return 1; -} -sub sendmail { - my $recipients = opt('mail'); - - if (opt('mail-failure') && ($result ne 'OK' && $result ne '0')) { - $recipients = opt('mail-failure'); - } - if ($msgs && $recipients && $msgs ne $last_msgs) { - pipecmd("sendmail -oi $recipients", - "To: $recipients", - "Subject: status report from $program\@$hostname", - "\r\n", - $msgs, - "", - "regards,", - " $program\@$hostname (version $version)" - ); - } - $last_msgs = $msgs; - $msgs = ''; -} -###################################################################### -## split_by_comma -## merge -## default -## minimum -## opt -###################################################################### -sub split_by_comma { - my $string = shift; - - return split /\s*[, ]\s*/, $string if defined $string; - return (); -} -sub merge { - my %merged = (); - foreach my $h (@_) { - foreach my $k (keys %$h) { - $merged{$k} = $h->{$k} unless exists $merged{$k}; - } - } - return \%merged; -} -sub default { - my $v = shift; - return $variables{'merged'}{$v}{'default'}; -} -sub minimum { - my $v = shift; - return $variables{'merged'}{$v}{'minimum'}; -} -sub opt { - my $v = shift; - return $opt{$v} if defined $opt{$v}; - return $globals{$v} if defined $globals{$v}; - return default($v) if defined default($v); - return undef; -} -sub min { - my $min = shift; - foreach my $arg (@_) { - $min = $arg if $arg < $min; - } - return $min; -} -sub max { - my $max = shift; - foreach my $arg (@_) { - $max = $arg if $arg > $max; - } - return $max; -} -###################################################################### -## define -###################################################################### -sub define { - foreach (@_) { - return $_ if defined $_; - } - return undef; -} -###################################################################### -## ynu -###################################################################### -sub ynu { - my ($value, $yes, $no, $undef) = @_; - - return $no if !defined($value) || !$value; - return $yes if $value eq '1'; - foreach (qw(yes true)) { - return $yes if $_ =~ /^$value/i; - } - foreach (qw(no false)) { - return $no if $_ =~ /^$value/i; - } - return $undef; -} -###################################################################### -## msg -## debug -## warning -## fatal -###################################################################### -sub _msg { - my $log = shift; - my $prefix = shift; - my $format = shift; - my $buffer = sprintf $format, @_; - chomp($buffer); - - $prefix = sprintf "%-9s ", $prefix if $prefix; - if ($file) { - $prefix .= "file $file"; - $prefix .= ", line $lineno" if $lineno; - $prefix .= ": "; - } - if ($prefix) { - $buffer = "$prefix$buffer"; - $buffer =~ s/\n/\n$prefix /g; - } - $buffer .= "\n"; - print $buffer; - - $msgs .= $buffer if $log; - logger($buffer) if $log; - -} -sub msg { _msg(0, '', @_); } -sub verbose { _msg(1, @_) if opt('verbose'); } -sub info { _msg(1, 'INFO:', @_) if opt('verbose'); } -sub debug { _msg(0, 'DEBUG:', @_) if opt('debug'); } -sub debug2 { _msg(0, 'DEBUG:', @_) if opt('debug') && opt('verbose');} -sub warning { _msg(1, 'WARNING:', @_); } -sub fatal { _msg(1, 'FATAL:', @_); sendmail(); exit(1); } -sub success { _msg(1, 'SUCCESS:', @_); } -sub failed { _msg(1, 'FAILED:', @_); $result = 'FAILED'; } -sub prettytime { return scalar(localtime(shift)); } - -sub prettyinterval { - my $interval = shift; - use integer; - my $s = $interval % 60; $interval /= 60; - my $m = $interval % 60; $interval /= 60; - my $h = $interval % 24; $interval /= 24; - my $d = $interval; - - my $string = ""; - $string .= "$d day" if $d; - $string .= "s" if $d > 1; - $string .= ", " if $string && $h; - $string .= "$h hour" if $h; - $string .= "s" if $h > 1; - $string .= ", " if $string && $m; - $string .= "$m minute" if $m; - $string .= "s" if $m > 1; - $string .= ", " if $string && $s; - $string .= "$s second" if $s; - $string .= "s" if $s > 1; - return $string; -} -sub interval { - my $value = shift; - if ($value =~ /^(\d+)(seconds|s)/i) { - $value = $1; - } elsif ($value =~ /^(\d+)(minutes|m)/i) { - $value = $1 * 60; - } elsif ($value =~ /^(\d+)(hours|h)/i) { - $value = $1 * 60*60; - } elsif ($value =~ /^(\d+)(days|d)/i) { - $value = $1 * 60*60*24; - } elsif ($value !~ /^\d+$/) { - $value = undef; - } - return $value; -} -sub interval_expired { - my ($host, $time, $interval) = @_; - - return 1 if !exists $cache{$host}; - return 1 if !exists $cache{$host}{$time} || !$cache{$host}{$time}; - return 1 if !exists $config{$host}{$interval} || !$config{$host}{$interval}; - - return $now > ($cache{$host}{$time} + $config{$host}{$interval}); -} - - - -###################################################################### -## check_value -###################################################################### -sub check_value { - my ($value, $def) = @_; - my $type = $def->{'type'}; - my $min = $def->{'minimum'}; - my $required = $def->{'required'}; - - if (!defined $value && !$required) { - ; - - } elsif ($type eq T_DELAY) { - $value = interval($value); - $value = $min if defined($value) && defined($min) && $value < $min; - - } elsif ($type eq T_NUMBER) { - return undef if $value !~ /^\d+$/; - $value = $min if defined($min) && $value < $min; - - } elsif ($type eq T_BOOL) { - if ($value =~ /^y(es)?$|^t(true)?$|^1$/i) { - $value = 1; - } elsif ($value =~ /^n(o)?$|^f(alse)?$|^0$/i) { - $value = 0; - } else { - return undef; - } - } elsif ($type eq T_FQDN || $type eq T_OFQDN && $value ne '') { - $value = lc $value; - return undef if $value !~ /[^.]\.[^.]/; - - } elsif ($type eq T_FQDNP) { - $value = lc $value; - return undef if $value !~ /[^.]\.[^.].*(:\d+)?$/; - - } elsif ($type eq T_PROTO) { - $value = lc $value; - return undef if ! exists $services{$value}; - - } elsif ($type eq T_USE) { - $value = lc $value; - return undef if ! exists $ip_strategies{$value}; - - } elsif ($type eq T_FILE) { - return undef if $value eq ""; - - } elsif ($type eq T_IF) { - return undef if $value !~ /^[a-z0-9:._-]+$/; - - } elsif ($type eq T_PROG) { - return undef if $value eq ""; - - } elsif ($type eq T_LOGIN) { - return undef if $value eq ""; - -# } elsif ($type eq T_PASSWD) { -# return undef if $value =~ /:/; - - } elsif ($type eq T_IP) { - return undef if $value !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; - } - return $value; -} -###################################################################### -## encode_base64 - from MIME::Base64 -###################################################################### -sub encode_base64 ($;$) { - my $res = ''; - my $eol = $_[1]; - $eol = "\n" unless defined $eol; - pos($_[0]) = 0; # ensure start at the beginning - while ($_[0] =~ /(.{1,45})/gs) { - $res .= substr(pack('u', $1), 1); - chop($res); - } - $res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs - - # fix padding at the end - my $padding = (3 - length($_[0]) % 3) % 3; - $res =~ s/.{$padding}$/'=' x $padding/e if $padding; - - # break encoded string into lines of no more than 76 characters each - if (length $eol) { - $res =~ s/(.{1,76})/$1$eol/g; - } - $res; -} -###################################################################### -## load_ssl_support -###################################################################### -sub load_ssl_support { - my $ssl_loaded = eval {require IO::Socket::SSL}; - unless ($ssl_loaded) { - fatal(<<"EOM"); -Error loading the Perl module IO::Socket::SSL needed for SSL connect. -On Debian, the package libio-socket-ssl-perl must be installed. -EOM - } - import IO::Socket::SSL; - { no warnings; $IO::Socket::SSL::DEBUG = 0; } -} -###################################################################### -## geturl -###################################################################### -sub geturl { - my $proxy = shift || ''; - my $url = shift || ''; - my $login = shift || ''; - my $password = shift || ''; - 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%^https?://%%i; - $url =~ s%^https?://%%i; - $server = $url; - $server =~ s%/.*%%; - $url = "/" unless $url =~ m%/%; - $url =~ s%^[^/]*/%%; - - debug("server = $server"); - opt('fw') && debug("opt(fw = ",opt('fw'),")"); - $globals{'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; - load_ssl_support; - } else { - $use_ssl = 0; - $default_port = 80; - } - - ## determine peer and port to use. - $peer = $proxy || $server; - $peer =~ s%/.*%%; - $port = $peer; - $port =~ s%^.*:%%; - $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"; - $request .= "Host: $server\n"; - - my $auth = encode_base64("${login}:${password}"); - $request .= "Authorization: Basic $auth" if $login || $password; - $request .= "User-Agent: ${program}/${version}\n"; - $request .= "Connection: close\n"; - $request .= "\n"; - - ## make sure newlines are for some pedantic proxy servers - ($rq = $request) =~ s/\n/\r\n/g; - - # local $^W = 0; - $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); - if (! opt('exec')) { - debug("skipped network connection"); - verbose("SENDING:", $request); - } 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: ", $use_ssl ? 'using SSL' : 'using HTTP'); - verbose("SENDING:", $request); - - $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); - my $result = syswrite $sd, $rq; - if ($result != length($rq)) { - warning("cannot send to $peer:$port ($!)."); - - } else { - my $timeout = 0; - local $SIG{'ALRM'} = sub { $timeout = 1; }; - - $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); - alarm(opt('timeout')) if opt('timeout') > 0; - while (!$timeout && ($_ = <$sd>)) { - $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); - verbose("RECEIVE:", "%s", define($_, "")); - $reply .= $_ if defined $_; - } - if (opt('timeout') > 0) { - alarm(0); - } - close($sd); - if ($timeout) { - warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); - $reply = ''; - } - $reply = '' if !defined $reply; - } - } - $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); - - ## during testing simulate reading the URL - if (opt('test')) { - my $filename = "$server/$url"; - $filename =~ s|/|%2F|g; - if (opt('exec')) { - $reply = save_file("${savedir}$filename", $reply, 'unique'); - } else { - $reply = load_file("${savedir}$filename"); - } - } - - $reply =~ s/\r//g if defined $reply; - return $reply; -} -###################################################################### -## get_ip -###################################################################### -sub get_ip { - my $use = lc shift; - my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); - $arg = '' unless $arg; - - if ($use eq 'ip') { - $ip = opt('ip'); - $arg = 'ip'; - - } elsif ($use eq 'if') { - $skip = opt('if-skip') || ''; - $reply = `ifconfig $arg 2> /dev/null`; - $reply = '' if $?; - - } elsif ($use eq 'cmd') { - if ($arg) { - $skip = opt('cmd-skip') || ''; - $reply = `$arg`; - $reply = '' if $?; - } - - } elsif ($use eq 'web') { - $url = opt('web') || ''; - $skip = opt('web-skip') || ''; - - if (exists $builtinweb{$url}) { - $skip = $builtinweb{$url}->{'skip'} unless $skip; - $url = $builtinweb{$url}->{'url'}; - } - $arg = $url; - - if ($url) { - $reply = geturl(opt('proxy'), $url) || ''; - } - - } elsif (($use eq 'cisco')) { - # Stuff added to support Cisco router ip http daemon - # User fw-login should only have level 1 access to prevent - # password theft. This is pretty harmless. - my $queryif = opt('if'); - $skip = opt('fw-skip') || ''; - - # Convert slashes to protected value "\/" - $queryif =~ s%\/%\\\/%g; - - # Protect special HTML characters (like '?') - $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - - $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; - $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; - $arg = $url; - - } else { - $url = opt('fw') || ''; - $skip = opt('fw-skip') || ''; - - if (exists $builtinfw{$use}) { - $skip = $builtinfw{$use}->{'skip'} unless $skip; - $url = "http://${url}" . $builtinfw{$use}->{'url'} unless $url =~ /\//; - } - $arg = $url; - - if ($url) { - $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; - } - } - if (!defined $reply) { - $reply = ''; - } - if ($skip) { - $skip =~ s/ /\\s/is; - $reply =~ s/^.*?${skip}//is; - } - if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) { - $ip = $1; - } - if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) { - $ip = undef; - } - - debug("get_ip: using %s, %s reports %s", $use, $arg, define($ip, "")); - return $ip; -} - -###################################################################### -## group_hosts_by -###################################################################### -sub group_hosts_by { - my ($hosts, $attributes) = @_; - - my %groups = (); - foreach my $h (@$hosts) { - my @keys = @$attributes; - map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; - my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); - - push @{$groups{$sig}}, $h; - } - return %groups; -} -###################################################################### -## nic_examples -###################################################################### -sub nic_examples { - my $examples = ""; - my $separator = ""; - foreach my $s (sort keys %services) { - my $subr = $services{$s}{'examples'}; - my $example; - - if (defined($subr) && ($example = &$subr())) { - chomp($example); - $examples .= $example; - $examples .= "\n\n$separator"; - $separator = "\n"; - } - } - my $intro = < $now) { - warning("cannot update %s from %s to %s until after %s.", - $host, - ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, - prettytime($cache{$host}{'wtime'}) - ); - - } elsif ($cache{$host}{'mtime'} && interval_expired($host, 'mtime', 'max-interval')) { - warning("forcing update of %s from %s to %s; %s since last update on %s.", - $host, - ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), $ip, - prettyinterval($config{$host}{'max-interval'}), - prettytime($cache{$host}{'mtime'}) - ); - $update = 1; - - } elsif ((!exists($cache{$host}{'ip'})) || - ("$cache{$host}{'ip'}" ne "$ip")) { - if (($cache{$host}{'status'} eq 'good') && - !interval_expired($host, 'mtime', 'min-interval')) { - - warning("skipping update of %s from %s to %s.\nlast updated %s.\nWait at least %s between update attempts.", - $host, - ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), - $ip, - ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), - prettyinterval($config{$host}{'min-interval'}) - ) - if opt('verbose') || !define($cache{$host}{'warned-min-interval'}, 0); - - $cache{$host}{'warned-min-interval'} = $now; - - } elsif (($cache{$host}{'status'} ne 'good') && !interval_expired($host, 'atime', 'min-error-interval')) { - - warning("skipping update of %s from %s to %s.\nlast updated %s but last attempt on %s failed.\nWait at least %s between update attempts.", - $host, - ($cache{$host}{'ip'} ? $cache{$host}{'ip'} : ''), - $ip, - ($cache{$host}{'mtime'} ? prettytime($cache{$host}{'mtime'}) : ''), - ($cache{$host}{'atime'} ? prettytime($cache{$host}{'atime'}) : ''), - prettyinterval($config{$host}{'min-error-interval'}) - ) - if opt('verbose') || !define($cache{$host}{'warned-min-error-interval'}, 0); - - $cache{$host}{'warned-min-error-interval'} = $now; - - } else { - $update = 1; - } - - } elsif (defined($sub) && &$sub($host)) { - $update = 1; - - } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || - ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || - ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || - ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { - info("updating %s because host settings have been changed.", $host); - $update = 1; - - } else { - success("%s: skipped: IP address was already set to %s.", $host, $ip) - if opt('verbose'); - } - $config{$host}{'status'} = define($cache{$host}{'status'},''); - $config{$host}{'update'} = $update; - if ($update) { - $config{$host}{'status'} = 'noconnect'; - $config{$host}{'atime'} = $now; - $config{$host}{'wtime'} = 0; - $config{$host}{'warned-min-interval'} = 0; - $config{$host}{'warned-min-error-interval'} = 0; - - delete $cache{$host}{'warned-min-interval'}; - delete $cache{$host}{'warned-min-error-interval'}; - } - - return $update; -} -###################################################################### -## header_ok -###################################################################### -sub header_ok { - my ($host, $line) = @_; - my $ok = 0; - - if ($line =~ m%^s*HTTP/1.*\s+(\d+)%i) { - my $result = $1; - - if ($result eq '200') { - $ok = 1; - - } elsif ($result eq '401') { - failed("updating %s: authorization failed (%s)", $host, $line); - } - - } else { - failed("updating %s: unexpected line (%s)", $host, $line); - } - return $ok; -} -###################################################################### -## nic_dyndns1_examples -###################################################################### -sub nic_dyndns1_examples { - return <\s*(.*)\s*%i; - $return_code = $1 if $line =~ m%^return\s+code\s*:\s*(.*)\s*$%i; - $error_code = $1 if $line =~ m%^error\s+code\s*:\s*(.*)\s*$%i; - } - - if ($return_code ne 'NOERROR' || $error_code ne 'NOERROR' || !$title) { - $config{$h}{'status'} = 'failed'; - $title = "incomplete response from $config{$h}{server}" unless $title; - warning("SENT: %s", $url) unless opt('verbose'); - warning("REPLIED: %s", $reply); - failed("updating %s: %s", $h, $title); - - } else { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("updating %s: %s: IP address set to %s (%s)", $h, $return_code, $ip, $title); - } - } -} -###################################################################### -## nic_dyndns2_updateable -###################################################################### -sub nic_dyndns2_updateable { - my $host = shift; - my $update = 0; - - if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { - info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); - $update = 1; - - } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { - info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); - $update = 1; - - } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { - - info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); - $update = 1; - - } - return $update; -} -###################################################################### -## nic_dyndns2_examples -###################################################################### -sub nic_dyndns2_examples { - return < 'Bad authorization (username or password)', - 'badsys' => 'The system parameter given was not valid', - - 'notfqdn' => 'A Fully-Qualified Domain Name was not provided', - 'nohost' => 'The hostname specified does not exist in the database', - '!yours' => 'The hostname specified exists, but not under the username currently being used', - '!donator' => 'The offline setting was set, when the user is not a donator', - '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', - 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', - - 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', - 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', - - 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', - ); - - ## update each set of hosts that had similar configurations - foreach my $sig (keys %groups) { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; - - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - - ## Select the DynDNS system to update - my $url = "http://$config{$h}{'server'}/nic/update?system="; - if ($config{$h}{'custom'}) { - warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) - if $config{$h}{'static'}; -# warning("updating %s: 'custom' and 'offline' may not be used together. ('offline' ignored)", $hosts) -# if $config{$h}{'offline'}; - $url .= 'custom'; - - } elsif ($config{$h}{'static'}) { -# warning("updating %s: 'static' and 'offline' may not be used together. ('offline' ignored)", $hosts) -# if $config{$h}{'offline'}; - $url .= 'statdns'; - - } else { - $url .= 'dyndns'; - } - - $url .= "&hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; - - ## some args are not valid for a custom domain. - $url .= "&wildcard=ON" if ynu($config{$h}{'wildcard'}, 1, 0, 0); - if ($config{$h}{'mx'}) { - $url .= "&mx=$config{$h}{'mx'}"; - $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); - } - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); - last; - } - last if !header_ok($hosts, $reply); - - my @reply = split /\n/, $reply; - my $state = 'header'; - foreach my $line (@reply) { - if ($state eq 'header') { - $state = 'body'; - - } elsif ($state eq 'body') { - $state = 'results' if $line eq ''; - - } elsif ($state =~ /^results/) { - $state = 'results2'; - - my ($status, $ip) = split / /, lc $line; - my $h = shift @hosts; - - $config{$h}{'status'} = $status; - if ($status eq 'good') { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - success("updating %s: %s: IP address set to %s", $h, $status, $ip); - - } elsif (exists $errors{$status}) { - if ($status eq 'nochg') { - warning("updating %s: %s: %s", $h, $status, $errors{$status}); - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - - } else { - failed("updating %s: %s: %s", $h, $status, $errors{$status}); - } - - } elsif ($status =~ /w(\d+)(.)/) { - my ($wait, $units) = ($1, lc $2); - my ($sec, $scale) = ($wait, 1); - - ($scale, $units) = (1, 'seconds') if $units eq 's'; - ($scale, $units) = (60, 'minutes') if $units eq 'm'; - ($scale, $units) = (60*60, 'hours') if $units eq 'h'; - - $sec = $wait * $scale; - $config{$h}{'wtime'} = $now + $sec; - warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); - - } else { - failed("updating %s: %s: unexpected status (%s)", $h, $line); - } - } - } - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) - if $state ne 'results2'; - } -} - - -###################################################################### -## nic_noip_update -## Note: uses same features as nic_dyndns2_update, less return codes -###################################################################### -sub nic_noip_update { - debug("\nnic_noip_update -------------------"); - - ## group hosts with identical attributes together - my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); - - my %errors = ( - 'badauth' => 'Invalid username or password', - 'badagent' => 'Invalid user agent', - 'nohost' => 'The hostname specified does not exist in the database', - '!donator' => 'The offline setting was set, when the user is not a donator', - 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', - 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', - 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', - 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', - ); - - ## update each set of hosts that had similar configurations - foreach my $sig (keys %groups) { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; - - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - - my $url = "http://$config{$h}{'server'}/nic/update?system="; - $url .= 'noip'; - $url .= "&hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; - - - print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; - - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); - last; - } - last if !header_ok($hosts, $reply); - - my @reply = split /\n/, $reply; - my $state = 'header'; - foreach my $line (@reply) { - if ($state eq 'header') { - $state = 'body'; - - } elsif ($state eq 'body') { - $state = 'results' if $line eq ''; - - } elsif ($state =~ /^results/) { - $state = 'results2'; - - my ($status, $ip) = split / /, lc $line; - my $h = shift @hosts; - - $config{$h}{'status'} = $status; - if ($status eq 'good') { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - success("updating %s: %s: IP address set to %s", $h, $status, $ip); - - } elsif (exists $errors{$status}) { - if ($status eq 'nochg') { - warning("updating %s: %s: %s", $h, $status, $errors{$status}); - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - - } else { - failed("updating %s: %s: %s", $h, $status, $errors{$status}); - } - - } elsif ($status =~ /w(\d+)(.)/) { - my ($wait, $units) = ($1, lc $2); - my ($sec, $scale) = ($wait, 1); - - ($scale, $units) = (1, 'seconds') if $units eq 's'; - ($scale, $units) = (60, 'minutes') if $units eq 'm'; - ($scale, $units) = (60*60, 'hours') if $units eq 'h'; - - $sec = $wait * $scale; - $config{$h}{'wtime'} = $now + $sec; - warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); - - } else { - failed("updating %s: %s: unexpected status (%s)", $h, $line); - } - } - } - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) - if $state ne 'results2'; - } -} -###################################################################### -## nic_noip_examples -###################################################################### -sub nic_noip_examples { - return </i, @reply) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("updating %s: good: IP address set to %s", $h, $ip); - } else { - $config{$h}{'status'} = 'failed'; - warning("SENT: %s", $url) unless opt('verbose'); - warning("REPLIED: %s", $reply); - failed("updating %s: Invalid reply.", $h); - } - } -} -###################################################################### -## nic_zoneedit1_examples -###################################################################### -sub nic_zoneedit1_examples { - return < -# -# -###################################################################### -sub nic_zoneedit1_update { - debug("\nnic_zoneedit1_update -------------------"); - - ## group hosts with identical attributes together - my %groups = group_hosts_by([ @_ ], [ qw(login password server) ]); - - ## update each set of hosts that had similar configurations - foreach my $sig (keys %groups) { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; - - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - - my $url = ''; - $url .= "http://$config{$h}{'server'}/auth/dynamic.html"; - $url .= "?host=$hosts"; - $url .= "&dnsto=$ip" if $ip; - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); - last; - } - last if !header_ok($hosts, $reply); - - my @reply = split /\n/, $reply; - foreach my $line (@reply) { - if ($line =~ /^[^<]*<(SUCCESS|ERROR)\s+([^>]+)>(.*)/) { - my ($status, $assignments, $rest) = ($1, $2, $3); - my ($left, %var) = parse_assignments($assignments); - - if (keys %var) { - my ($status_code, $status_text, $status_ip) = ('999', '', $ip); - $status_code = $var{'CODE'} if exists $var{'CODE'}; - $status_text = $var{'TEXT'} if exists $var{'TEXT'}; - $status_ip = $var{'IP'} if exists $var{'IP'}; - - if ($status eq 'SUCCESS' || ($status eq 'ERROR' && $var{'CODE'} eq '707')) { - $config{$h}{'ip'} = $status_ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - - success("updating %s: IP address set to %s (%s: %s)", $h, $ip, $status_code, $status_text); - - } else { - $config{$h}{'status'} = 'failed'; - failed("updating %s: %s: %s", $h, $status_code, $status_text); - } - shift @hosts; - $h = $hosts[0]; - $hosts = join(',', @hosts); - } - $line = $rest; - redo if $line; - } - } - failed("updating %s: no response from %s", $hosts, $config{$h}{'server'}) - if @hosts; - } -} -###################################################################### -## nic_easydns_updateable -###################################################################### -sub nic_easydns_updateable { - my $host = shift; - my $update = 0; - - if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { - info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); - $update = 1; - - } elsif ($config{$host}{'mx'} && (ynu($config{$host}{'backupmx'},1,2,3) ne ynu($config{$host}{'backupmx'},1,2,3))) { - info("forcing updating %s because 'backupmx' has changed to %s.", $host, ynu($config{$host}{'backupmx'},"YES","NO","NO")); - $update = 1; - - } elsif ($config{$host}{'static'} ne $cache{$host}{'static'}) { - - info("forcing updating %s because 'static' has changed to %s.", $host, ynu($config{$host}{'static'},"YES","NO","NO")); - $update = 1; - - } - return $update; -} -###################################################################### -## nic_easydns_examples -###################################################################### -sub nic_easydns_examples { - return < [ $_ ] } @_; - - my %errors = ( - 'NOACCESS' => 'Authentication failed. This happens if the username/password OR host or domain are wrong.', - 'NOSERVICE'=> 'Dynamic DNS is not turned on for this domain.', - 'ILLEGAL' => 'Client sent data that is not allowed in a dynamic DNS update.', - 'TOOSOON' => 'Update frequency is too short.', - ); - - ## update each set of hosts that had similar configurations - foreach my $sig (keys %groups) { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - - #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' - - my $url; - $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; - $url .= "hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; - $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; - - if ($config{$h}{'mx'}) { - $url .= "&mx=$config{$h}{'mx'}"; - $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); - } - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); - last; - } - last if !header_ok($hosts, $reply); - - my @reply = split /\n/, $reply; - my $state = 'header'; - foreach my $line (@reply) { - if ($state eq 'header') { - $state = 'body'; - - } elsif ($state eq 'body') { - $state = 'results' if $line eq ''; - - } elsif ($state =~ /^results/) { - $state = 'results2'; - - my ($status) = $line =~ /^(\S*)\b.*/; - my $h = shift @hosts; - - $config{$h}{'status'} = $status; - if ($status eq 'NOERROR') { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - success("updating %s: %s: IP address set to %s", $h, $status, $ip); - - } elsif ($status =~ /TOOSOON/) { - ## make sure we wait at least a little - my ($wait, $units) = (5, 'm'); - my ($sec, $scale) = ($wait, 1); - - ($scale, $units) = (1, 'seconds') if $units eq 's'; - ($scale, $units) = (60, 'minutes') if $units eq 'm'; - ($scale, $units) = (60*60, 'hours') if $units eq 'h'; - $config{$h}{'wtime'} = $now + $sec; - warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); - - } elsif (exists $errors{$status}) { - failed("updating %s: %s: %s", $h, $line, $errors{$status}); - - } else { - failed("updating %s: %s: unexpected status (%s)", $h, $line); - } - last; - } - } - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) - if $state ne 'results2'; - } -} -###################################################################### - -###################################################################### -## nic_dnspark_updateable -###################################################################### -sub nic_dnspark_updateable { - my $host = shift; - my $update = 0; - - if ($config{$host}{'mx'} ne $cache{$host}{'mx'}) { - info("forcing updating %s because 'mx' has changed to %s.", $host, $config{$host}{'mx'}); - $update = 1; - - } elsif ($config{$host}{'mx'} && ($config{$host}{'mxpri'} ne $cache{$host}{'mxpri'})) { - info("forcing updating %s because 'mxpri' has changed to %s.", $host, $config{$host}{'mxpri'}); - $update = 1; - } - return $update; -} -###################################################################### -## nic_dnspark_examples -###################################################################### -sub nic_dnspark_examples { - return < [ $_ ] } @_; - - my %errors = ( - 'nochange' => 'No changes made to the hostname(s). Continual updates with no changes lead to blocked clients.', - 'nofqdn' => 'No valid FQDN (fully qualified domain name) was specified', - 'nohost'=> 'An invalid hostname was specified. This due to the fact the hostname has not been created in the system. Creating new host names via clients is not supported.', - 'abuse' => 'The hostname specified has been blocked for abuse.', - 'unauth' => 'The username specified is not authorized to update this hostname and domain.', - 'blocked' => 'The dynamic update client (specified by the user-agent) has been blocked from the system.', - 'notdyn' => 'The hostname specified has not been marked as a dynamic host. Hosts must be marked as dynamic in the system in order to be updated via clients. This prevents unwanted or accidental updates.', - ); - - ## update each set of hosts that had similar configurations - foreach my $sig (keys %groups) { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - - #'http://www.dnspark.com:80/visitors/update.html?myip=10.20.30.40&hostname=test.burry.ca' - - my $url; - $url = "http://$config{$h}{'server'}/visitors/update.html"; - $url .= "?hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; - - if ($config{$h}{'mx'}) { - $url .= "&mx=$config{$h}{'mx'}"; - $url .= "&mxpri=" . $config{$h}{'mxpri'}; - } - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); - last; - } - last if !header_ok($hosts, $reply); - - my @reply = split /\n/, $reply; - my $state = 'header'; - foreach my $line (@reply) { - if ($state eq 'header') { - $state = 'body'; - - } elsif ($state eq 'body') { - $state = 'results' if $line eq ''; - - } elsif ($state =~ /^results/) { - $state = 'results2'; - - my ($status) = $line =~ /^(\S*)\b.*/; - my $h = pop @hosts; - - $config{$h}{'status'} = $status; - if ($status eq 'ok') { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - success("updating %s: %s: IP address set to %s", $h, $status, $ip); - - } elsif ($status =~ /TOOSOON/) { - ## make sure we wait at least a little - my ($wait, $units) = (5, 'm'); - my ($sec, $scale) = ($wait, 1); - - ($scale, $units) = (1, 'seconds') if $units eq 's'; - ($scale, $units) = (60, 'minutes') if $units eq 'm'; - ($scale, $units) = (60*60, 'hours') if $units eq 'h'; - $config{$h}{'wtime'} = $now + $sec; - warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); - - } elsif (exists $errors{$status}) { - failed("updating %s: %s: %s", $h, $line, $errors{$status}); - - } else { - failed("updating %s: %s: unexpected status (%s)", $h, $line); - } - last; - } - } - failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) - if $state ne 'results2'; - } -} - -###################################################################### - -###################################################################### -## nic_namecheap_examples -###################################################################### -sub nic_namecheap_examples { - return <0/i, @reply) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("updating %s: good: IP address set to %s", $h, $ip); - } else { - $config{$h}{'status'} = 'failed'; - warning("SENT: %s", $url) unless opt('verbose'); - warning("REPLIED: %s", $reply); - failed("updating %s: Invalid reply.", $h); - } - } -} - -###################################################################### - - -###################################################################### - -###################################################################### -## nic_sitelutions_examples -###################################################################### -sub nic_sitelutions_examples { - return < patches/3com-oc-remote812.patch` -# on Wed Jun 6 15:07:45 CEST 2007 -# applied on r53 -# -# This patch was send to me by The_Beast on IRC. -# -Index: ddclient -=================================================================== ---- ddclient (revision 53) -+++ ddclient (working copy) -@@ -162,7 +162,7 @@ - '3com-oc-remote812' => { - 'name' => '3com OfficeConnect Remote 812', - 'url' => '/callEvent', -- 'skip' => '.*IP address in use', -+ 'skip' => '.*LOCAL', - }, - 'e-tech' => { - 'name' => 'E-tech Router', diff --git a/svn/patches/create_patch.sh b/svn/patches/create_patch.sh deleted file mode 100755 index 1661ac2..0000000 --- a/svn/patches/create_patch.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# whichlist -# * add getopt -# * automatic version - -{ -cat < patches/$2\` -# on $(date) -# applied on r$1 -# -EOF -svn diff -r$1 ddclient -} > patches/$2.new - diff --git a/svn/patches/ddclient-noip.patch b/svn/patches/ddclient-noip.patch deleted file mode 100644 index a87bc71..0000000 --- a/svn/patches/ddclient-noip.patch +++ /dev/null @@ -1,183 +0,0 @@ ---- ddclient 2007-08-28 15:41:51.000000000 -0700 -+++ ddclient.noip 2007-08-28 15:37:32.000000000 -0700 -@@ -376,6 +376,25 @@ - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), - }, -+ 'noip-common-defaults' => { -+ 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), -+ }, -+ 'noip-service-common-defaults' => { -+ 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), -+ 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), -+ 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), -+ 'host' => setv(T_STRING, 1, 1, 1, '', undef), -+ 'ip' => setv(T_IP, 0, 1, 0, undef, undef), -+ 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), -+ 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), -+ 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), -+ 'status' => setv(T_ANY, 0, 1, 0, '', undef), -+ 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), -+ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), -+ 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), -+ 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), -+ 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), -+ }, - ); - my %services = ( - 'dyndns1' => { -@@ -398,6 +417,16 @@ - $variables{'service-common-defaults'}, - ), - }, -+ 'noip' => { -+ 'updateable' => undef, -+ 'update' => \&nic_noip_update, -+ 'examples' => \&nic_noip_examples, -+ 'variables' => merge( -+ { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, -+ $variables{'noip-common-defaults'}, -+ $variables{'noip-service-common-defaults'}, -+ ), -+ }, - 'concont' => { - 'updateable' => undef, - 'update' => \&nic_concont_update, -@@ -2359,6 +2388,137 @@ - if $state ne 'results2'; - } - } -+ -+ -+###################################################################### -+## nic_noip_update -+## Note: uses same features as nic_dyndns2_update, less return codes -+###################################################################### -+sub nic_noip_update { -+ debug("\nnic_noip_update -------------------"); -+ -+ ## group hosts with identical attributes together -+ my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); -+ -+ my %errors = ( -+ 'badauth' => 'Invalid username or password', -+ 'badagent' => 'Invalid user agent', -+ 'nohost' => 'The hostname specified does not exist in the database', -+ '!donator' => 'The offline setting was set, when the user is not a donator', -+ 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', -+ 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', -+ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', -+ 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', -+ ); -+ -+ ## update each set of hosts that had similar configurations -+ foreach my $sig (keys %groups) { -+ my @hosts = @{$groups{$sig}}; -+ my $hosts = join(',', @hosts); -+ my $h = $hosts[0]; -+ -+ info("setting IP address to %s for %s", $ip, $hosts); -+ verbose("UPDATE:","updating %s", $hosts); -+ -+ my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ $url .= 'noip'; -+ $url .= "&hostname=$hosts"; -+ $url .= "&myip="; -+ $url .= $ip if $ip; -+ -+ -+ print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; -+ -+ -+ my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); -+ if (!defined($reply) || !$reply) { -+ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); -+ last; -+ } -+ last if !header_ok($hosts, $reply); -+ -+ my @reply = split /\n/, $reply; -+ my $state = 'header'; -+ foreach my $line (@reply) { -+ if ($state eq 'header') { -+ $state = 'body'; -+ -+ } elsif ($state eq 'body') { -+ $state = 'results' if $line eq ''; -+ -+ } elsif ($state =~ /^results/) { -+ $state = 'results2'; -+ -+ my ($status, $ip) = split / /, lc $line; -+ my $h = shift @hosts; -+ -+ $config{$h}{'status'} = $status; -+ if ($status eq 'good') { -+ $config{$h}{'ip'} = $ip; -+ $config{$h}{'mtime'} = $now; -+ success("updating %s: %s: IP address set to %s", $h, $status, $ip); -+ -+ } elsif (exists $errors{$status}) { -+ if ($status eq 'nochg') { -+ warning("updating %s: %s: %s", $h, $status, $errors{$status}); -+ $config{$h}{'ip'} = $ip; -+ $config{$h}{'mtime'} = $now; -+ $config{$h}{'status'} = 'good'; -+ -+ } else { -+ failed("updating %s: %s: %s", $h, $status, $errors{$status}); -+ } -+ -+ } elsif ($status =~ /w(\d+)(.)/) { -+ my ($wait, $units) = ($1, lc $2); -+ my ($sec, $scale) = ($wait, 1); -+ -+ ($scale, $units) = (1, 'seconds') if $units eq 's'; -+ ($scale, $units) = (60, 'minutes') if $units eq 'm'; -+ ($scale, $units) = (60*60, 'hours') if $units eq 'h'; -+ -+ $sec = $wait * $scale; -+ $config{$h}{'wtime'} = $now + $sec; -+ warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); -+ -+ } else { -+ failed("updating %s: %s: unexpected status (%s)", $h, $line); -+ } -+ } -+ } -+ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) -+ if $state ne 'results2'; -+ } -+} -+###################################################################### -+## nic_noip_examples -+###################################################################### -+sub nic_noip_examples { -+ return < 'The hostname specified exists, but not under the username currently being used', - '!donator' => 'The offline setting was set, when the user is not a donator', - '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', -- 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', -+ 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', - - 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', - 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', - diff --git a/svn/patches/debianpatches/cachedir.diff b/svn/patches/debianpatches/cachedir.diff deleted file mode 100644 index 3134537..0000000 --- a/svn/patches/debianpatches/cachedir.diff +++ /dev/null @@ -1,22 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-06-14 22:03:52.000000000 +0200 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:19.748088891 +0100 -@@ -22,6 +22,7 @@ - my $now = time; - my $hostname = hostname(); - my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; - my $last_msgs = ''; -@@ -296,7 +297,7 @@ - 'global-defaults' => { - 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), - 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), -- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), -+ 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), - 'pid' => setv(T_FILE, 0, 0, 1, "", undef), - 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), - 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), - diff --git a/svn/patches/debianpatches/cisco_fw.diff b/svn/patches/debianpatches/cisco_fw.diff deleted file mode 100644 index 6772535..0000000 --- a/svn/patches/debianpatches/cisco_fw.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.121898536 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:41.551915957 +0100 -@@ -1823,7 +1823,7 @@ - # Protect special HTML characters (like '?') - $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - -- $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; -+ $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; - $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; - $arg = $url; - - diff --git a/svn/patches/debianpatches/config_path.diff b/svn/patches/debianpatches/config_path.diff deleted file mode 100644 index b59effb..0000000 --- a/svn/patches/debianpatches/config_path.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.151893960 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:22:37.171890909 +0100 -@@ -21,7 +21,7 @@ - $program =~ s/d$//; - my $now = time; - my $hostname = hostname(); --my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $etc = ($program =~ /test/i) ? './' : '/etc/'; - my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; - diff --git a/svn/patches/debianpatches/daemon_check.diff b/svn/patches/debianpatches/daemon_check.diff deleted file mode 100644 index 75699d8..0000000 --- a/svn/patches/debianpatches/daemon_check.diff +++ /dev/null @@ -1,16 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.023913484 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:03.977494794 +0100 -@@ -993,8 +993,8 @@ - - $opt{'timeout'} = 0 if opt('timeout') < 0; - $opt{'daemon'} = minimum('daemon') -- if define($opt{'daemon'},$globals{'daemon'},0) -- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); -+ if interval(define($opt{'daemon'},$globals{'daemon'},0)) -+ && interval(define($opt{'daemon'},$globals{'daemon'})) < minimum('daemon'); - - ## define or modify host options specified on the command-line - if (exists $opt{'options'} && defined $opt{'options'}) { - diff --git a/svn/patches/debianpatches/daemon_interval.diff b/svn/patches/debianpatches/daemon_interval.diff deleted file mode 100644 index 91f0648..0000000 --- a/svn/patches/debianpatches/daemon_interval.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:36.919929347 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:15.960666685 +0100 -@@ -966,6 +966,8 @@ - sub init_config { - %opt = %saved_opt; - -+ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; -+ - ## - $opt{'quiet'} = 0 if opt('verbose'); - - diff --git a/svn/patches/debianpatches/help_nonroot(2).diff b/svn/patches/debianpatches/help_nonroot(2).diff deleted file mode 100644 index 3056836..0000000 --- a/svn/patches/debianpatches/help_nonroot(2).diff +++ /dev/null @@ -1,46 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 -@@ -553,6 +553,12 @@ - - test_geturl(opt('geturl')) if opt('geturl'); - -+## process help option -+if (opt('help')) { -+ *STDERR = *STDOUT; -+ usage(0); -+} -+ - ## read config file because 'daemon' mode may be defined there. - read_config(define($opt{'file'}, default('file')), \%config, \%globals); - init_config(); -@@ -1109,16 +1115,14 @@ - $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; - } - } -- if (opt('help')) { -- *STDERR = *STDOUT; -- usage(); -- } - } - - ###################################################################### - ## usage - ###################################################################### - sub usage { -+ my $exitcode = 1; -+ $exitcode = shift if @_ != 0; # use first arg if given - my $msg = ''; - if (@_) { - my $format = shift; -@@ -1128,7 +1132,7 @@ - } - printf STDERR "%s%s\n", $msg, $opt_usage; - sendmail(); -- exit 1; -+ exit $exitcode; - } - - ###################################################################### - diff --git a/svn/patches/debianpatches/help_nonroot.diff b/svn/patches/debianpatches/help_nonroot.diff deleted file mode 100644 index 3056836..0000000 --- a/svn/patches/debianpatches/help_nonroot.diff +++ /dev/null @@ -1,46 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 -@@ -553,6 +553,12 @@ - - test_geturl(opt('geturl')) if opt('geturl'); - -+## process help option -+if (opt('help')) { -+ *STDERR = *STDOUT; -+ usage(0); -+} -+ - ## read config file because 'daemon' mode may be defined there. - read_config(define($opt{'file'}, default('file')), \%config, \%globals); - init_config(); -@@ -1109,16 +1115,14 @@ - $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; - } - } -- if (opt('help')) { -- *STDERR = *STDOUT; -- usage(); -- } - } - - ###################################################################### - ## usage - ###################################################################### - sub usage { -+ my $exitcode = 1; -+ $exitcode = shift if @_ != 0; # use first arg if given - my $msg = ''; - if (@_) { - my $format = shift; -@@ -1128,7 +1132,7 @@ - } - printf STDERR "%s%s\n", $msg, $opt_usage; - sendmail(); -- exit 1; -+ exit $exitcode; - } - - ###################################################################### - diff --git a/svn/patches/debianpatches/ip-up_run-parts.diff b/svn/patches/debianpatches/ip-up_run-parts.diff deleted file mode 100644 index 2a504d9..0000000 --- a/svn/patches/debianpatches/ip-up_run-parts.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/sample-etc_ppp_ip-up.local -=================================================================== ---- ddclient-3.7.0.orig/sample-etc_ppp_ip-up.local 2006-06-14 21:59:40.000000000 +0200 -+++ ddclient-3.7.0/sample-etc_ppp_ip-up.local 2006-12-01 23:22:37.101901586 +0100 -@@ -34,7 +34,7 @@ - ;; - *) ( - sleep 5 -- ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 -+ ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 - ) & - ;; - esac - diff --git a/svn/patches/debianpatches/maxinterval.diff b/svn/patches/debianpatches/maxinterval.diff deleted file mode 100644 index b245c9d..0000000 --- a/svn/patches/debianpatches/maxinterval.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.062907535 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:53.543086628 +0100 -@@ -357,7 +357,7 @@ - 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), - 'status' => setv(T_ANY, 0, 1, 0, '', undef), - 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), -- 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), -+ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), - 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), - - 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), - diff --git a/svn/patches/debianpatches/readme.txt b/svn/patches/debianpatches/readme.txt deleted file mode 100644 index cbd54f5..0000000 --- a/svn/patches/debianpatches/readme.txt +++ /dev/null @@ -1,24 +0,0 @@ -(submitted by Torsten) - -cisco_fw.diff -config_path.diff -daemon_check.diff -daemon_interval.diff -maxinterval.diff -sample_path.diff -smc-barricade-7401bra.patch -smc-barricade-fw-alt.diff -update-new-config.patch - -cisco_fw.diff: Not sure what this change was about, have to check my - change log. -daemon_check.diff: Changes interpretation of the daemon parameter - to interval (to allow 5m for minutes etc.) when checking for min - value. -daemon_interval.diff: Changes interpretation of daemon interval during - input (now that I look at this, those two could probably be merged). - maxinterval.diff: Increase max interval for updates. - sample_path.diff: Adjust path in stamples. - update-new-config.patch: Force update if config has changed (still - needed?) - smc-*: Support for two more routers. diff --git a/svn/patches/debianpatches/sample_path.diff b/svn/patches/debianpatches/sample_path.diff deleted file mode 100644 index 2bfb485..0000000 --- a/svn/patches/debianpatches/sample_path.diff +++ /dev/null @@ -1,26 +0,0 @@ -Index: ddclient-3.6.2/sample-etc_cron.d_ddclient -=================================================================== ---- ddclient-3.6.2.orig/sample-etc_cron.d_ddclient 2002-01-04 00:56:34.000000000 +0100 -+++ ddclient-3.6.2/sample-etc_cron.d_ddclient 2005-10-18 23:41:12.000000000 +0200 -@@ -10,7 +10,7 @@ - ###################################################################### - ## force an update twice a month - ## --30 23 1,15 * * root /root/bin/ddclient -daemon=0 -syslog -quiet -force -+30 23 1,15 * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet -force - ###################################################################### - ## retry failed updates every hour (only if you are not using daemon-mode) - ## -Index: ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe -=================================================================== ---- ddclient-3.6.2.orig/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:40:22.000000000 +0200 -+++ ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:41:02.000000000 +0200 -@@ -15,6 +15,6 @@ - 192.168.*) ;; - *) - logger -t dhcpcd IP address changed to $1 -- /root/bin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 -+ /usr/sbin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 - ;; - esac - diff --git a/svn/patches/debianpatches/smc-barricade-7401bra.patch b/svn/patches/debianpatches/smc-barricade-7401bra.patch deleted file mode 100644 index aadfec5..0000000 --- a/svn/patches/debianpatches/smc-barricade-7401bra.patch +++ /dev/null @@ -1,23 +0,0 @@ -Add support for SMC7401BRA: - -ddclient support several kind of firewall to retrieve IP address, two of -them are smc-barricade and smc-barricade-alt, but these both doesn't -work with an SMC7401BRA. - -Index: ddclient -=================================================================== ---- ddclient.orig 2006-12-01 23:22:36.958923399 +0100 -+++ ddclient 2006-12-01 23:25:09.796607052 +0100 -@@ -73,6 +73,11 @@ - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, -+ 'smc-barricade-7401bra' => { -+ 'name' => 'SMC Barricade 7401BRA FW', -+ 'url' => '/admin/wan1.htm', -+ 'skip' => 'IP Address', -+ }, - 'netgear-rt3xx' => { - 'name' => 'Netgear FW', - 'url' => '/mtenSysStatus.html', - diff --git a/svn/patches/debianpatches/smc-barricade-fw-alt.diff b/svn/patches/debianpatches/smc-barricade-fw-alt.diff deleted file mode 100644 index c42637e..0000000 --- a/svn/patches/debianpatches/smc-barricade-fw-alt.diff +++ /dev/null @@ -1,17 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.003916535 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:06.131166238 +0100 -@@ -73,6 +73,11 @@ - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, -+ 'smc-barricade-alt' => { -+ 'name' => 'SMC Barricade FW (alternate config)', -+ 'url' => '/status.HTM', -+ 'skip' => 'WAN IP', -+ }, - 'smc-barricade-7401bra' => { - 'name' => 'SMC Barricade 7401BRA FW', - 'url' => '/admin/wan1.htm', - diff --git a/svn/patches/debianpatches/update-new-config.patch b/svn/patches/debianpatches/update-new-config.patch deleted file mode 100644 index 4dd6240..0000000 --- a/svn/patches/debianpatches/update-new-config.patch +++ /dev/null @@ -1,22 +0,0 @@ -ddclient did not update the dynamic DNS entry if the config changes. -This patch by Frans Pop to fixes this problem reported as Debian bug -#217041. -Index: ddclient -=================================================================== ---- ddclient.orig 2006-12-01 23:22:36.938926449 +0100 -+++ ddclient 2006-12-01 23:25:12.987120319 +0100 -@@ -1998,6 +1998,13 @@ - } elsif (defined($sub) && &$sub($host)) { - $update = 1; - -+ } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || -+ ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || -+ ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || -+ ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { -+ info("updating %s because host settings have been changed.", $host); -+ $update = 1; -+ - } else { - success("%s: skipped: IP address was already set to %s.", $host, $ip) - if opt('verbose'); - diff --git a/svn/patches/easydns.patch b/svn/patches/easydns.patch deleted file mode 100644 index 7458fe4..0000000 --- a/svn/patches/easydns.patch +++ /dev/null @@ -1,44 +0,0 @@ -# -# patch from -# ---- ddclient 2004-11-24 17:23:56.000000000 +0100 -+++ ddclient.orig 2005-01-25 10:03:22.640483000 +0100 -@@ -257,6 +257,11 @@ - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), - }, -+ 'easydns-common-defaults' => { -+ 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), -+ 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), -+ 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), -+ }, - 'dnspark-common-defaults' => { - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), -@@ -319,6 +324,7 @@ - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, -+ $variables{'easydns-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, -@@ -2487,14 +2493,14 @@ - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - -- #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' -+ #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' - - my $url; -- $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; -- $url .= "&host_id=$hosts"; -+ $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; -+ $url .= "hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; -- $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; -+ $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; - - if ($config{$h}{'mx'}) { - $url .= "&mx=$config{$h}{'mx'}"; diff --git a/svn/patches/eurodns.patch b/svn/patches/eurodns.patch deleted file mode 100644 index 5d542cc..0000000 --- a/svn/patches/eurodns.patch +++ /dev/null @@ -1,23 +0,0 @@ -# -# patch created with `svn diff -r83 . > patches/eurodns` -# on Tue Feb 19 15:57:27 CET 2008 -# -# This patch is based on the original patch from patch #1668836 -# It's currently not applied to subversion version of ddclient -# -Index: ddclient -=================================================================== ---- ddclient (revision 83) -+++ ddclient (working copy) -@@ -2303,6 +2303,11 @@ - - ## Select the DynDNS system to update - my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ # hack for EuroDynDNS -+ if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { -+ $url = "http://$config{$h}{'server'}/update/?system="; -+ } -+ - if ($config{$h}{'custom'}) { - warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) - if $config{$h}{'static'}; diff --git a/svn/patches/mail-on-kill.patch b/svn/patches/mail-on-kill.patch deleted file mode 100644 index dd38ada..0000000 --- a/svn/patches/mail-on-kill.patch +++ /dev/null @@ -1,44 +0,0 @@ -# -# patch created with `svn diff -r82 . > patches/mail-on-kill.patch` -# on Fri Feb 8 11:03:01 CET 2008 -# applied on r82 -# -# This patch prevent ddclient sending out mail when interrupted by -# a TERM signal. It still sends mail ended by a KILL signal. -# -Index: ddclient -=================================================================== ---- ddclient (revision 82) -+++ ddclient (working copy) -@@ -602,8 +602,10 @@ - } - my $caught_hup = 0; - my $caught_term = 0; -+my $caught_kill = 0; - $SIG{'HUP'} = sub { $caught_hup = 1; }; - $SIG{'TERM'} = sub { $caught_term = 1; }; -+$SIG{'KILL'} = sub { $caught_kill = 1; }; - if (opt('daemon') && !opt('force')) { - $SIG{'CHLD'} = 'IGNORE'; - my $pid = fork; -@@ -665,7 +667,7 @@ - sendmail(); - - my $left = $daemon; -- while (($left > 0) && !$caught_hup && !$caught_term) { -+ while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) { - my $delay = $left > 10 ? 10 : $left; - - $0 = sprintf("%s - sleeping for %s seconds", $program, $left); -@@ -681,9 +683,9 @@ - } else { - $result = $result eq 'OK' ? 0 : 1; - } --} while ($daemon && !$result && !$caught_term); -+} while ($daemon && !$result && !$caught_term && !$caught_kill); - --warning("caught SIGTERM; exiting") if $caught_term; -+warning("caught SIGKILL; exiting") if $caught_kill; - unlink_pid(); - sendmail(); - diff --git a/svn/patches/no-host.patch b/svn/patches/no-host.patch deleted file mode 100644 index a5121d3..0000000 --- a/svn/patches/no-host.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ddclient -=================================================================== ---- ddclient (revision 88) -+++ ddclient (working copy) -@@ -1996,7 +1996,7 @@ - my $sub = shift; - my $update = 0; - -- if ($config{$host}{'login'} eq '') { -+ if (!($config{$host}{'login'})) { - warning("null login name specified for host %s.", $host); - - } elsif ($config{$host}{'password'} eq '') { diff --git a/svn/patches/opendns.patch b/svn/patches/opendns.patch deleted file mode 100644 index c4db577..0000000 --- a/svn/patches/opendns.patch +++ /dev/null @@ -1,18 +0,0 @@ -# -# patch created with `svn diff -r65 . > patches/opendns` -# on Mon Jul 23 14:20:22 CEST 2007 -# applied on r65 -# -Index: ddclient -=================================================================== ---- ddclient (revision 65) -+++ ddclient (working copy) -@@ -2272,7 +2272,7 @@ - verbose("UPDATE:","updating %s", $hosts); - - ## Select the DynDNS system to update -- my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ my $url = "https://updates.opendns.com/account/ddns.php?system="; - if ($config{$h}{'custom'}) { - warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) - if $config{$h}{'static'}; diff --git a/svn/patches/readme.patch b/svn/patches/readme.patch deleted file mode 100644 index 812cad4..0000000 --- a/svn/patches/readme.patch +++ /dev/null @@ -1,24 +0,0 @@ -# -# patch submitted by Kmos -# See tracker #1752931 -# ---- README.orig 2007-07-09 23:50:01.000000000 +0100 -+++ README 2007-07-12 20:50:28.000000000 +0100 -@@ -18,7 +16,7 @@ - - Dynamic DNS services currently supported include: - --DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. -+DynDNS.com - See http://www.dyndns.com 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. -@@ -34,7 +32,7 @@ - http://sourceforge.net/projects/ddclient/ - - 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. -+through sourceforge.net. Please check out http://ddclient.sf.net - - ------------------------------------------------------------------------------- - REQUIREMENTS: diff --git a/svn/patches/regex_vlan.patch b/svn/patches/regex_vlan.patch deleted file mode 100644 index e063768..0000000 --- a/svn/patches/regex_vlan.patch +++ /dev/null @@ -1,23 +0,0 @@ -# -# patch created with `svn diff -r61 . > patches/regex_vlan.patch` -# on Tue Jul 10 21:29:49 CEST 2007 -# applied on r61 -# -# bug originally reported on ubuntu: -# https://bugs.edge.launchpad.net/ubuntu/+source/ddclient/+bug/77570 -# posted upstream as bug #1747337 -# patch written by marclogghe -# -Index: ddclient -=================================================================== ---- ddclient (revision 61) -+++ ddclient (working copy) -@@ -1601,7 +1601,7 @@ - return undef if $value eq ""; - - } elsif ($type eq T_IF) { -- return undef if $value !~ /^[a-z0-9:_-]+$/; -+ return undef if $value !~ /^[a-z0-9:._-]+$/; - - } elsif ($type eq T_PROG) { - return undef if $value eq ""; diff --git a/svn/patches/typo_dnspark.patch b/svn/patches/typo_dnspark.patch deleted file mode 100644 index aa9bbdd..0000000 --- a/svn/patches/typo_dnspark.patch +++ /dev/null @@ -1,15 +0,0 @@ -# -# typo_dnspark.patch send by Marco. -# Applied on ddclient Rev 72 -# ---- ddclient.orig 2007-07-31 15:44:20.000000000 +0100 -+++ ddclient 2007-07-31 15:45:52.000000000 +0100 -@@ -2875,7 +2875,7 @@ - - The 'dnspark' protocol is used by DNS service offered by www.dnspark.com. - --Configuration variables applicable to the 'easydns' protocol are: -+Configuration variables applicable to the 'dnspark' protocol are: - protocol=dnspark ## - server=fqdn.of.service ## defaults to www.dnspark.com - backupmx=no|yes ## indicates that DNSPark should be the secondary MX diff --git a/svn/patches/typo_namecheap_patch.diff.new b/svn/patches/typo_namecheap_patch.diff.new deleted file mode 100644 index 53704f8..0000000 --- a/svn/patches/typo_namecheap_patch.diff.new +++ /dev/null @@ -1,18 +0,0 @@ -# -# patch created with `svn diff -r57 . > patches/typo_namecheap_patch.diff` -# on Tue Jul 10 09:25:19 CEST 2007 -# applied on r57 -# -Index: ddclient -=================================================================== ---- ddclient (revision 59) -+++ ddclient (working copy) -@@ -3014,7 +3014,7 @@ - - The 'namecheap' protocol is used by DNS service offered by www.namecheap.com. - --Configuration variables applicable to the 'easydns' protocol are: -+Configuration variables applicable to the 'namecheap' protocol are: - protocol=namecheap ## - server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com - login=service-login ## login name and password registered with the service diff --git a/svn/patches/ubuntu/checked_ssl_load.diff b/svn/patches/ubuntu/checked_ssl_load.diff deleted file mode 100644 index 305ffb6..0000000 --- a/svn/patches/ubuntu/checked_ssl_load.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-05-03 23:24:39.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-05-03 23:27:44.000000000 +0100 -@@ -1635,6 +1642,20 @@ - $res; - } - ###################################################################### -+## load_ssl_support -+###################################################################### -+sub load_ssl_support { -+ my $ssl_loaded = eval {require IO::Socket::SSL}; -+ unless ($ssl_loaded) { -+ fatal(<<"EOM"); -+Error loading the Perl module IO::Socket::SSL needed for SSL connect. -+On Debian, the package libio-socket-ssl-perl must be installed. -+EOM -+ } -+ import IO::Socket::SSL; -+ { no warnings; $IO::Socket::SSL::DEBUG = 0; } -+} -+###################################################################### - ## geturl - ###################################################################### - sub geturl { -@@ -1663,9 +1684,7 @@ - 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; } -+ load_ssl_support; - } else { - $use_ssl = 0; - $default_port = 80; diff --git a/svn/patches/ubuntu/config_path.diff b/svn/patches/ubuntu/config_path.diff deleted file mode 100644 index 3908302..0000000 --- a/svn/patches/ubuntu/config_path.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-28 14:31:23.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-04-28 14:31:33.000000000 +0100 -@@ -21,7 +21,7 @@ - $program =~ s/d$//; - my $now = time; - my $hostname = hostname(); --my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $etc = ($program =~ /test/i) ? './' : '/etc/'; - my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; diff --git a/svn/patches/ubuntu/daemon_interval.diff b/svn/patches/ubuntu/daemon_interval.diff deleted file mode 100644 index d997b32..0000000 --- a/svn/patches/ubuntu/daemon_interval.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-28 20:43:53.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-04-28 20:42:57.000000000 +0100 -@@ -977,6 +977,8 @@ - sub init_config { - %opt = %saved_opt; - -+ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; -+ - ## - $opt{'quiet'} = 0 if opt('verbose'); - diff --git a/svn/patches/ubuntu/default-timeout.patch b/svn/patches/ubuntu/default-timeout.patch deleted file mode 100644 index 1f7197f..0000000 --- a/svn/patches/ubuntu/default-timeout.patch +++ /dev/null @@ -1,13 +0,0 @@ -# patch original from ubuntu forum: -# https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 ---- ddclient 2007-10-25 19:39:46.000000000 +0300 -+++ ddclient 2007-10-25 19:36:41.000000000 +0300 -@@ -328,7 +328,7 @@ - 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), - 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), - -- 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), -+ 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), diff --git a/svn/patches/ubuntu/sample_ubuntu.diff b/svn/patches/ubuntu/sample_ubuntu.diff deleted file mode 100644 index ab2a7cd..0000000 --- a/svn/patches/ubuntu/sample_ubuntu.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu.orig 2007-04-28 13:01:23.000000000 +0100 -+++ ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu 2007-04-28 13:01:51.000000000 +0100 -@@ -5,7 +5,7 @@ - # Submitted by paolo martinelli - - DDCLIENT=/usr/sbin/ddclient --CONF=/etc/ddclient/ddclient.conf -+CONF=/etc/ddclient.conf - PIDFILE=/var/run/ddclient.pid - - test -x $DDCLIENT || exit 0 diff --git a/svn/patches/ubuntu/series b/svn/patches/ubuntu/series deleted file mode 100644 index 698bcdd..0000000 --- a/svn/patches/ubuntu/series +++ /dev/null @@ -1,6 +0,0 @@ -config_path.diff -dyndns_com.diff -daemon_interval.diff -sample_ubuntu.diff -smc-barricade-fw-alt.diff -checked_ssl_load.diff diff --git a/svn/patches/ubuntu/smc-barricade-fw-alt.diff b/svn/patches/ubuntu/smc-barricade-fw-alt.diff deleted file mode 100644 index a91c63f..0000000 --- a/svn/patches/ubuntu/smc-barricade-fw-alt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-30 00:43:32.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-05-03 23:07:24.000000000 +0100 -@@ -73,6 +73,11 @@ - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, -+ 'smc-barricade-alt' => { -+ 'name' => 'SMC Barricade FW (alternate config)', -+ 'url' => '/status.HTM', -+ 'skip' => 'WAN IP', -+ }, - 'smc-barricade-7401bra' => { - 'name' => 'SMC Barricade 7401BRA FW', - 'url' => '/admin/wan1.htm', diff --git a/svn/release/readme.txt b/svn/release/readme.txt deleted file mode 100644 index 1753bc6..0000000 --- a/svn/release/readme.txt +++ /dev/null @@ -1,36 +0,0 @@ -This directory will contain anything related to releasing a new version of -ddclient. It will be a replacement for -http://ddclient.wiki.sourceforge.net/HowtoRelease - -Releasing files - -* tagging current version: see svn book -* svn copy https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.7.2 -* version nr aanpassen -* bz2 en gz file aanmaken -* ftp naar sf.net -* aanmaken release: - -Release Notes 3.6.5 2004-11-24 -ddclient-3.6.5.tar.bz2 33311 0 Any .bz2 -ddclient-3.6.5.tar.gz 35726 0 Any .gz - -* mail naar ddclient-support -* news updaten - - -* freshmeat updaten -* website bijtimmeren: versie nummer aanpassen -* [https://www.dyndns.com/developers/listings/3 dyndns update] - - -website - -* recentste routers -* postscript - - -rss feeds - -* see https://sourceforge.net/export/rss2_project.php?group_id=116817 - diff --git a/svn/sample-etc_cron.d_ddclient b/svn/sample-etc_cron.d_ddclient deleted file mode 100644 index 32c51a4..0000000 --- a/svn/sample-etc_cron.d_ddclient +++ /dev/null @@ -1,17 +0,0 @@ -###################################################################### -## ddclient is an IP address updater for www.dyndns.org -## $Id$ -###################################################################### -## minute 0-59 -## hour 0-23 -## day of month 1-31 -## month 1-12 (or names, see below) -## day of week 0-7 (0 or 7 is Sun, or use names) -###################################################################### -## force an update twice a month (only if you are not using daemon-mode) -## -## 30 23 1,15 * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet -force -###################################################################### -## retry failed updates every hour (only if you are not using daemon-mode) -## -## 0 * * * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet retry diff --git a/svn/sample-etc_ddclient.conf b/svn/sample-etc_ddclient.conf deleted file mode 100644 index 92eb989..0000000 --- a/svn/sample-etc_ddclient.conf +++ /dev/null @@ -1,160 +0,0 @@ -###################################################################### -## -## $Id$ -## -## Define default global variables with lines like: -## var=value [, var=value]* -## These values will be used for each following host unless overridden -## with a local variable definition. -## -## Define local variables for one or more hosts with: -## var=value [, var=value]* host.and.domain[,host2.and.domain...] -## -## 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 -#use=smc-barricade, fw=192.168.123.254:80 # via SMC's Barricade FW -#use=netgear-rt3xx, fw=192.168.0.1:80 # via Netgear's internet FW -#use=linksys, fw=192.168.1.1:80 # via Linksys's internet FW -#use=maxgate-ugate3x00, fw=192.168.0.1:80 # via MaxGate's UGATE-3x00 FW -#use=elsa-lancom-dsl10, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router -#use=elsa-lancom-dsl10-ch01, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router -#use=elsa-lancom-dsl10-ch02, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router -#use=alcatel-stp, fw=10.0.0.138:80 # via Alcatel Speed Touch Pro -#use=xsense-aero, fw=192.168.1.1:80 # via Xsense Aero Router -#use=allnet-1298, fw=192.168.1.1:80 # via AllNet 1298 DSL Router -#use=3com-oc-remote812, fw=192.168.0.254:80 # via 3com OfficeConnect Remote 812 -#use=e-tech, fw=192.168.1.1:80 # via E-tech Router -#use=cayman-3220h, fw=192.168.0.1:1080 # via Cayman 3220-H DSL Router -# -#fw-login=admin, fw-password=XXXXXX # FW login and password -# -## To obtain an IP address from FW status page (using fw-login, fw-password) -#use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Address -# -## To obtain an IP address from Web status page (using the proxy if defined) -#use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address -# -#use=ip, ip=127.0.0.1 # via static IP's -#use=if, if=eth0 # via interfaces -#use=web # via web -# -#protocol=dyndns2 # default protocol -#proxy=fasthttp.sympatico.ca:80 # default proxy -#server=members.dyndns.org # default server -#server=members.dyndns.org:8245 # default server (bypassing proxies) - -#login=your-login # default login -#password=test # default password -#mx=mx.for.your.host # default MX -#backupmx=yes|no # host is primary MX? -#wildcard=yes|no # add wildcard CNAME? - -## -## dyndns.org dynamic addresses -## -## (supports variables: wildcard,mx,backupmx) -## -# server=members.dyndns.org, \ -# protocol=dyndns2 \ -# your-dynamic-host.dyndns.org - -## -## dyndns.org static addresses -## -## (supports variables: wildcard,mx,backupmx) -## -# static=yes, \ -# server=members.dyndns.org, \ -# protocol=dyndns2 \ -# your-static-host.dyndns.org - -## -## -## dyndns.org custom addresses -## -## (supports variables: wildcard,mx,backupmx) -## -# custom=yes, \ -# server=members.dyndns.org, \ -# protocol=dyndns2 \ -# your-domain.top-level,your-other-domain.top-level - -## -## ZoneEdit (zoneedit.com) -## -# server=dynamic.zoneedit.com, \ -# protocol=zoneedit1, \ -# login=your-zoneedit-login, \ -# password=your-zoneedit-password \ -# your.any.domain,your-2nd.any.dom - -## -## EasyDNS (easydns.com) -## -# server=members.easydns.com, \ -# protocol=easydns, \ -# login=your-easydns-login, \ -# password=your-easydns-password \ -# your.any.domain,your-2nd.any.domain - -## -## Hammernode (hn.org) dynamic addresses -## -# server=dup.hn.org, \ -# protocol=hammernode1, \ -# login=your-hn-login, \ -# password=your-hn-password \ -# your-hn-host.hn.org,your-2nd-hn-host.hn.org - -## -## dslreports.com dynamic-host monitoring -## -# server=members.dslreports.com \ -# protocol=dslreports1, \ -# login=dslreports-login, \ -# password=dslreports-password \ -# dslreports-unique-id - -## -## OrgDNS.org account-configuration -## -# use=web, web=members.orgdns.org/nic/ip -# server=www.orgdns.org \ -# protocol=dyndns2 \ -# login=yourLoginName \ -# password=yourPassword \ -# yourSubdomain.orgdns.org - -## -## dnspark.com -## (supports variables: mx, mxpri) -## -# use=web, web=ipdetect.dnspark.com, web-skip='Current Address:' -# protocol=dnspark, \ -# server=www.dnspark.com, \ -# your-host.dnspark.com - -## -## NameCheap (namecheap.com) -## -# protocol=namecheap, \ -# server=dynamicdns.park-your-domain.com, \ -# login=my-namecheap.com-login, \ -# password=my-namecheap.com-password \ -# myhost.namecheap.com diff --git a/svn/sample-etc_dhclient-exit-hooks b/svn/sample-etc_dhclient-exit-hooks deleted file mode 100644 index 97102c8..0000000 --- a/svn/sample-etc_dhclient-exit-hooks +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -###################################################################### -## $Id$ -###################################################################### -# The /etc/dhclient-enter-hooks script is run by the ISC DHCP client's standard -# update script whenever dhclient obtains or renews an address. - -PATH=/usr/sbin:${PATH} -case "$new_ip_address" in -10.*) ;; -172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; -192.168.*) ;; -*) - logger -t dhclient IP address changed to $new_ip_address - ddclient -daemon=0 -syslog -use=ip -ip=$new_ip_address >/dev/null 2>&1 - ;; -esac diff --git a/svn/sample-etc_dhcpc_dhcpcd-eth0.exe b/svn/sample-etc_dhcpc_dhcpcd-eth0.exe deleted file mode 100644 index 437e92e..0000000 --- a/svn/sample-etc_dhcpc_dhcpcd-eth0.exe +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -###################################################################### -## $Id$ -###################################################################### -PATH=/usr/sbin:${PATH} - -## update the DNS server unless the IP address is a private address -## that may be used as an internal LAN address. This may be true if -## other interfaces are assigned private addresses from internal -## DHCP server. - -case "$1" in -10.*) ;; -172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; -192.168.*) ;; -*) - logger -t dhcpcd IP address changed to $1 - ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 - ;; -esac diff --git a/svn/sample-etc_ppp_ip-up.local b/svn/sample-etc_ppp_ip-up.local deleted file mode 100644 index b7a9025..0000000 --- a/svn/sample-etc_ppp_ip-up.local +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -###################################################################### -## $Id$ -###################################################################### -## -## On my host, pppd invokes this script with args: -## /etc/ppp/ip-up.local ppp0 /dev/pts/1 115200 192.168.2.1 192.168.2.3 -## -## From the manual page for my pppd, these aguments are: -## scriptname interface-name tty-device speed local-IP-address remote-IP-address ipparam -## -## Some people have reported that their pppd returns their -## local-IP-address as $3. If that's also the case for you, -## you may need to change the $4 below to $3. This may not -## be necessary if your pppd also passes the local-ip-address -## in the environment as either PPP_LOCAL or IPLOCAL. -## -###################################################################### -PATH=/usr/sbin:${PATH} -IP= -IP=${IP:-$PPP_LOCAL} -IP=${IP:-$IPLOCAL} -IP=${IP:-$4} - -## update the DNS server unless the IP address is a private address -## that may be used as an internal LAN address (or PPtP tunnel). - -logger -t ddclient $0 $* -case "$IP" in -10.*) ;; -172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; -192.168.*) ;; -"") logger -t ddclient No local IP given so cannot update - ;; -*) ( - sleep 5 - ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 - ) & - ;; -esac diff --git a/svn/sample-etc_rc.d_init.d_ddclient b/svn/sample-etc_rc.d_init.d_ddclient deleted file mode 100755 index ab6faf6..0000000 --- a/svn/sample-etc_rc.d_init.d_ddclient +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# -# ddclient This shell script takes care of starting and stopping -# ddclient. -# -# chkconfig: 2345 65 35 -# description: ddclient provides support for updating dynamic DNS services. - -CONF=/etc/ddclient/ddclient.conf -program=ddclient - -[ -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 - -# 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: " - if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then - daemon $program $DELAY - else - ddclient $DELAY - fi - echo - ;; - stop) - # Stop daemon. - echo -n "Shutting down ddclient: " - 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) - $0 stop - $0 start - ;; - status) - 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 - ;; - *) - echo "Usage: ddclient {start|stop|restart|status}" - exit 1 -esac - -exit 0 - diff --git a/svn/sample-etc_rc.d_init.d_ddclient.lsb b/svn/sample-etc_rc.d_init.d_ddclient.lsb deleted file mode 100755 index 01f06e1..0000000 --- a/svn/sample-etc_rc.d_init.d_ddclient.lsb +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# -# ddclient This shell script takes care of starting and stopping -# ddclient. -# -# chkconfig: 2345 65 35 -# description: ddclient provides support for updating dynamic DNS services. -# -# Above is for RedHat and now the LSB part -### BEGIN INIT INFO -# Provides: ddclient -# Required-Start: $syslog $remote_fs -# Should-Start: $time ypbind sendmail -# Required-Stop: $syslog $remote_fs -# Should-Stop: $time ypbind sendmail -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: ddclient provides support for updating dynamic DNS services -# Description: ddclient is a Perl client used to update dynamic DNS -# entries for accounts on many dynamic DNS services and -# can be used on many types of firewalls -### END INIT INFO -# -# $Id$ -# -### - -[ -f /etc/ddclient/ddclient.conf ] || exit 0 - -DDCLIENT_BIN=/usr/sbin/ddclient - -# -# LSB Standard (SuSE,RedHat,...) -# -if [ -f /lib/lsb/init-functions ] ; then - . /lib/lsb/init-functions -fi - -# See how we were called. -case "$1" in - start) - echo -n "Starting ddclient " - start_daemon $DDCLIENT_BIN -daemon 300 - rc_status -v - ;; - stop) - echo -n "Shutting down ddclient " - killproc -TERM `basename $DDCLIENT_BIN` - rc_status -v - ;; - restart) - $0 stop - $0 start - rc_status - ;; - status) - echo -n "Checking for service ddclient " - checkproc `basename $DDCLIENT_BIN`w - rc_status -v - ;; - *) - echo "Usage: ddclient {start|stop|restart|status}" - exit 1 -esac - -exit 0 diff --git a/svn/sample-etc_rc.d_init.d_ddclient.redhat b/svn/sample-etc_rc.d_init.d_ddclient.redhat deleted file mode 100755 index a81b8cb..0000000 --- a/svn/sample-etc_rc.d_init.d_ddclient.redhat +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# $Id$ -# ddclient This shell script takes care of starting and stopping -# ddclient. -# -# chkconfig: 2345 65 35 -# description: ddclient provides support for updating dynamic DNS services. - -[ -f /etc/ddclient/ddclient.conf ] || exit 0 - -. /etc/rc.d/init.d/functions - -# See how we were called. -case "$1" in - start) - # Start daemon. - echo -n "Starting ddclient: " - touch /var/lock/subsys/ddclient - daemon ddclient -daemon 300 - echo - ;; - stop) - # Stop daemon. - echo -n "Shutting down ddclient: " - killproc ddclient - echo - rm -f /var/lock/subsys/ddclient - ;; - restart) - $0 stop - $0 start - ;; - status) - status ddclient - ;; - *) - echo "Usage: ddclient {start|stop|restart|status}" - exit 1 -esac - -exit 0 diff --git a/svn/sample-etc_rc.d_init.d_ddclient.ubuntu b/svn/sample-etc_rc.d_init.d_ddclient.ubuntu deleted file mode 100755 index 93b0ba4..0000000 --- a/svn/sample-etc_rc.d_init.d_ddclient.ubuntu +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# Start ddclient that provides support for updating dynamic DNS services. -# -# Submitted by paolo martinelli - -DDCLIENT=/usr/sbin/ddclient -CONF=/etc/ddclient/ddclient.conf -PIDFILE=/var/run/ddclient.pid - -test -x $DDCLIENT || exit 0 -test -f $CONF || exit 0 - -. /lib/lsb/init-functions - -case "$1" in -start) -log_begin_msg "Starting ddclient..." -DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` -if [ -z "$DELAY" ] ; then -DELAY="-daemon 300" -else -DELAY='' -fi -start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY -log_end_msg $? -;; -stop) -if [ -f $PIDFILE ] ; then -log_begin_msg "Stopping ddclient..." -start-stop-daemon -K -q -p $PIDFILE -log_end_msg $? -rm -f $PIDFILE -fi -;; -restart|reload|force-reload) -$0 stop -$0 start -;; -*) -log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}" -exit 1 -;; -esac - -exit 0 - From d0f9a33f194152eb88080f2268c85c63abb895dd Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 4 Jul 2008 17:04:42 +0000 Subject: [PATCH 150/231] namecheap patch added to patches section git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@99 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/namecheap.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/namecheap.patch diff --git a/patches/namecheap.patch b/patches/namecheap.patch new file mode 100644 index 0000000..88486b9 --- /dev/null +++ b/patches/namecheap.patch @@ -0,0 +1,19 @@ +# https://sourceforge.net/forum/message.php?msg_id=4789961 +# By: hankessels +# +--- ddclient.old 2008-02-21 00:57:17.000000000 +0900 ++++ ddclient 2008-02-21 01:36:42.000000000 +0900 +@@ -3060,8 +3060,11 @@ sub nic_namecheap_update { + + my $url; + $url = "http://$config{$h}{'server'}/update"; +- $url .= "?host=$h"; +- $url .= "&domain=$config{$h}{'login'}"; ++ my $domain = $config{$h}{'login'}; ++ my $host = $h; ++ $host =~ s/(.*)\.$domain(.*)/$1$2/; ++ $url .= "?host=$host"; ++ $url .= "&domain=$domain"; + $url .= "&password=$config{$h}{'password'}"; + $url .= "&ip="; + $url .= $ip if $ip; From eb93d66237189725076a4d6bca79222ff108907f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 30 Sep 2008 20:41:53 +0000 Subject: [PATCH 151/231] extra comments added to namecheap patch git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@100 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/namecheap.patch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/patches/namecheap.patch b/patches/namecheap.patch index 88486b9..56b761c 100644 --- a/patches/namecheap.patch +++ b/patches/namecheap.patch @@ -1,6 +1,10 @@ # https://sourceforge.net/forum/message.php?msg_id=4789961 # By: hankessels # +# this patch (r99) isn't complete yet. +# Check https://sourceforge.net/forum/message.php?msg_id=5053976 +# for more details. Patch has already been posted to the patches +# section as id #2010819 --- ddclient.old 2008-02-21 00:57:17.000000000 +0900 +++ ddclient 2008-02-21 01:36:42.000000000 +0900 @@ -3060,8 +3060,11 @@ sub nic_namecheap_update { From c92e2d1c612d6058451891a9946ae728f8b6d8da Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 30 Sep 2008 20:49:07 +0000 Subject: [PATCH 152/231] Added support for multiple IP adresses. See http://permalink.gmane.org/gmane.network.dns.ddclient.user/17 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@101 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 69 +++++++++--- patches/multiple-ip.patch | 227 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 279 insertions(+), 17 deletions(-) create mode 100644 patches/multiple-ip.patch diff --git a/ddclient b/ddclient index 0031866..07c0070 100755 --- a/ddclient +++ b/ddclient @@ -10,6 +10,9 @@ # # website: http://ddclient.sf.net # +# Support for multiple IP numbers added by +# Astaro AG, Ingo Schwarze September 16, 2008 +# ###################################################################### require 5.004; use strict; @@ -349,6 +352,19 @@ my %variables = ( 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), 'host' => setv(T_STRING, 1, 1, 1, '', undef), + + 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), + 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), + 'if-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), + 'web-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'fw' => setv(T_ANY, 0, 0, 1, '', undef), + 'fw-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'fw-login' => setv(T_LOGIN, 0, 0, 1, '', undef), + 'fw-password' => setv(T_PASSWD,0, 0, 1, '', undef), + 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), + 'cmd-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), @@ -625,7 +641,7 @@ if (opt('daemon') && !opt('force')) { } umask 077; -my ($daemon, $ip); +my $daemon; do { $now = time; $result = 'OK'; @@ -648,19 +664,7 @@ do { $daemon = $opt{'daemon'}; $daemon = 0 if opt('force'); - ## obtain the IP address to use. - $ip = get_ip(opt('use')); - - ## a little sanity check and then update the NICs.. - if (!defined $ip || !$ip) { - warning("unable to determine IP address") if !$daemon || opt('verbose'); - - } elsif ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { - warning("malformed IP address (%s)", $ip); - - } else { - update_nics(); - } + update_nics(); if ($daemon) { debug("sleep %s", $daemon); @@ -714,20 +718,34 @@ sub update_nics { my %examined = (); foreach my $s (sort keys %services) { - my @hosts = (); + my (@hosts, %ips) = (); my $updateable = $services{$s}{'updateable'}; my $update = $services{$s}{'update'}; foreach my $h (sort keys %config) { next if $config{$h}{'protocol'} ne lc($s); $examined{$h} = 1; + my $use = $config{$h}{'use'} || opt('use'); + local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; + my $ip = get_ip($use); + if (!defined $ip || !$ip) { + warning("unable to determine IP address") + if !$daemon || opt('verbose'); + next; + } + if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { + warning("malformed IP address (%s)", $ip); + next; + } + $config{$h}{'wantip'} = $ip; next if !nic_updateable($h, $updateable); push @hosts, $h; + $ips{$ip} = $h; } if (@hosts) { $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); &$update(@hosts); - runpostscript($ip); + runpostscript(join ' ', keys %ips); } } foreach my $h (sort keys %config) { @@ -1916,7 +1934,7 @@ sub group_hosts_by { my %groups = (); foreach my $h (@$hosts) { - my @keys = @$attributes; + my @keys = (@$attributes, 'wantip'); map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); @@ -1996,6 +2014,7 @@ sub nic_updateable { my $host = shift; my $sub = shift; my $update = 0; + my $ip = $config{$host}{'wantip'}; if ($config{$host}{'login'} eq '') { warning("null login name specified for host %s.", $host); @@ -2156,6 +2175,7 @@ sub nic_dyndns1_update { debug("\nnic_dyndns1_update -------------------"); ## update each configured host foreach my $h (@_) { + my $ip = delete $config{$h}{'wantip'}; info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); @@ -2300,6 +2320,8 @@ sub nic_dyndns2_update { my @hosts = @{$groups{$sig}}; my $hosts = join(',', @hosts); my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); @@ -2563,6 +2585,7 @@ sub nic_concont_update { ## update each configured host foreach my $h (@_) { + my $ip = delete $config{$h}{'wantip'}; info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); @@ -2645,6 +2668,7 @@ sub nic_dslreports1_update { debug("\nnic_dslreports1_update -------------------"); ## update each configured host foreach my $h (@_) { + my $ip = delete $config{$h}{'wantip'}; info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); @@ -2720,6 +2744,7 @@ sub nic_hammernode1_update { ## update each configured host foreach my $h (@_) { + my $ip = delete $config{$h}{'wantip'}; info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); @@ -2801,6 +2826,8 @@ sub nic_zoneedit1_update { my @hosts = @{$groups{$sig}}; my $hosts = join(',', @hosts); my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); @@ -2943,6 +2970,9 @@ sub nic_easydns_update { my @hosts = @{$groups{$sig}}; my $hosts = join(',', @hosts); my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); @@ -3100,6 +3130,9 @@ sub nic_dnspark_update { my @hosts = @{$groups{$sig}}; my $hosts = join(',', @hosts); my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); @@ -3215,6 +3248,7 @@ sub nic_namecheap_update { ## update each configured host foreach my $h (@_) { + my $ip = delete $config{$h}{'wantip'}; info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); @@ -3297,6 +3331,7 @@ sub nic_sitelutions_update { ## update each configured host foreach my $h (@_) { + my $ip = delete $config{$h}{'wantip'}; info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); diff --git a/patches/multiple-ip.patch b/patches/multiple-ip.patch new file mode 100644 index 0000000..121813b --- /dev/null +++ b/patches/multiple-ip.patch @@ -0,0 +1,227 @@ +# +# Patch to add multiple IP support to ddclient-3.7.3 +# Copyright (C) 2008 Astaro AG www.astaro.com +# Author: Ingo Schwarze 16.09.2008 +# +# This patch is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This patch is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the ddclient program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, +# or look up http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt . +# +Index: ddclient +=================================================================== +RCS file: /home/cvs/sources/d/ddclient/ddclient,v +retrieving revision 1.1.1.2 +retrieving revision 1.4.2.1 +diff -u -p -r1.1.1.2 -r1.4.2.1 +--- ddclient 15 Sep 2008 11:13:55 -0000 1.1.1.2 ++++ ddclient 24 Sep 2008 10:06:24 -0000 1.4.2.1 +@@ -10,6 +10,9 @@ + # + # website: http://ddclient.sf.net + # ++# Support for multiple IP numbers added by ++# Astaro AG, Ingo Schwarze September 16, 2008 ++# + ###################################################################### + require 5.004; + use strict; +@@ -349,6 +352,19 @@ my %variables = ( + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'host' => setv(T_STRING, 1, 1, 1, '', undef), ++ ++ 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), ++ 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), ++ 'if-skip' => setv(T_STRING,0, 0, 1, '', undef), ++ 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), ++ 'web-skip' => setv(T_STRING,0, 0, 1, '', undef), ++ 'fw' => setv(T_ANY, 0, 0, 1, '', undef), ++ 'fw-skip' => setv(T_STRING,0, 0, 1, '', undef), ++ 'fw-login' => setv(T_LOGIN, 0, 0, 1, '', undef), ++ 'fw-password' => setv(T_PASSWD,0, 0, 1, '', undef), ++ 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), ++ 'cmd-skip' => setv(T_STRING,0, 0, 1, '', undef), ++ + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), +@@ -594,7 +610,7 @@ if (opt('daemon') && !opt('force')) { + } + + umask 077; +-my ($daemon, $ip); ++my $daemon; + do { + $now = time; + $result = 'OK'; +@@ -617,19 +633,7 @@ do { + $daemon = $opt{'daemon'}; + $daemon = 0 if opt('force'); + +- ## obtain the IP address to use. +- $ip = get_ip(opt('use')); +- +- ## a little sanity check and then update the NICs.. +- if (!defined $ip || !$ip) { +- warning("unable to determine IP address") if !$daemon || opt('verbose'); +- +- } elsif ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { +- warning("malformed IP address (%s)", $ip); +- +- } else { +- update_nics(); +- } ++ update_nics(); + + if ($daemon) { + debug("sleep %s", $daemon); +@@ -683,20 +687,34 @@ sub update_nics { + my %examined = (); + + foreach my $s (sort keys %services) { +- my @hosts = (); ++ my (@hosts, %ips) = (); + my $updateable = $services{$s}{'updateable'}; + my $update = $services{$s}{'update'}; + + foreach my $h (sort keys %config) { + next if $config{$h}{'protocol'} ne lc($s); + $examined{$h} = 1; ++ my $use = $config{$h}{'use'} || opt('use'); ++ local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; ++ my $ip = get_ip($use); ++ if (!defined $ip || !$ip) { ++ warning("unable to determine IP address") ++ if !$daemon || opt('verbose'); ++ next; ++ } ++ if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { ++ warning("malformed IP address (%s)", $ip); ++ next; ++ } ++ $config{$h}{'wantip'} = $ip; + next if !nic_updateable($h, $updateable); + push @hosts, $h; ++ $ips{$ip} = $h; + } + if (@hosts) { + $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); + &$update(@hosts); +- runpostscript($ip); ++ runpostscript(join ' ', keys %ips); + } + } + foreach my $h (sort keys %config) { +@@ -1885,7 +1903,7 @@ sub group_hosts_by { + + my %groups = (); + foreach my $h (@$hosts) { +- my @keys = @$attributes; ++ my @keys = (@$attributes, 'wantip'); + map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; + my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); + +@@ -1964,6 +1982,7 @@ sub nic_updateable { + my $host = shift; + my $sub = shift; + my $update = 0; ++ my $ip = $config{$host}{'wantip'}; + + if ($config{$host}{'login'} eq '') { + warning("null login name specified for host %s.", $host); +@@ -2122,6 +2141,7 @@ sub nic_dyndns1_update { + debug("\nnic_dyndns1_update -------------------"); + ## update each configured host + foreach my $h (@_) { ++ my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + +@@ -2266,6 +2286,8 @@ sub nic_dyndns2_update { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; ++ my $ip = $config{$h}{'wantip'}; ++ delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); +@@ -2398,6 +2420,7 @@ sub nic_concont_update { + + ## update each configured host + foreach my $h (@_) { ++ my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + +@@ -2480,6 +2503,7 @@ sub nic_dslreports1_update { + debug("\nnic_dslreports1_update -------------------"); + ## update each configured host + foreach my $h (@_) { ++ my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + +@@ -2555,6 +2579,7 @@ sub nic_hammernode1_update { + + ## update each configured host + foreach my $h (@_) { ++ my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + +@@ -2636,6 +2661,8 @@ sub nic_zoneedit1_update { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; ++ my $ip = $config{$h}{'wantip'}; ++ delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); +@@ -2778,6 +2805,9 @@ sub nic_easydns_update { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; ++ my $ip = $config{$h}{'wantip'}; ++ delete $config{$_}{'wantip'} foreach @hosts; ++ + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + +@@ -2935,6 +2965,9 @@ sub nic_dnspark_update { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; ++ my $ip = $config{$h}{'wantip'}; ++ delete $config{$_}{'wantip'} foreach @hosts; ++ + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + +@@ -3050,6 +3083,7 @@ sub nic_namecheap_update { + + ## update each configured host + foreach my $h (@_) { ++ my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + +@@ -3132,6 +3166,7 @@ sub nic_sitelutions_update { + + ## update each configured host + foreach my $h (@_) { ++ my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); From 6e3ef3a2a9005b39c43400744cf2b0d23e58ecf3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 1 Nov 2008 11:23:03 +0000 Subject: [PATCH 153/231] Added some remarks concerning the postscript. See https://sourceforge.net/forum/message.php?msg_id=5550545 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@102 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_ddclient.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 92eb989..6922ad3 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -25,6 +25,8 @@ 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 +# postscript=script # run script after updating. The + # new IP is added as argument. # #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 From bd74f3ff0f003956150dea8533f97eea87e864d7 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 19 Nov 2008 20:56:18 +0000 Subject: [PATCH 154/231] Extra fix for multiple IP's git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@103 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ddclient b/ddclient index 07c0070..354cc86 100755 --- a/ddclient +++ b/ddclient @@ -2443,6 +2443,8 @@ sub nic_noip_update { my @hosts = @{$groups{$sig}}; my $hosts = join(',', @hosts); my $h = $hosts[0]; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; info("setting IP address to %s for %s", $ip, $hosts); verbose("UPDATE:","updating %s", $hosts); From f5721bd42f7fa1c2fdd41a0661fb2ae195958ccc Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 19 Nov 2008 21:04:16 +0000 Subject: [PATCH 155/231] Added ddclient wrapper script git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@104 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- TODO | 2 ++ sample-ddclient-wrapper.sh | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 sample-ddclient-wrapper.sh diff --git a/TODO b/TODO index adf5ed6..1e92adf 100644 --- a/TODO +++ b/TODO @@ -10,3 +10,5 @@ or at work... * FAQ: bad hostname (checkip) * note about init-scripts. * request from dyndns: http://tinyurl.com/2l3twf + +* check bugs diff --git a/sample-ddclient-wrapper.sh b/sample-ddclient-wrapper.sh new file mode 100755 index 0000000..cf9e138 --- /dev/null +++ b/sample-ddclient-wrapper.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# This wrapper should be usefull for people who want to run a postscript with +# multiple arguments. Currently ddclient has a feature which doesn't allow +# multiple arguments. +# This example has been written to be able to update multiple domains with +# multiple login. It expects a /etc/ddclient/ddclient-domain2.conf with the +# configuration of the extra domain + +# the second domain who has to be updated +: ${SECONDCONFIG:=/etc/ddclient/ddclient-domain2.conf} +# ddclient adds the new IP as argument +IP=$1 + +ddclient -ip ${IP} -file ${SECONDCONFIG} -daemon 0 From 8b2d89d707496feea71c66635599aa4bd5fdcac9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 19 Nov 2008 21:09:07 +0000 Subject: [PATCH 156/231] Added better password handling sended by Ingo Schwarze git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@105 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 18 +++++++--- patches/password.patch | 77 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 patches/password.patch diff --git a/ddclient b/ddclient index 354cc86..804ae91 100755 --- a/ddclient +++ b/ddclient @@ -937,6 +937,7 @@ sub _read_config { local $lineno = 0; my $continuation = ''; + my %passwords = (); while () { s/[\r\n]//g; @@ -952,10 +953,17 @@ sub _read_config { } $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 + + ## parsing passwords is special + if (/^([^#]*\s)?([^#]*?password\S*?)\s*=\s*('.*'|[^']\S*)(.*)/) { + my ($head, $key, $value, $tail) = ($1 || '', $2, $3, $4); + $value = $1 if $value =~ /^'(.*)'$/; + $passwords{$key} = $value; + $_ = "${head}${key}=dummy${tail}"; + } + + ## remove comments + s/#.*//; ## handle continuation lines $_ = "$continuation$_"; @@ -980,6 +988,7 @@ sub _read_config { ## verify that keywords are valid...and check the value foreach my $k (keys %locals) { + $locals{$k} = $passwords{$k} if defined $passwords{$k}; if (!exists $variables{'merged'}{$k}) { warning("unrecognized keyword '%s' (ignored)", $k); delete $locals{$k}; @@ -1018,6 +1027,7 @@ sub _read_config { $config{$h}{'host'} = $h; } } + %passwords = (); } close(FD); diff --git a/patches/password.patch b/patches/password.patch new file mode 100644 index 0000000..e0d763d --- /dev/null +++ b/patches/password.patch @@ -0,0 +1,77 @@ +# +# Patch to improve password handling in ddclient-3.7.3 +# Copyright (C) 2008 Astaro AG www.astaro.com +# Author: Ingo Schwarze 30.09.2008 +# +# Originally posted on the ddclient-user mailing list +# see http://permalink.gmane.org/gmane.network.dns.ddclient.user/18 +# +# This patch is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This patch is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with the ddclient program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, +# or look up http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt . +# +Index: ddclient +=================================================================== +RCS file: /home/cvs/sources/d/ddclient/ddclient,v +retrieving revision 1.1.1.2 +diff -u -p -r1.1.1.2 ddclient +--- ddclient 15 Sep 2008 11:13:55 -0000 1.1.1.2 ++++ ddclient 30 Sep 2008 18:55:52 -0000 +@@ -888,6 +888,7 @@ sub _read_config { + + local $lineno = 0; + my $continuation = ''; ++ my %passwords = (); + while () { + s/[\r\n]//g; + +@@ -903,10 +904,17 @@ sub _read_config { + } + + $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 ++ ++ ## parsing passwords is special ++ if (/^([^#]*\s)?([^#]*?password\S*?)\s*=\s*('.*'|[^']\S*)(.*)/) { ++ my ($head, $key, $value, $tail) = ($1 || '', $2, $3, $4); ++ $value = $1 if $value =~ /^'(.*)'$/; ++ $passwords{$key} = $value; ++ $_ = "${head}${key}=dummy${tail}"; ++ } ++ ++ ## remove comments ++ s/#.*//; + + ## handle continuation lines + $_ = "$continuation$_"; +@@ -931,6 +939,7 @@ sub _read_config { + + ## verify that keywords are valid...and check the value + foreach my $k (keys %locals) { ++ $locals{$k} = $passwords{$k} if defined $passwords{$k}; + if (!exists $variables{'merged'}{$k}) { + warning("unrecognized keyword '%s' (ignored)", $k); + delete $locals{$k}; +@@ -969,6 +978,7 @@ sub _read_config { + $config{$h}{'host'} = $h; + } + } ++ %passwords = (); + } + close(FD); + + From 7a437f9fdbfff418f62906bafcfef1625ee7a242 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 4 Dec 2008 18:05:23 +0000 Subject: [PATCH 157/231] help about postscript added git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@106 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 1 + 1 file changed, 1 insertion(+) diff --git a/ddclient b/ddclient index 804ae91..282a7d7 100755 --- a/ddclient +++ b/ddclient @@ -582,6 +582,7 @@ my @opt = ( [ "verbose", "!", "-{no}verbose : print {no} verbose information" ], [ "quiet", "!", "-{no}quiet : print {no} messages for unnecessary updates" ], [ "help", "", "-help : this message" ], + [ "postscript", "", "-postscript : script to run after updating ddclient, has new IP as param" ], [ "query", "!", "-{no}query : print {no} ip addresses and exit" ], [ "test", "!", "" ], ## hidden From 428ff2e223ddfdb44b5ccd97aa0ca3e341033378 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 27 Jan 2009 20:17:52 +0000 Subject: [PATCH 158/231] Modified during the release of ddclient-3.8.0 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@108 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- .cvsignore | 1 + RELEASENOTE | 11 +++++++++++ ddclient | 2 +- release/readme.txt | 10 +++++++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 56552e7..22bac99 100644 --- a/.cvsignore +++ b/.cvsignore @@ -2,3 +2,4 @@ patches release .cvsignore +UPGRADE diff --git a/RELEASENOTE b/RELEASENOTE index e69de29..a3c9424 100644 --- a/RELEASENOTE +++ b/RELEASENOTE @@ -0,0 +1,11 @@ +It's been a while but here is new release of ddclient. There are some important +changes and some documentation is modified. A detailed overview can be found +in ChangeLog but here's a quick overview: + + * Added ddclient-noip.patch send by Kurt Bussche. + * Added and applied default timeout patch from + https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 + * Sending mail when killed, not after TERM-signal + * Added support for multiple IP adresses. + + diff --git a/ddclient b/ddclient index 282a7d7..fe06521 100755 --- a/ddclient +++ b/ddclient @@ -20,7 +20,7 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.7.3"; +my $version = "3.8.0"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; diff --git a/release/readme.txt b/release/readme.txt index 1753bc6..2a38d07 100644 --- a/release/readme.txt +++ b/release/readme.txt @@ -5,10 +5,13 @@ http://ddclient.wiki.sourceforge.net/HowtoRelease Releasing files * tagging current version: see svn book +* update RELEASE NOTES +* update ChangeLog +* update version number * svn copy https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.7.2 -* version nr aanpassen +( on the last release it has been done by just copying the local dir ) * bz2 en gz file aanmaken -* ftp naar sf.net +* rsync -av ddclient-3.8.0.* wimpunk@frs.sf.net:uploads * aanmaken release: Release Notes 3.6.5 2004-11-24 @@ -18,10 +21,11 @@ ddclient-3.6.5.tar.gz 35726 0 Any .gz * mail naar ddclient-support * news updaten - * freshmeat updaten * website bijtimmeren: versie nummer aanpassen +(niet gevonden waar dat nu staat in de wiki) * [https://www.dyndns.com/developers/listings/3 dyndns update] +(geen mogelijkheid gevonden om die te updaten) website From a62b850e27820e7aef752bd2fa23ff132456c95e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 27 Feb 2009 07:30:46 +0000 Subject: [PATCH 159/231] Added warning about the update interval (#2619505) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@109 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_ddclient.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 6922ad3..913e41c 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -50,6 +50,10 @@ ssl=yes # use ssl-support. Works with #use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Address # ## To obtain an IP address from Web status page (using the proxy if defined) +## by default, checkip.dyndns.org is used if you use the dyndns protocol. +## Using use=web is enough to get it working. +## WARNING: set deamon at least to 600 seconds if you use checkip or you could +## get banned from their service. #use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address # #use=ip, ip=127.0.0.1 # via static IP's From a5d0064af9eb307aa20a0fc9c563d73ad36ad5ba Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 16 May 2009 10:07:26 +0000 Subject: [PATCH 160/231] Bug 2792436: fixed abuse message of dyndns git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@110 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index fe06521..5316d25 100755 --- a/ddclient +++ b/ddclient @@ -2318,7 +2318,9 @@ sub nic_dyndns2_update { '!yours' => 'The hostname specified exists, but not under the username currently being used', '!donator' => 'The offline setting was set, when the user is not a donator', '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', - 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', + 'abuse', => 'The hostname specified is blocked for abuse; you should receive an email notification ' . + 'which provides an unblock request link. More info can be found on ' . + 'https://www.dyndns.com/support/abuse.html', 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', From beab2f10521445a3ac370d6eea3bcf2ee483b774 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 5 Aug 2009 21:13:15 +0000 Subject: [PATCH 161/231] applied freedns patch (patch 2832129) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@111 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 116 ++++++++++++++++++++++++++++++++ patches/freedns-patch | 150 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 patches/freedns-patch diff --git a/ddclient b/ddclient index 5316d25..1ef47f5 100755 --- a/ddclient +++ b/ddclient @@ -524,6 +524,16 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'freedns' => { + 'updateable' => undef, + 'update' => \&nic_freedns_update, + 'examples' => \&nic_freedns_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'freedns.afraid.org', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -1157,6 +1167,8 @@ sub init_config { $proto = $config{$h}{'protocol'}; $proto = opt('protocol') if !defined($proto); + load_sha1_support() if ($proto eq "freedns"); + if (!exists($services{$proto})) { warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); delete $config{$h}; @@ -1718,6 +1730,19 @@ EOM { no warnings; $IO::Socket::SSL::DEBUG = 0; } } ###################################################################### +## load_sha1_support +###################################################################### +sub load_sha1_support { + my $sha1_loaded = eval {require Digest::SHA1}; + unless ($sha1_loaded) { + fatal(<<"EOM"); +Error loading the Perl module Digest::SHA1 needed for freedns update. +On Debian, the package libdigest-sha1-perl must be installed. +EOM + } + import Digest::SHA1 (qw/sha1_hex/); +} +###################################################################### ## geturl ###################################################################### sub geturl { @@ -3380,6 +3405,97 @@ sub nic_sitelutions_update { } } +###################################################################### + +###################################################################### +## nic_freedns_examples +###################################################################### +sub nic_freedns_examples { +return < +## This returns a list of host|currentIP|updateURL lines. +## Pick the line that matches myhost, and fetch the URL. +## word 'Updated' for success, 'fail' for failure. +## +###################################################################### +sub nic_freedns_update { + + + debug("\nnic_freedns_update -------------------"); + + ## First get the list of updatable hosts + my $url; + $url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}"); + my $reply = geturl(opt('proxy'), $url); + if (!defined($reply) || !$reply || !header_ok($_[0], $reply)) { + failed("updating %s: Could not connect to %s for site list.", $_[0], $url); + return; + } + my @lines = split("\n", $reply); + my %freedns_hosts; + grep { + my @rec = split(/\|/, $_); + $freedns_hosts{$rec[0]} = \@rec if ($#rec > 0); + } @lines; + if (!keys %freedns_hosts) { + failed("Could not get freedns update URLs from %s", $config{$_[0]}{'server'}); + return; + } + ## update each configured host + foreach my $h (@_) { + if(!$h){ next }; + my $ip = delete $config{$h}{'wantip'}; + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + + if($ip ne $freedns_hosts{$h}->[1]) { + my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); + last; + } + last if !header_ok($h, $reply); + + if($reply =~ /Updated.*host/) { + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } + } +} + ###################################################################### # vim: ai ts=4 sw=4 tw=78 : diff --git a/patches/freedns-patch b/patches/freedns-patch new file mode 100644 index 0000000..c1a63e9 --- /dev/null +++ b/patches/freedns-patch @@ -0,0 +1,150 @@ +# freedns patch +# see https://sourceforge.net/tracker/?func=detail&aid=2832129&group_id=116817&atid=676131 +--- ddclient.orig 2009-01-27 14:14:02.000000000 -0500 ++++ ddclient 2009-08-05 13:27:25.725870005 -0400 +@@ -524,6 +524,16 @@ + $variables{'service-common-defaults'}, + ), + }, ++ 'freedns' => { ++ 'updateable' => undef, ++ 'update' => \&nic_freedns_update, ++ 'examples' => \&nic_freedns_examples, ++ 'variables' => merge( ++ { 'server' => setv(T_FQDNP, 1, 0, 1, 'freedns.afraid.org', undef) }, ++ { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, ++ $variables{'service-common-defaults'}, ++ ), ++ }, + ); + $variables{'merged'} = merge($variables{'global-defaults'}, + $variables{'service-common-defaults'}, +@@ -1157,6 +1167,8 @@ + $proto = $config{$h}{'protocol'}; + $proto = opt('protocol') if !defined($proto); + ++ load_sha1_support() if ($proto eq "freedns"); ++ + if (!exists($services{$proto})) { + warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); + delete $config{$h}; +@@ -1718,6 +1730,19 @@ + { no warnings; $IO::Socket::SSL::DEBUG = 0; } + } + ###################################################################### ++## load_sha1_support ++###################################################################### ++sub load_sha1_support { ++ my $sha1_loaded = eval {require Digest::SHA1}; ++ unless ($sha1_loaded) { ++ fatal(<<"EOM"); ++Error loading the Perl module Digest::SHA1 needed for freedns update. ++On Debian, the package libdigest-sha1-perl must be installed. ++EOM ++ } ++ import Digest::SHA1 (qw/sha1_hex/); ++} ++###################################################################### + ## geturl + ###################################################################### + sub geturl { +@@ -3378,6 +3403,97 @@ + } + } + ++###################################################################### ++ ++###################################################################### ++## nic_freedns_examples ++###################################################################### ++sub nic_freedns_examples { ++return < ++## This returns a list of host|currentIP|updateURL lines. ++## Pick the line that matches myhost, and fetch the URL. ++## word 'Updated' for success, 'fail' for failure. ++## ++###################################################################### ++sub nic_freedns_update { ++ ++ ++ debug("\nnic_freedns_update -------------------"); ++ ++ ## First get the list of updatable hosts ++ my $url; ++ $url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}"); ++ my $reply = geturl(opt('proxy'), $url); ++ if (!defined($reply) || !$reply || !header_ok($_[0], $reply)) { ++ failed("updating %s: Could not connect to %s for site list.", $_[0], $url); ++ return; ++ } ++ my @lines = split("\n", $reply); ++ my %freedns_hosts; ++ grep { ++ my @rec = split(/\|/, $_); ++ $freedns_hosts{$rec[0]} = \@rec if ($#rec > 0); ++ } @lines; ++ if (!keys %freedns_hosts) { ++ failed("Could not get freedns update URLs from %s", $config{$_[0]}{'server'}); ++ return; ++ } ++ ## update each configured host ++ foreach my $h (@_) { ++ if(!$h){ next }; ++ my $ip = delete $config{$h}{'wantip'}; ++ info("setting IP address to %s for %s", $ip, $h); ++ verbose("UPDATE:","updating %s", $h); ++ ++ if($ip ne $freedns_hosts{$h}->[1]) { ++ my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); ++ if (!defined($reply) || !$reply) { ++ failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); ++ last; ++ } ++ last if !header_ok($h, $reply); ++ ++ if($reply =~ /Updated.*host/) { ++ success("updating %s: good: IP address set to %s", $h, $ip); ++ } else { ++ $config{$h}{'status'} = 'failed'; ++ warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); ++ warning("REPLIED: %s", $reply); ++ failed("updating %s: Invalid reply.", $h); ++ } ++ } ++ } ++} ++ + ###################################################################### + # vim: ai ts=4 sw=4 tw=78 : + + + From ea34d551cb93ebe6f7689e598681a0f4cf4662d4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 10 Sep 2009 10:21:19 +0000 Subject: [PATCH 162/231] #1609799 Support for LoopiaDNS (submitted by scilence) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@112 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README | 1 + ddclient | 6 ++- patches/loopia.patch | 82 ++++++++++++++++++++++++++++++++++++++++ sample-etc_ddclient.conf | 14 +++++++ 4 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 patches/loopia.patch diff --git a/README b/README index a00cda5..2246ecb 100644 --- a/README +++ b/README @@ -27,6 +27,7 @@ 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 +Loopia - See http://www.loopia.se for details DDclient now supports many of cable/dsl broadband routers. diff --git a/ddclient b/ddclient index 1ef47f5..53aa63d 100755 --- a/ddclient +++ b/ddclient @@ -63,6 +63,7 @@ my %builtinweb = ( 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address:', }, 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, + 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current Address:', }, ); my %builtinfw = ( 'watchguard-soho' => { @@ -292,6 +293,7 @@ sub ip_strategies_usage { my %web_strategies = ( 'dyndns'=> 1, 'dnspark'=> 1, + 'loopia'=> 1, ); sub setv { @@ -428,6 +430,7 @@ my %services = ( 'examples' => \&nic_dyndns2_examples, 'variables' => merge( { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + { 'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef), }, # { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, $variables{'dyndns-common-defaults'}, $variables{'service-common-defaults'}, @@ -2295,6 +2298,7 @@ supported in a future version of ${program}.] Configuration variables applicable to the 'dyndns2' protocol are: protocol=dyndns2 ## server=fqdn.of.service ## defaults to members.dyndns.org + script=/path/to/script ## defaults to /nic/update backupmx=no|yes ## indicates that this host is the primary MX for the domain. static=no|yes ## indicates that this host has a static IP address. custom=no|yes ## indicates that this host is a 'custom' top-level domain name. @@ -2365,7 +2369,7 @@ sub nic_dyndns2_update { verbose("UPDATE:","updating %s", $hosts); ## Select the DynDNS system to update - my $url = "http://$config{$h}{'server'}/nic/update?system="; + my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system="; if ($config{$h}{'custom'}) { warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) if $config{$h}{'static'}; diff --git a/patches/loopia.patch b/patches/loopia.patch new file mode 100644 index 0000000..2e428ab --- /dev/null +++ b/patches/loopia.patch @@ -0,0 +1,82 @@ +# support for LoopiaDNS +# patch submitted by Erik Christiansson: #1609799 +# +Index: sample-etc_ddclient.conf +=================================================================== +--- sample-etc_ddclient.conf (revision 110) ++++ sample-etc_ddclient.conf (working copy) +@@ -164,3 +164,17 @@ + # login=my-namecheap.com-login, \ + # password=my-namecheap.com-password \ + # myhost.namecheap.com ++ ++## ++## ++## Loopia (loopia.se) ++## ++# use=web ++# web=loopia ++# protocol=dyndns2 ++# server=dns.loopia.se ++# script=/XDynDNSServer/XDynDNS.php ++# login=my-loopia.se-login ++# password=my-loopia.se-password ++# my.domain.tld,other.domain.tld ++ +Index: ddclient +=================================================================== +--- ddclient (revision 111) ++++ ddclient (working copy) +@@ -63,6 +63,7 @@ + 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => + 'Current IP Address:', }, + 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, ++ 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current Address:', }, + ); + my %builtinfw = ( + 'watchguard-soho' => { +@@ -292,6 +293,7 @@ + my %web_strategies = ( + 'dyndns'=> 1, + 'dnspark'=> 1, ++ 'loopia'=> 1, + ); + + sub setv { +@@ -428,6 +430,7 @@ + 'examples' => \&nic_dyndns2_examples, + 'variables' => merge( + { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, ++ { 'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef), }, + # { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + $variables{'dyndns-common-defaults'}, + $variables{'service-common-defaults'}, +@@ -2295,6 +2298,7 @@ + Configuration variables applicable to the 'dyndns2' protocol are: + protocol=dyndns2 ## + server=fqdn.of.service ## defaults to members.dyndns.org ++ script=/path/to/script ## defaults to /nic/update + backupmx=no|yes ## indicates that this host is the primary MX for the domain. + static=no|yes ## indicates that this host has a static IP address. + custom=no|yes ## indicates that this host is a 'custom' top-level domain name. +@@ -2365,7 +2369,7 @@ + verbose("UPDATE:","updating %s", $hosts); + + ## Select the DynDNS system to update +- my $url = "http://$config{$h}{'server'}/nic/update?system="; ++ my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) + if $config{$h}{'static'}; +Index: README +=================================================================== +--- README (revision 110) ++++ README (working copy) +@@ -27,6 +27,7 @@ + DnsPark - See http://www.dnspark.com for details + DslReports - See http://www.dslreports.com for details + Sitelutions - see http://www.sitelutions.com for details ++Loopia - See http://www.loopia.se for details + + DDclient now supports many of cable/dsl broadband routers. + diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 913e41c..beee3a4 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -164,3 +164,17 @@ ssl=yes # use ssl-support. Works with # login=my-namecheap.com-login, \ # password=my-namecheap.com-password \ # myhost.namecheap.com + +## +## +## Loopia (loopia.se) +## +# use=web +# web=loopia +# protocol=dyndns2 +# server=dns.loopia.se +# script=/XDynDNSServer/XDynDNS.php +# login=my-loopia.se-login +# password=my-loopia.se-password +# my.domain.tld,other.domain.tld + From 7f7c7ac15b6af978b9b9331574e1718ff3e372bd Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 19 Oct 2009 08:24:25 +0000 Subject: [PATCH 163/231] Added foreground patch (1893144) submitted by John Palkovic git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@113 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 12 ++++++++-- patches/foreground.patch | 51 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 patches/foreground.patch diff --git a/ddclient b/ddclient index 53aa63d..d3ed6ec 100755 --- a/ddclient +++ b/ddclient @@ -309,6 +309,7 @@ sub setv { my %variables = ( 'global-defaults' => { 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), + 'foreground' => setv(T_BOOL, 0, 0, 1, 0, undef), 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), 'pid' => setv(T_FILE, 0, 0, 1, "", undef), @@ -548,6 +549,7 @@ my @opt = ( "usage: ${program} [options]", "options are:", [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], ++ [ "foreground", "!", "-foreground : do not fork" ], [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], [ "server", "=s", "-server host : update DNS information on 'host'" ], [ "protocol", "=s", "-protocol type : update protocol used" ], @@ -636,7 +638,10 @@ my $caught_kill = 0; $SIG{'HUP'} = sub { $caught_hup = 1; }; $SIG{'TERM'} = sub { $caught_term = 1; }; $SIG{'KILL'} = sub { $caught_kill = 1; }; -if (opt('daemon') && !opt('force')) { +# don't fork() if foreground or force is on +if (opt('foreground') || opt('force')) { + ; +} elsif (opt('daemon')) { $SIG{'CHLD'} = 'IGNORE'; my $pid = fork; if ($pid < 0) { @@ -646,12 +651,15 @@ if (opt('daemon') && !opt('force')) { exit 0; } $SIG{'CHLD'} = 'DEFAULT'; - $opt{'syslog'} = 1; open(STDOUT, ">/dev/null"); open(STDERR, ">/dev/null"); open(STDIN, " +# Adds a foreground options which makes it possible to run ddclient +# as a deamon without forking. patch submitted by John Palkovic. +--- ddclient-3.8.0 2009-01-27 20:14:02.000000000 +0100 ++++ ddclient+foreground-3.8.0 2009-08-17 22:27:32.000000000 +0200 +@@ -307,6 +307,7 @@ + my %variables = ( + 'global-defaults' => { + 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), ++ 'foreground' => setv(T_BOOL, 0, 0, 1, 0, undef), + 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), + 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), + 'pid' => setv(T_FILE, 0, 0, 1, "", undef), +@@ -535,6 +536,7 @@ + "usage: ${program} [options]", + "options are:", + [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], +++ [ "foreground", "!", "-foreground : do not fork" ], + [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], + [ "server", "=s", "-server host : update DNS information on 'host'" ], + [ "protocol", "=s", "-protocol type : update protocol used" ], +@@ -623,7 +625,10 @@ + $SIG{'HUP'} = sub { $caught_hup = 1; }; + $SIG{'TERM'} = sub { $caught_term = 1; }; + $SIG{'KILL'} = sub { $caught_kill = 1; }; +-if (opt('daemon') && !opt('force')) { ++# don't fork() if foreground or force is on ++if (opt('foreground') || opt('force')) { ++ ; ++} elsif (opt('daemon')) { + $SIG{'CHLD'} = 'IGNORE'; + my $pid = fork; + if ($pid < 0) { +@@ -633,12 +638,15 @@ + exit 0; + } + $SIG{'CHLD'} = 'DEFAULT'; +- $opt{'syslog'} = 1; + open(STDOUT, ">/dev/null"); + open(STDERR, ">/dev/null"); + open(STDIN, " Date: Mon, 9 Nov 2009 20:25:58 +0000 Subject: [PATCH 164/231] Added prevent-hang patch (2880462) submitted by Panos git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@114 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 60 +++++++++++++++++++------------------- patches/prevent-hang.patch | 37 +++++++++++++++++++++++ 2 files changed, 67 insertions(+), 30 deletions(-) create mode 100644 patches/prevent-hang.patch diff --git a/ddclient b/ddclient index d3ed6ec..acd5843 100755 --- a/ddclient +++ b/ddclient @@ -1838,39 +1838,39 @@ sub geturl { defined $sd or warning("cannot connect to $peer:$port socket: $@"); } - if (defined $sd) { - ## send the request to the http server - verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); - verbose("SENDING:", $request); + if (defined $sd) { + ## send the request to the http server + verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); + verbose("SENDING:", $request); - $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); - my $result = syswrite $sd, $rq; - if ($result != length($rq)) { - warning("cannot send to $peer:$port ($!)."); - - } else { - my $timeout = 0; - local $SIG{'ALRM'} = sub { $timeout = 1; }; + $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); + my $result = syswrite $sd, $rq; + if ($result != length($rq)) { + warning("cannot send to $peer:$port ($!)."); + } else { + $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); + eval { + local $SIG{'ALRM'} = sub { die "timeout";}; + alarm(opt('timeout')) if opt('timeout') > 0; + while ($_ = <$sd>) { + $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); + verbose("RECEIVE:", "%s", define($_, "")); + $reply .= $_ if defined $_; + } + if (opt('timeout') > 0) { + alarm(0); + } + }; + close($sd); - $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); - alarm(opt('timeout')) if opt('timeout') > 0; - while (!$timeout && ($_ = <$sd>)) { - $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); - verbose("RECEIVE:", "%s", define($_, "")); - $reply .= $_ if defined $_; - } - if (opt('timeout') > 0) { - alarm(0); - } - close($sd); - if ($timeout) { - warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); - $reply = ''; - } - $reply = '' if !defined $reply; + if ($@ and $@ =~ /timeout/) { + warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); + $reply = ''; + } + $reply = '' if !defined $reply; + } } - } - $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); + $0 = sprintf("%s - closed %s port %s", $program, $peer, $port); ## during testing simulate reading the URL if (opt('test')) { diff --git a/patches/prevent-hang.patch b/patches/prevent-hang.patch new file mode 100644 index 0000000..6c4701a --- /dev/null +++ b/patches/prevent-hang.patch @@ -0,0 +1,37 @@ +# http://sourceforge.net/tracker/?func=detail&atid=676130&aid=2880462&group_id=116817 +# ddclient hangs forever under some circumstances - ID: 2880462 +# +Index: ddclient +=================================================================== +--- ddclient (revision 113) ++++ ddclient (working copy) +@@ -1847,14 +1847,12 @@ + my $result = syswrite $sd, $rq; + if ($result != length($rq)) { + warning("cannot send to $peer:$port ($!)."); +- + } else { +- my $timeout = 0; +- local $SIG{'ALRM'} = sub { $timeout = 1; }; +- + $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); ++ eval { ++ local $SIG{'ALRM'} = sub { die "timeout";}; + alarm(opt('timeout')) if opt('timeout') > 0; +- while (!$timeout && ($_ = <$sd>)) { ++ while ($_ = <$sd>) { + $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); + verbose("RECEIVE:", "%s", define($_, "")); + $reply .= $_ if defined $_; +@@ -1862,8 +1860,10 @@ + if (opt('timeout') > 0) { + alarm(0); + } ++ }; + close($sd); +- if ($timeout) { ++ ++ if ($@ and $@ =~ /timeout/) { + warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); + $reply = ''; + } From d5b70d16654731df3f6e403d8aedfd64ecc13973 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 9 Nov 2009 20:46:17 +0000 Subject: [PATCH 165/231] Added cisco-asa patch (2891001) submitted by Philip Gladstone git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@115 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 59 +++++++++----- patches/cisco-asa.patch | 169 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 210 insertions(+), 18 deletions(-) create mode 100644 patches/cisco-asa.patch diff --git a/ddclient b/ddclient index acd5843..8c63e98 100755 --- a/ddclient +++ b/ddclient @@ -284,6 +284,7 @@ my %ip_strategies = ( 'if' => ": obtain IP from the -if {interface}", 'cmd' => ": obtain IP from the -cmd {external-command}", 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", + 'cisco-asa' => ": obtain IP from Cisco ASA at the -fw {address}", map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, ); sub ip_strategies_usage { @@ -749,7 +750,7 @@ sub update_nics { $examined{$h} = 1; my $use = $config{$h}{'use'} || opt('use'); local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; - my $ip = get_ip($use); + my $ip = get_ip($use, $h); if (!defined $ip || !$ip) { warning("unable to determine IP address") if !$daemon || opt('verbose'); @@ -1504,6 +1505,8 @@ sub minimum { } sub opt { my $v = shift; + my $h = shift; + return $config{$h}{$v} if defined($h && $config{$h}{$v}); return $opt{$v} if defined $opt{$v}; return $globals{$v} if defined $globals{$v}; return default($v) if defined default($v); @@ -1765,8 +1768,10 @@ sub geturl { my ($sd, $rq, $request, $reply); debug("proxy = $proxy"); - debug("url = $url"); + debug("url = %s", $url); ## canonify proxy and url + my $force_ssl; + $force_ssl = 1 if ($url =~ /^https:/); $proxy =~ s%^https?://%%i; $url =~ s%^https?://%%i; $server = $url; @@ -1779,7 +1784,7 @@ sub geturl { $globals{'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' ) { + if ( $force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip') ) { $use_ssl = 1; $default_port = 443; load_ssl_support; @@ -1817,7 +1822,7 @@ sub geturl { $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); if (! opt('exec')) { debug("skipped network connection"); - verbose("SENDING:", $request); + verbose("SENDING:", "%s", $request); } elsif ($use_ssl) { $sd = IO::Socket::SSL->new( PeerAddr => $peer, @@ -1841,7 +1846,7 @@ sub geturl { if (defined $sd) { ## send the request to the http server verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); - verbose("SENDING:", $request); + verbose("SENDING:", "%s", $request); $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); my $result = syswrite $sd, $rq; @@ -1891,28 +1896,29 @@ sub geturl { ###################################################################### sub get_ip { my $use = lc shift; + my $h = shift; my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); $arg = '' unless $arg; if ($use eq 'ip') { - $ip = opt('ip'); + $ip = opt('ip', $h); $arg = 'ip'; } elsif ($use eq 'if') { - $skip = opt('if-skip') || ''; + $skip = opt('if-skip', $h) || ''; $reply = `ifconfig $arg 2> /dev/null`; $reply = '' if $?; } elsif ($use eq 'cmd') { if ($arg) { - $skip = opt('cmd-skip') || ''; + $skip = opt('cmd-skip', $h) || ''; $reply = `$arg`; $reply = '' if $?; } } elsif ($use eq 'web') { - $url = opt('web') || ''; - $skip = opt('web-skip') || ''; + $url = opt('web', $h) || ''; + $skip = opt('web-skip', $h) || ''; if (exists $builtinweb{$url}) { $skip = $builtinweb{$url}->{'skip'} unless $skip; @@ -1921,15 +1927,15 @@ sub get_ip { $arg = $url; if ($url) { - $reply = geturl(opt('proxy'), $url) || ''; + $reply = geturl(opt('proxy', $h), $url) || ''; } } elsif (($use eq 'cisco')) { # Stuff added to support Cisco router ip http daemon # User fw-login should only have level 1 access to prevent # password theft. This is pretty harmless. - my $queryif = opt('if'); - $skip = opt('fw-skip') || ''; + my $queryif = opt('if', $h); + $skip = opt('fw-skip', $h) || ''; # Convert slashes to protected value "\/" $queryif =~ s%\/%\\\/%g; @@ -1937,13 +1943,30 @@ sub get_ip { # Protect special HTML characters (like '?') $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; - $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + $url = "http://".opt('fw', $h)."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; + $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; + $arg = $url; + + } elsif (($use eq 'cisco-asa')) { + # Stuff added to support Cisco ASA ip https daemon + # User fw-login should only have level 1 access to prevent + # password theft. This is pretty harmless. + my $queryif = opt('if', $h); + $skip = opt('fw-skip', $h) || ''; + + # Convert slashes to protected value "\/" + $queryif =~ s%\/%\\\/%g; + + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + + $url = "https://".opt('fw', $h)."/exec/show%20interface%20${queryif}"; + $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; $arg = $url; } else { - $url = opt('fw') || ''; - $skip = opt('fw-skip') || ''; + $url = opt('fw', $h) || ''; + $skip = opt('fw-skip', $h) || ''; if (exists $builtinfw{$use}) { $skip = $builtinfw{$use}->{'skip'} unless $skip; @@ -1952,7 +1975,7 @@ sub get_ip { $arg = $url; if ($url) { - $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; + $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; } } if (!defined $reply) { diff --git a/patches/cisco-asa.patch b/patches/cisco-asa.patch new file mode 100644 index 0000000..0da8ae4 --- /dev/null +++ b/patches/cisco-asa.patch @@ -0,0 +1,169 @@ +# Added support for cisco ASA as a firewall +# 2891001 - Philip Gladstone +--- ddclient 2009-01-27 14:14:02.000000000 -0500 ++++ /usr/sbin/ddclient 2009-11-02 18:26:02.000000000 -0500 +@@ -283,6 +283,7 @@ + 'if' => ": obtain IP from the -if {interface}", + 'cmd' => ": obtain IP from the -cmd {external-command}", + 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", ++ 'cisco-asa' => ": obtain IP from Cisco ASA at the -fw {address}", + map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, + ); + sub ip_strategies_usage { +@@ -728,7 +729,7 @@ + $examined{$h} = 1; + my $use = $config{$h}{'use'} || opt('use'); + local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; +- my $ip = get_ip($use); ++ my $ip = get_ip($use, $h); + if (!defined $ip || !$ip) { + warning("unable to determine IP address") + if !$daemon || opt('verbose'); +@@ -1481,6 +1482,8 @@ + } + sub opt { + my $v = shift; ++ my $h = shift; ++ return $config{$h}{$v} if defined($h && $config{$h}{$v}); + return $opt{$v} if defined $opt{$v}; + return $globals{$v} if defined $globals{$v}; + return default($v) if defined default($v); +@@ -1729,8 +1732,10 @@ + my ($sd, $rq, $request, $reply); + + debug("proxy = $proxy"); +- debug("url = $url"); ++ debug("url = %s", $url); + ## canonify proxy and url ++ my $force_ssl; ++ $force_ssl = 1 if ($url =~ /^https:/); + $proxy =~ s%^https?://%%i; + $url =~ s%^https?://%%i; + $server = $url; +@@ -1743,7 +1748,7 @@ + $globals{'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' ) { ++ if ( $force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip') ) { + $use_ssl = 1; + $default_port = 443; + load_ssl_support; +@@ -1781,7 +1786,7 @@ + $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); + if (! opt('exec')) { + debug("skipped network connection"); +- verbose("SENDING:", $request); ++ verbose("SENDING:", "%s", $request); + } elsif ($use_ssl) { + $sd = IO::Socket::SSL->new( + PeerAddr => $peer, +@@ -1805,7 +1810,7 @@ + if (defined $sd) { + ## send the request to the http server + verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); +- verbose("SENDING:", $request); ++ verbose("SENDING:", "%s", $request); + + $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); + my $result = syswrite $sd, $rq; +@@ -1855,28 +1860,29 @@ + ###################################################################### + sub get_ip { + my $use = lc shift; ++ my $h = shift; + my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); + $arg = '' unless $arg; + + if ($use eq 'ip') { +- $ip = opt('ip'); ++ $ip = opt('ip', $h); + $arg = 'ip'; + + } elsif ($use eq 'if') { +- $skip = opt('if-skip') || ''; ++ $skip = opt('if-skip', $h) || ''; + $reply = `ifconfig $arg 2> /dev/null`; + $reply = '' if $?; + + } elsif ($use eq 'cmd') { + if ($arg) { +- $skip = opt('cmd-skip') || ''; ++ $skip = opt('cmd-skip', $h) || ''; + $reply = `$arg`; + $reply = '' if $?; + } + + } elsif ($use eq 'web') { +- $url = opt('web') || ''; +- $skip = opt('web-skip') || ''; ++ $url = opt('web', $h) || ''; ++ $skip = opt('web-skip', $h) || ''; + + if (exists $builtinweb{$url}) { + $skip = $builtinweb{$url}->{'skip'} unless $skip; +@@ -1885,15 +1891,15 @@ + $arg = $url; + + if ($url) { +- $reply = geturl(opt('proxy'), $url) || ''; ++ $reply = geturl(opt('proxy', $h), $url) || ''; + } + + } elsif (($use eq 'cisco')) { + # Stuff added to support Cisco router ip http daemon + # User fw-login should only have level 1 access to prevent + # password theft. This is pretty harmless. +- my $queryif = opt('if'); +- $skip = opt('fw-skip') || ''; ++ my $queryif = opt('if', $h); ++ $skip = opt('fw-skip', $h) || ''; + + # Convert slashes to protected value "\/" + $queryif =~ s%\/%\\\/%g; +@@ -1901,13 +1907,30 @@ + # Protect special HTML characters (like '?') + $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; + +- $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; +- $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; ++ $url = "http://".opt('fw', $h)."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; ++ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; ++ $arg = $url; ++ ++ } elsif (($use eq 'cisco-asa')) { ++ # Stuff added to support Cisco ASA ip https daemon ++ # User fw-login should only have level 1 access to prevent ++ # password theft. This is pretty harmless. ++ my $queryif = opt('if', $h); ++ $skip = opt('fw-skip', $h) || ''; ++ ++ # Convert slashes to protected value "\/" ++ $queryif =~ s%\/%\\\/%g; ++ ++ # Protect special HTML characters (like '?') ++ $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; ++ ++ $url = "https://".opt('fw', $h)."/exec/show%20interface%20${queryif}"; ++ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; + $arg = $url; + + } else { +- $url = opt('fw') || ''; +- $skip = opt('fw-skip') || ''; ++ $url = opt('fw', $h) || ''; ++ $skip = opt('fw-skip', $h) || ''; + + if (exists $builtinfw{$use}) { + $skip = $builtinfw{$use}->{'skip'} unless $skip; +@@ -1916,7 +1939,7 @@ + $arg = $url; + + if ($url) { +- $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; ++ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; + } + } + if (!defined $reply) { + + From e688f232cfbb6dcec620755ee1ebbca931503ed1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 24 Feb 2010 23:05:22 +0000 Subject: [PATCH 166/231] Subversion revision added git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@116 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 8c63e98..5f0415d 100755 --- a/ddclient +++ b/ddclient @@ -20,7 +20,9 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my $version = "3.8.0"; +my ($VERSION) = q$Revision$ =~ /(\d+)/; + +my $version = "3.8.0-r". $VERSION; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From 290190cdfd5c2249b9e097df59d813d16e3fc235 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 1 Jul 2010 08:08:57 +0000 Subject: [PATCH 167/231] Fixed #6: Add Red Hat package name to Perl module IO::Socket::SSL error message git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@117 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 1 + 1 file changed, 1 insertion(+) diff --git a/ddclient b/ddclient index 5f0415d..599eaee 100755 --- a/ddclient +++ b/ddclient @@ -1740,6 +1740,7 @@ sub load_ssl_support { fatal(<<"EOM"); Error loading the Perl module IO::Socket::SSL needed for SSL connect. On Debian, the package libio-socket-ssl-perl must be installed. +On Red Hat, the package perl-IO-Socket-SSL must be installed. EOM } import IO::Socket::SSL; From c3a888bc6a1ef0f924225eaccf81e7bbf830c328 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 13 Sep 2010 06:28:14 +0000 Subject: [PATCH 168/231] Applied patch from ticket #7, provided by Chris Carr git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@118 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 599eaee..dd7ce33 100755 --- a/ddclient +++ b/ddclient @@ -1079,7 +1079,7 @@ sub init_config { $opt{'use'} = 'web' if !define($opt{'use'}) && defined($opt{'web'}); ## sanity check - $opt{'max-interval'} = max(interval(opt('max-interval')), interval(default('max-interval'))); + $opt{'max-interval'} = min(interval(opt('max-interval')), interval(default('max-interval'))); $opt{'min-interval'} = max(interval(opt('min-interval')), interval(default('min-interval'))); $opt{'min-error-interval'} = max(interval(opt('min-error-interval')), interval(default('min-error-interval'))); From a7d8c50e0671052602445e1c3f0aa61f3bd2e2ef Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 13 Sep 2010 06:31:58 +0000 Subject: [PATCH 169/231] Applied patch from ticket #8, patch for cache content leaks to global git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@119 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ddclient b/ddclient index dd7ce33..3abf561 100755 --- a/ddclient +++ b/ddclient @@ -865,9 +865,9 @@ sub read_cache { %opt = %saved; foreach my $h (keys %cache) { - if (exists $config{$h}) { + if (exists $config->{$h}) { foreach (qw(atime mtime wtime ip status)) { - $config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; + $config->{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_}; } } } @@ -1117,7 +1117,7 @@ sub init_config { ## merge options into host definitions or globals if (@hosts) { foreach my $h (@hosts) { - $config{$h} = %{ merge(\%options, $config{$h}) }; + $config{$h} = merge(\%options, $config{$h}); } $opt{'host'} = join(',', @hosts); } else { From 4edbb7a3e96fafe495aed5bf75169706b3af2c5c Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 14 Sep 2010 11:19:47 +0000 Subject: [PATCH 170/231] patch for #10: invalid value for keyword ip git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@120 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 3abf561..304d06d 100755 --- a/ddclient +++ b/ddclient @@ -2440,6 +2440,8 @@ sub nic_dyndns2_update { my @reply = split /\n/, $reply; my $state = 'header'; + my $returnedip = $ip; + foreach my $line (@reply) { if ($state eq 'header') { $state = 'body'; @@ -2450,7 +2452,10 @@ sub nic_dyndns2_update { } elsif ($state =~ /^results/) { $state = 'results2'; - my ($status, $ip) = split / /, lc $line; + # bug #10: some dyndns providers does not return the IP so + # we can't use the returned IP + my ($status, $returnedip) = split / /, lc $line; + $ip = $returnedip if (not $ip); my $h = shift @hosts; $config{$h}{'status'} = $status; From e406318257cd8ffe86807b11a15c7eaf7334c407 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 13 Oct 2010 20:29:16 +0000 Subject: [PATCH 171/231] Fixing bug #13: multiple fetch-ip but introducing a multiple ip bug git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@121 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 85 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/ddclient b/ddclient index 304d06d..9e15ff0 100755 --- a/ddclient +++ b/ddclient @@ -740,47 +740,58 @@ sub runpostscript { ## update_nics ###################################################################### sub update_nics { - my %examined = (); + my %examined = (); + my %iplist = (); - foreach my $s (sort keys %services) { - my (@hosts, %ips) = (); - my $updateable = $services{$s}{'updateable'}; - my $update = $services{$s}{'update'}; + foreach my $s (sort keys %services) { + my (@hosts, %ips) = (); + my $updateable = $services{$s}{'updateable'}; + my $update = $services{$s}{'update'}; + foreach my $h (sort keys %config) { + next if $config{$h}{'protocol'} ne lc($s); + $examined{$h} = 1; + my $use = $config{$h}{'use'} || opt('use'); + local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; + # bug #13: we should only do this once + # use isn't enough, we have to save the origin to. + # this will break the multiple ip stuff if use has + # been used twice for the same device. + my $ip = ""; + if (defined $iplist{$use}) { + $ip = $iplist{$use}; + } else { + $ip = get_ip($use, $h); + if (!defined $ip || !$ip) { + warning("unable to determine IP address") + if !$daemon || opt('verbose'); + next; + } + if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { + warning("malformed IP address (%s)", $ip); + next; + } + $iplist{$use} = $ip; + } + $config{$h}{'wantip'} = $ip; + next if !nic_updateable($h, $updateable); + push @hosts, $h; + $ips{$ip} = $h; + } + if (@hosts) { + $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); + &$update(@hosts); + runpostscript(join ' ', keys %ips); + } + } foreach my $h (sort keys %config) { - next if $config{$h}{'protocol'} ne lc($s); - $examined{$h} = 1; - my $use = $config{$h}{'use'} || opt('use'); - local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; - my $ip = get_ip($use, $h); - if (!defined $ip || !$ip) { - warning("unable to determine IP address") - if !$daemon || opt('verbose'); - next; - } - if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { - warning("malformed IP address (%s)", $ip); - next; - } - $config{$h}{'wantip'} = $ip; - next if !nic_updateable($h, $updateable); - push @hosts, $h; - $ips{$ip} = $h; + if (!exists $examined{$h}) { + failed("%s was not updated because protocol %s is not supported.", + $h, define($config{$h}{'protocol'}, '') + ); + } } - if (@hosts) { - $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); - &$update(@hosts); - runpostscript(join ' ', keys %ips); - } - } - foreach my $h (sort keys %config) { - if (!exists $examined{$h}) { - failed("%s was not updated because protocol %s is not supported.", - $h, define($config{$h}{'protocol'}, '') - ); - } - } - write_cache(opt('cache')); + write_cache(opt('cache')); } ###################################################################### ## unlink_pid() From 6ff4d054b72c1dc5823ee3cf0e89595ea2e5c6d3 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 7 Dec 2010 07:25:08 +0000 Subject: [PATCH 172/231] Added longer password support, sended by Ingo Schwarze (#3130634) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@122 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ddclient b/ddclient index 9e15ff0..91b750d 100755 --- a/ddclient +++ b/ddclient @@ -1735,11 +1735,6 @@ sub encode_base64 ($;$) { # fix padding at the end my $padding = (3 - length($_[0]) % 3) % 3; $res =~ s/.{$padding}$/'=' x $padding/e if $padding; - - # break encoded string into lines of no more than 76 characters each - if (length $eol) { - $res =~ s/(.{1,76})/$1$eol/g; - } $res; } ###################################################################### @@ -1824,7 +1819,7 @@ sub geturl { $request .= "Host: $server\n"; my $auth = encode_base64("${login}:${password}"); - $request .= "Authorization: Basic $auth" if $login || $password; + $request .= "Authorization: Basic $auth\n" if $login || $password; $request .= "User-Agent: ${program}/${version}\n"; $request .= "Connection: close\n"; $request .= "\n"; From 4a21e0ac534aa2115ee0be5b301b8a320232f04a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 8 Mar 2011 21:21:08 +0000 Subject: [PATCH 173/231] Patching with zoneedit patch provided by killer-jk in ticket #15 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@123 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index 91b750d..876cb6e 100755 --- a/ddclient +++ b/ddclient @@ -417,6 +417,9 @@ my %variables = ( 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), }, + 'zoneedit-service-common-defaults' => { + 'zone' => setv(T_OFQDN, 0, 0, 1, undef, undef), + }, ); my %services = ( 'dyndns1' => { @@ -487,6 +490,7 @@ my %services = ( { 'server' => setv(T_FQDNP, 1, 0, 1, 'dynamic.zoneedit.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, $variables{'service-common-defaults'}, + $variables{'zoneedit-service-common-defaults'}, ), }, 'easydns' => { @@ -2877,6 +2881,11 @@ www.zoneedit.com. Configuration variables applicable to the 'zoneedit1' protocol are: protocol=zoneedit1 ## server=fqdn.of.service ## defaults to www.zoneedit.com + zone=zone-where-domains-are ## only needed if 1 or more subdomains are deeper + ## than 1 level in relation to the zone where it + ## is defined. For example, b.foo.com in a zone + ## foo.com doesn't need this, but a.b.foo.com in + ## the same zone needs zone=foo.com login=service-login ## login name and password registered with the service password=service-password ## your.domain.name ## the host registered with the service. @@ -2884,7 +2893,8 @@ Configuration variables applicable to the 'zoneedit1' protocol are: Example ${program}.conf file entries: ## single host update protocol=zoneedit1, \\ - server=dynamic.zoneedit.com, \\ + server=dynamic.zoneedit.com, \\ + zone=zone-where-domains-are, \\ login=my-zoneedit-login, \\ password=my-zoneedit-password \\ my.domain.name @@ -2908,7 +2918,7 @@ sub nic_zoneedit1_update { debug("\nnic_zoneedit1_update -------------------"); ## group hosts with identical attributes together - my %groups = group_hosts_by([ @_ ], [ qw(login password server) ]); + my %groups = group_hosts_by([ @_ ], [ qw(login password server zone) ]); ## update each set of hosts that had similar configurations foreach my $sig (keys %groups) { @@ -2925,6 +2935,7 @@ sub nic_zoneedit1_update { $url .= "http://$config{$h}{'server'}/auth/dynamic.html"; $url .= "?host=$hosts"; $url .= "&dnsto=$ip" if $ip; + $url .= "&zone=$config{$h}{'zone'}" if defined $config{$h}{'zone'}; my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); if (!defined($reply) || !$reply) { From e0a1283b10b8519c08c85c6feb045e8aa20352b5 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 9 Mar 2011 07:39:18 +0000 Subject: [PATCH 174/231] Patching with nic_updateable-warning patch provided by antespi in ticket #2 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@124 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ddclient b/ddclient index 876cb6e..9771d99 100755 --- a/ddclient +++ b/ddclient @@ -2165,11 +2165,14 @@ sub nic_updateable { } elsif (defined($sub) && &$sub($host)) { $update = 1; - - } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || - ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || - ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || - ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { + } elsif ((defined($cache{$host}{'static'}) && defined($config{$host}{'static'}) && + ($cache{$host}{'static'} ne $config{$host}{'static'})) || + (defined($cache{$host}{'wildcard'}) && defined($config{$host}{'wildcard'}) && + ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'})) || + (defined($cache{$host}{'mx'}) && defined($config{$host}{'mx'}) && + ($cache{$host}{'mx'} ne $config{$host}{'mx'})) || + (defined($cache{$host}{'backupmx'}) && defined($config{$host}{'backupmx'}) && + ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) ) { info("updating %s because host settings have been changed.", $host); $update = 1; From 1b4c31b82e7af6bff2fcf7dd627ba35ad28269cc Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 19 May 2011 20:31:20 +0000 Subject: [PATCH 175/231] Added patch for dtdns-support (#39) git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@125 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 96 ++++++++++++++++++++++++++++++++++++++++ sample-etc_ddclient.conf | 8 ++++ 2 files changed, 104 insertions(+) diff --git a/ddclient b/ddclient index 9771d99..e666ab4 100755 --- a/ddclient +++ b/ddclient @@ -420,6 +420,10 @@ my %variables = ( 'zoneedit-service-common-defaults' => { 'zone' => setv(T_OFQDN, 0, 0, 1, undef, undef), }, + 'dtdns-common-defaults' => { + 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), + 'client' => setv(T_STRING, 0, 1, 1, $program, undef), + }, ); my %services = ( 'dyndns1' => { @@ -545,6 +549,15 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'dtdns' => { + 'updateable' => undef, + 'update' => \&nic_dtdns_update, + 'examples' => \&nic_dtdns_examples, + 'variables' => merge( + $variables{'dtdns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -3559,6 +3572,89 @@ sub nic_freedns_update { } } +###################################################################### + +###################################################################### +## nic_dtdns_examples +###################################################################### +sub nic_dtdns_examples { + return < Date: Sun, 3 Jul 2011 10:03:39 +0000 Subject: [PATCH 176/231] Fixing #28: FreeDNS.afraid.org changed api slightly git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@126 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ddclient b/ddclient index e666ab4..293a9ce 100755 --- a/ddclient +++ b/ddclient @@ -3552,16 +3552,27 @@ sub nic_freedns_update { info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); - if($ip ne $freedns_hosts{$h}->[1]) { + if($ip eq $freedns_hosts{$h}->[1]) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("update not necessary %s: good: IP address already set to %s", $h, $ip); + } else { my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); if (!defined($reply) || !$reply) { failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); last; } - last if !header_ok($h, $reply); + if(!header_ok($h, $reply)) { + $config{$h}{'status'} = 'failed'; + last; + } - if($reply =~ /Updated.*host/) { - success("updating %s: good: IP address set to %s", $h, $ip); + if($reply =~ /Updated.*$h.*to.*$ip/) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); } else { $config{$h}{'status'} = 'failed'; warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); From fa6d1714c48587d8f9bbe60d043ddbfefde6ef74 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 11 Jul 2011 20:21:28 +0000 Subject: [PATCH 177/231] Applied smc-barricade-fw-alt.diff from ubuntu git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@127 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ddclient b/ddclient index 293a9ce..c3576f1 100755 --- a/ddclient +++ b/ddclient @@ -83,6 +83,11 @@ my %builtinfw = ( 'url' => '/status.htm', 'skip' => 'IP Address', }, + 'smc-barricade-alt' => { + 'name' => 'SMC Barricade FW (alternate config)', + 'url' => '/status.HTM', + 'skip' => 'WAN IP', + }, 'smc-barricade-7401bra' => { 'name' => 'SMC Barricade 7401BRA FW', 'url' => '/admin/wan1.htm', From 326c026b1d4f966965c7b35e3ce7ecc1552bc187 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 11 Jul 2011 20:24:43 +0000 Subject: [PATCH 178/231] Applied ip-up_run-parts.diff from ubuntu git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@128 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_ppp_ip-up.local | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sample-etc_ppp_ip-up.local b/sample-etc_ppp_ip-up.local index b7a9025..ec74f10 100644 --- a/sample-etc_ppp_ip-up.local +++ b/sample-etc_ppp_ip-up.local @@ -22,6 +22,10 @@ IP=${IP:-$PPP_LOCAL} IP=${IP:-$IPLOCAL} IP=${IP:-$4} +IFACE= +IFACE=${IFACE:-$PPP_IFACE} +IFACE=${IFACE:-$1} + ## update the DNS server unless the IP address is a private address ## that may be used as an internal LAN address (or PPtP tunnel). @@ -34,7 +38,7 @@ case "$IP" in ;; *) ( sleep 5 - ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 + ddclient -daemon=0 -syslog -use=if -if=$IFACE >/dev/null 2>&1 ) & ;; esac From 80b0c44e700809afc11c0c79fea8ab1033cc7f83 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 11 Jul 2011 20:53:57 +0000 Subject: [PATCH 179/231] Corrected release/readme.txt git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@129 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- release/readme.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/release/readme.txt b/release/readme.txt index 2a38d07..81d1999 100644 --- a/release/readme.txt +++ b/release/readme.txt @@ -1,17 +1,20 @@ This directory will contain anything related to releasing a new version of ddclient. It will be a replacement for -http://ddclient.wiki.sourceforge.net/HowtoRelease +https://sourceforge.net/apps/trac/ddclient/wiki/HowtoRelease Releasing files * tagging current version: see svn book -* update RELEASE NOTES -* update ChangeLog +{{{ +svn copy \ + https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk \ + https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.8.1 +}}} +* update RELEASENOTE +* update ChangeLog: {{{ svn2cl --group-by-day -i }}} * update version number -* svn copy https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.7.2 -( on the last release it has been done by just copying the local dir ) * bz2 en gz file aanmaken -* rsync -av ddclient-3.8.0.* wimpunk@frs.sf.net:uploads +* rsync -av ddclient-3.8.1.* wimpunk@frs.sf.net:uploads * aanmaken release: Release Notes 3.6.5 2004-11-24 From 1b406ca4c60ff4a98c8b1e12a7d30d6d3fd2249b Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 11 Jul 2011 22:21:49 +0000 Subject: [PATCH 180/231] Updates after releasing 3.8.1 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@131 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- release/readme.txt | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/release/readme.txt b/release/readme.txt index 81d1999..5e2947f 100644 --- a/release/readme.txt +++ b/release/readme.txt @@ -4,26 +4,26 @@ https://sourceforge.net/apps/trac/ddclient/wiki/HowtoRelease Releasing files -* tagging current version: see svn book -{{{ -svn copy \ - https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk \ - https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.8.1 -}}} * update RELEASENOTE * update ChangeLog: {{{ svn2cl --group-by-day -i }}} -* update version number -* bz2 en gz file aanmaken -* rsync -av ddclient-3.8.1.* wimpunk@frs.sf.net:uploads -* aanmaken release: - -Release Notes 3.6.5 2004-11-24 -ddclient-3.6.5.tar.bz2 33311 0 Any .bz2 -ddclient-3.6.5.tar.gz 35726 0 Any .gz - -* mail naar ddclient-support +* update version number: replace the version number in ddclient by the correct one +* tagging current version: +{{{ +svn copy trunk \ + https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.8.1 +}}} +* svn update tags +* svn revert trunk +* mkdir trunk/release/ddclient-3.8.1 +* cp ChangeLog trunk/release/ddclient-3.8.1 +* cp tags/release-3.8.1 trunk/release/ddclient-3.8.1 +* cd trunk/release +* remove unneeded directories release, patches, ... +* tar -cvzf ddclient-3.8.1.tar.gz ddclient-3.8.1 +* tar -cvjf ddclient-3.8.1.tar.bz2 ddclient-3.8.1 +* transfert via project page. Seems to be changed. * news updaten - +* mail to ddclient-support @ lists.sourceforge.net * freshmeat updaten * website bijtimmeren: versie nummer aanpassen (niet gevonden waar dat nu staat in de wiki) From face3058aa37576f91c3c69d2aefcd67f1a6b92a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 28 Apr 2013 14:16:02 +0000 Subject: [PATCH 181/231] Applying markdown synstax to README git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@147 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README => README.md | 79 ++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 44 deletions(-) rename README => README.md (71%) diff --git a/README b/README.md similarity index 71% rename from README rename to README.md index 2246ecb..44bd24e 100644 --- a/README +++ b/README.md @@ -1,33 +1,23 @@ =============================================================================== -DDCLIENT v3.6.7 +# DDCLIENT v3.8.0 ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. -IMPORTANT: The format and options used by ddclient have CHANGED. - Please examine the sample configuration file. - It is highly recommended that you take advantage of the - new daemon mode of operation. - -IMPORTANT: The installation location for the ddclient script has changed from - /root/bin/ - to - /usr/sbin/ - =============================================================================== Dynamic DNS services currently supported include: -DynDNS.com - See http://www.dyndns.com 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 -Loopia - See http://www.loopia.se for details + DynDNS.com - See http://www.dyndns.com 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 + Loopia - See http://www.loopia.se for details DDclient now supports many of cable/dsl broadband routers. @@ -50,50 +40,51 @@ REQUIREMENTS: ------------------------------------------------------------------------------- INSTALLATION: - cp ddclient /usr/sbin/ - mkdir /etc/ddclient - mkdir /var/cache/ddclient - cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf - vi /etc/ddclient/ddclient.conf - -- and change hostnames, logins, and passwords appropriately + cp ddclient /usr/sbin/ + mkdir /etc/ddclient + mkdir /var/cache/ddclient + cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf + vi /etc/ddclient/ddclient.conf + -- and change hostnames, logins, and passwords appropriately - ## For those using Redhat style rc files and using daemon-mode: - cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient - ## enable automatic startup when booting - ## check your distribution - /sbin/chkconfig --add ddclient - ## start the first time by hand - /etc/rc.d/init.d/ddclient start + ## For those using Redhat style rc files and using daemon-mode: + cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient + ## enable automatic startup when booting + ## check your distribution + /sbin/chkconfig --add ddclient + ## start the first time by hand + /etc/rc.d/init.d/ddclient start - ## If you are not using daemon-mode, configure cron and dhcp or ppp - ## as described below. + ## If you are not using daemon-mode, configure cron and dhcp or ppp + ## as described below. ------------------------------------------------------------------------------- TROUBLESHOOTING: 1. enable debugging and verbose messages. - $ ddclient -daemon=0 -debug -verbose -noquiet + ``$ ddclient -daemon=0 -debug -verbose -noquiet`` 2. Do you need to specify a proxy? If so, just add a - proxy=your.isp.proxy + ``proxy=your.isp.proxy`` to the ddclient.conf file. - 3. Define the IP address of your router with fw=xxx.xxx.xxx.xxx in - /etc/ddclient/ddclient.conf and then try - $ ddclient -daemon=0 -query + 3. Define the IP address of your router with ``fw=xxx.xxx.xxx.xxx`` in + ``/etc/ddclient/ddclient.conf`` and then try + ``$ ddclient -daemon=0 -query`` to see if the router status web page can be understood. 4. Need support for another router/firewall? Define the router status page yourself with: - fw=url-to-your-router's-status-page - fw-skip=any-string-preceding-your-IP-address + ``fw=url-to-your-router``'s-status-page + ``fw-skip=any-string-preceding-your-IP-address`` ddclient does something like this to provide builtin support for common routers. For example, the Linksys routers could have been added with: + fw=192.168.1.1/Status.htm - fw-skip=WAN.*?IP Address + fw-skip=WAN.*?IP Address OR Send me the output from: From 415fb15634b7459095e022eb7c68a9e8f2be567d Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 28 Apr 2013 14:28:00 +0000 Subject: [PATCH 182/231] Updated README file git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@148 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 44bd24e..19a63ec 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ =============================================================================== -# DDCLIENT v3.8.0 +# DDCLIENT v3.8.1 ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. @@ -16,8 +16,11 @@ Dynamic DNS services currently supported include: 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 + Sitelutions - See http://www.sitelutions.com for details Loopia - See http://www.loopia.se for details + Noip - See http://www.noip.com/ for details + Freedns - See http://freedns.afraid.org/ for details + dtdns - See http://www.dtdns.com/ for details DDclient now supports many of cable/dsl broadband routers. @@ -108,8 +111,9 @@ USING DDCLIENT WITH ppp If you are using a ppp connection, you can easily update your DynDNS entry with each connection, with: - ## configure pppd to update DynDNS with each connection - cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local + + ## configure pppd to update DynDNS with each connection + cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local Alternatively, you may just configure ddclient to operate as a daemon and monitor your ppp interface. @@ -121,9 +125,9 @@ If you have not configured ddclient to use daemon-mode, you'll need to configure cron to force an update once a month so that the dns entry will not become stale. - ## configure cron to force an update twice a month - cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient - vi /etc/cron.d/ddclient + ## configure cron to force an update twice a month + cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient + vi /etc/cron.d/ddclient ------------------------------------------------------------------------------- USING DDCLIENT WITH dhcpcd-1.3.17 @@ -131,16 +135,17 @@ USING DDCLIENT WITH dhcpcd-1.3.17 If you are using dhcpcd-1.3.17 or thereabouts, you can easily update your DynDNS entry automatically every time your lease is obtained or renewed by creating an executable file named: - /etc/dhcpc/dhcpcd-{your-interface}.exe + /etc/dhcpc/dhcpcd-{your-interface}.exe ie.: - cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe + cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe In my case, it is named dhcpcd-eth0.exe and contains the lines: - #!/bin/sh - PATH=/usr/sbin:/root/bin:${PATH} - logger -t dhcpcd IP address changed to $1 - ddclient -proxy fasthttp.sympatico.ca -wildcard -ip $1 | logger -t ddclient - exit 0 + + #!/bin/sh + PATH=/usr/sbin:/root/bin:${PATH} + logger -t dhcpcd IP address changed to $1 + ddclient -proxy fasthttp.sympatico.ca -wildcard -ip $1 | logger -t ddclient + exit 0 Other DHCP clients may have another method of calling out to programs for updating DNS entries. @@ -154,9 +159,9 @@ USING DDCLIENT WITH dhclient If you are using the ISC DHCP client (dhclient), you can update your DynDNS entry automatically every time your lease is obtained or renewed by creating an executable file named: - /etc/dhclient-exit-hooks + /etc/dhclient-exit-hooks ie.: - cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks + cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks Edit /etc/dhclient-exit-hooks to change any options required. From efc62a3d41d391016e7fbc13ecb304abb3c36ad6 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sun, 28 Apr 2013 14:55:34 +0000 Subject: [PATCH 183/231] Adding support for ChangeIP based on the patch from Michele Giorato http://sourceforge.net/p/ddclient/discussion/399428/thread/e85661ad/ git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@150 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 1 + ddclient | 82 ++++++++++++++++++++++++++++++++++++++++ sample-etc_ddclient.conf | 10 +++++ 3 files changed, 93 insertions(+) diff --git a/README.md b/README.md index 19a63ec..04ca6ec 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Dynamic DNS services currently supported include: Loopia - See http://www.loopia.se for details Noip - See http://www.noip.com/ for details Freedns - See http://freedns.afraid.org/ for details + ChangeIP - See http://www.changeip.com/ for details dtdns - See http://www.dtdns.com/ for details DDclient now supports many of cable/dsl broadband routers. diff --git a/ddclient b/ddclient index c3576f1..9eec957 100755 --- a/ddclient +++ b/ddclient @@ -554,6 +554,16 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'changeip' => { + 'updateable' => undef, + 'update' => \&nic_changeip_update, + 'examples' => \&nic_changeip_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'nic.changeip.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, + $variables{'service-common-defaults'}, + ), + }, 'dtdns' => { 'updateable' => undef, 'update' => \&nic_dtdns_update, @@ -3588,7 +3598,79 @@ sub nic_freedns_update { } } +###################################################################### +## nic_changeip_examples +###################################################################### +sub nic_changeip_examples { +return < Date: Tue, 14 May 2013 19:10:05 +0000 Subject: [PATCH 184/231] Adding sha1-patch provided by pirast in [9742ac09] git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@152 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ddclient b/ddclient index 9eec957..4d02adc 100755 --- a/ddclient +++ b/ddclient @@ -1789,13 +1789,18 @@ EOM ###################################################################### sub load_sha1_support { my $sha1_loaded = eval {require Digest::SHA1}; - unless ($sha1_loaded) { + my $sha_loaded = eval {require Digest::SHA}; + unless ($sha1_loaded || $sha_loaded) { fatal(<<"EOM"); -Error loading the Perl module Digest::SHA1 needed for freedns update. -On Debian, the package libdigest-sha1-perl must be installed. +Error loading the Perl module Digest::SHA1 or Digest::SHA needed for freedns update. +On Debian, the package libdigest-sha1-perl or libdigest-sha-perl must be installed. EOM } - import Digest::SHA1 (qw/sha1_hex/); + if($sha1_loaded) { + import Digest::SHA1 (qw/sha1_hex/); + } elsif($sha_loaded) { + import Digest::SHA (qw/sha1_hex/); + } } ###################################################################### ## geturl From 65c6f32f57e2db9060aa6384e3c23ca9968e176b Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 8 Jul 2013 13:20:35 +0000 Subject: [PATCH 185/231] Applying patch from [fb1ad014] fixing bug [#14] More info can be found on [fb1ad014] and has been discussed in the mailinglist: http://article.gmane.org/gmane.network.dns.ddclient.user/71. The patch was send by Rodrigo Araujo. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@153 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ddclient b/ddclient index 4d02adc..37d283c 100755 --- a/ddclient +++ b/ddclient @@ -783,15 +783,16 @@ sub update_nics { foreach my $h (sort keys %config) { next if $config{$h}{'protocol'} ne lc($s); $examined{$h} = 1; - my $use = $config{$h}{'use'} || opt('use'); - local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; - # bug #13: we should only do this once - # use isn't enough, we have to save the origin to. - # this will break the multiple ip stuff if use has - # been used twice for the same device. + # we only do this once per 'use' and argument combination + my $use = opt('use', $h); + my $arg_ip = opt('ip', $h) || ''; + my $arg_fw = opt('fw', $h) || ''; + my $arg_if = opt('if', $h) || ''; + my $arg_web = opt('web', $h) || ''; + my $arg_cmd = opt('cmd', $h) || ''; my $ip = ""; - if (defined $iplist{$use}) { - $ip = $iplist{$use}; + if (exists $iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd}) { + $ip = $iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd}; } else { $ip = get_ip($use, $h); if (!defined $ip || !$ip) { @@ -803,7 +804,7 @@ sub update_nics { warning("malformed IP address (%s)", $ip); next; } - $iplist{$use} = $ip; + $iplist{$use}{$arg_ip}{$arg_fw}{$arg_if}{$arg_web}{$arg_cmd} = $ip; } $config{$h}{'wantip'} = $ip; next if !nic_updateable($h, $updateable); @@ -1943,7 +1944,7 @@ sub geturl { sub get_ip { my $use = lc shift; my $h = shift; - my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); + my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use, $h), ''); $arg = '' unless $arg; if ($use eq 'ip') { From 9fa0e5872b894a3fcb5744976b855b4243942fd2 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Oct 2013 21:37:16 +0000 Subject: [PATCH 186/231] preventing deep sleep - see [bugs:#46] Fixing [bugs:#46] by applying the provided patch. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@154 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ddclient b/ddclient index 37d283c..10763a3 100755 --- a/ddclient +++ b/ddclient @@ -733,6 +733,10 @@ do { $0 = sprintf("%s - sleeping for %s seconds", $program, $left); $left -= sleep $delay; + # preventing deep sleep - see [bugs:#46] + if ($left > $daemon) { + $left = $daemon; + } } $caught_hup = 0; $result = 0; From b0e6b061881b99635c78be03416fb2c959a84cd4 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Oct 2013 22:38:56 +0000 Subject: [PATCH 187/231] Fallback to iproute if ifconfig doesn't work. This fix applies the patch provided by Maccied Grela in [bugs:#26] git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@155 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 1 + 1 file changed, 1 insertion(+) diff --git a/ddclient b/ddclient index 10763a3..61bc0d4 100755 --- a/ddclient +++ b/ddclient @@ -1958,6 +1958,7 @@ sub get_ip { } elsif ($use eq 'if') { $skip = opt('if-skip', $h) || ''; $reply = `ifconfig $arg 2> /dev/null`; + $reply = `ip addr list dev $arg 2> /dev/null` if $?; $reply = '' if $?; } elsif ($use eq 'cmd') { From aed1e5132873b4ca6560c92a43af503e8ec545d6 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 5 Nov 2013 21:04:30 +0000 Subject: [PATCH 188/231] Moving patching to the root of the repository. The patches are mostly there for historical reasons. They've been moved away to make cleaning easier. I think the applied patches should even be removed. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@156 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- patches/3com-oc-remote812.patch | 20 -- patches/cisco-asa.patch | 169 ------------- patches/create_patch.sh | 16 -- patches/ddclient-noip.patch | 183 -------------- patches/ddclient.daemon-timeout.patch | 33 --- patches/debianpatches/abuse_msg.diff | 14 -- patches/debianpatches/cachedir.diff | 22 -- patches/debianpatches/cisco_fw.diff | 14 -- patches/debianpatches/config_path.diff | 14 -- patches/debianpatches/daemon_check.diff | 16 -- patches/debianpatches/daemon_interval.diff | 14 -- patches/debianpatches/help_nonroot(2).diff | 46 ---- patches/debianpatches/help_nonroot.diff | 46 ---- patches/debianpatches/ip-up_run-parts.diff | 14 -- patches/debianpatches/maxinterval.diff | 14 -- patches/debianpatches/readme.txt | 24 -- patches/debianpatches/sample_path.diff | 26 -- .../debianpatches/smc-barricade-7401bra.patch | 23 -- .../debianpatches/smc-barricade-fw-alt.diff | 17 -- patches/debianpatches/update-new-config.patch | 22 -- patches/easydns.patch | 44 ---- patches/eurodns.patch | 23 -- patches/foreground.patch | 51 ---- patches/freedns-patch | 150 ------------ patches/loopia.patch | 82 ------- patches/mail-on-kill.patch | 44 ---- patches/multiple-ip.patch | 227 ------------------ patches/namecheap.patch | 23 -- patches/no-host.patch | 13 - patches/opendns.patch | 18 -- patches/password.patch | 77 ------ patches/prevent-hang.patch | 37 --- patches/readme.patch | 24 -- patches/regex_vlan.patch | 23 -- patches/typo_dnspark.patch | 15 -- patches/typo_namecheap_patch.diff.new | 18 -- patches/ubuntu/checked_ssl_load.diff | 34 --- patches/ubuntu/config_path.diff | 11 - patches/ubuntu/daemon_interval.diff | 11 - patches/ubuntu/default-timeout.patch | 13 - patches/ubuntu/sample_ubuntu.diff | 11 - patches/ubuntu/series | 6 - patches/ubuntu/smc-barricade-fw-alt.diff | 14 -- 43 files changed, 1716 deletions(-) delete mode 100644 patches/3com-oc-remote812.patch delete mode 100644 patches/cisco-asa.patch delete mode 100755 patches/create_patch.sh delete mode 100644 patches/ddclient-noip.patch delete mode 100644 patches/ddclient.daemon-timeout.patch delete mode 100644 patches/debianpatches/abuse_msg.diff delete mode 100644 patches/debianpatches/cachedir.diff delete mode 100644 patches/debianpatches/cisco_fw.diff delete mode 100644 patches/debianpatches/config_path.diff delete mode 100644 patches/debianpatches/daemon_check.diff delete mode 100644 patches/debianpatches/daemon_interval.diff delete mode 100644 patches/debianpatches/help_nonroot(2).diff delete mode 100644 patches/debianpatches/help_nonroot.diff delete mode 100644 patches/debianpatches/ip-up_run-parts.diff delete mode 100644 patches/debianpatches/maxinterval.diff delete mode 100644 patches/debianpatches/readme.txt delete mode 100644 patches/debianpatches/sample_path.diff delete mode 100644 patches/debianpatches/smc-barricade-7401bra.patch delete mode 100644 patches/debianpatches/smc-barricade-fw-alt.diff delete mode 100644 patches/debianpatches/update-new-config.patch delete mode 100644 patches/easydns.patch delete mode 100644 patches/eurodns.patch delete mode 100644 patches/foreground.patch delete mode 100644 patches/freedns-patch delete mode 100644 patches/loopia.patch delete mode 100644 patches/mail-on-kill.patch delete mode 100644 patches/multiple-ip.patch delete mode 100644 patches/namecheap.patch delete mode 100644 patches/no-host.patch delete mode 100644 patches/opendns.patch delete mode 100644 patches/password.patch delete mode 100644 patches/prevent-hang.patch delete mode 100644 patches/readme.patch delete mode 100644 patches/regex_vlan.patch delete mode 100644 patches/typo_dnspark.patch delete mode 100644 patches/typo_namecheap_patch.diff.new delete mode 100644 patches/ubuntu/checked_ssl_load.diff delete mode 100644 patches/ubuntu/config_path.diff delete mode 100644 patches/ubuntu/daemon_interval.diff delete mode 100644 patches/ubuntu/default-timeout.patch delete mode 100644 patches/ubuntu/sample_ubuntu.diff delete mode 100644 patches/ubuntu/series delete mode 100644 patches/ubuntu/smc-barricade-fw-alt.diff diff --git a/patches/3com-oc-remote812.patch b/patches/3com-oc-remote812.patch deleted file mode 100644 index 46f744a..0000000 --- a/patches/3com-oc-remote812.patch +++ /dev/null @@ -1,20 +0,0 @@ -# -# patch created with `svn diff -r53 . > patches/3com-oc-remote812.patch` -# on Wed Jun 6 15:07:45 CEST 2007 -# applied on r53 -# -# This patch was send to me by The_Beast on IRC. -# -Index: ddclient -=================================================================== ---- ddclient (revision 53) -+++ ddclient (working copy) -@@ -162,7 +162,7 @@ - '3com-oc-remote812' => { - 'name' => '3com OfficeConnect Remote 812', - 'url' => '/callEvent', -- 'skip' => '.*IP address in use', -+ 'skip' => '.*LOCAL', - }, - 'e-tech' => { - 'name' => 'E-tech Router', diff --git a/patches/cisco-asa.patch b/patches/cisco-asa.patch deleted file mode 100644 index 0da8ae4..0000000 --- a/patches/cisco-asa.patch +++ /dev/null @@ -1,169 +0,0 @@ -# Added support for cisco ASA as a firewall -# 2891001 - Philip Gladstone ---- ddclient 2009-01-27 14:14:02.000000000 -0500 -+++ /usr/sbin/ddclient 2009-11-02 18:26:02.000000000 -0500 -@@ -283,6 +283,7 @@ - 'if' => ": obtain IP from the -if {interface}", - 'cmd' => ": obtain IP from the -cmd {external-command}", - 'cisco' => ": obtain IP from Cisco FW at the -fw {address}", -+ 'cisco-asa' => ": obtain IP from Cisco ASA at the -fw {address}", - map { $_ => sprintf ": obtain IP from %s at the -fw {address}", $builtinfw{$_}->{'name'} } keys %builtinfw, - ); - sub ip_strategies_usage { -@@ -728,7 +729,7 @@ - $examined{$h} = 1; - my $use = $config{$h}{'use'} || opt('use'); - local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; -- my $ip = get_ip($use); -+ my $ip = get_ip($use, $h); - if (!defined $ip || !$ip) { - warning("unable to determine IP address") - if !$daemon || opt('verbose'); -@@ -1481,6 +1482,8 @@ - } - sub opt { - my $v = shift; -+ my $h = shift; -+ return $config{$h}{$v} if defined($h && $config{$h}{$v}); - return $opt{$v} if defined $opt{$v}; - return $globals{$v} if defined $globals{$v}; - return default($v) if defined default($v); -@@ -1729,8 +1732,10 @@ - my ($sd, $rq, $request, $reply); - - debug("proxy = $proxy"); -- debug("url = $url"); -+ debug("url = %s", $url); - ## canonify proxy and url -+ my $force_ssl; -+ $force_ssl = 1 if ($url =~ /^https:/); - $proxy =~ s%^https?://%%i; - $url =~ s%^https?://%%i; - $server = $url; -@@ -1743,7 +1748,7 @@ - $globals{'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' ) { -+ if ( $force_ssl || ($globals{'ssl'} and (caller(1))[3] ne 'main::get_ip') ) { - $use_ssl = 1; - $default_port = 443; - load_ssl_support; -@@ -1781,7 +1786,7 @@ - $0 = sprintf("%s - connecting to %s port %s", $program, $peer, $port); - if (! opt('exec')) { - debug("skipped network connection"); -- verbose("SENDING:", $request); -+ verbose("SENDING:", "%s", $request); - } elsif ($use_ssl) { - $sd = IO::Socket::SSL->new( - PeerAddr => $peer, -@@ -1805,7 +1810,7 @@ - if (defined $sd) { - ## send the request to the http server - verbose("CONNECTED: ", $use_ssl ? 'using SSL' : 'using HTTP'); -- verbose("SENDING:", $request); -+ verbose("SENDING:", "%s", $request); - - $0 = sprintf("%s - sending to %s port %s", $program, $peer, $port); - my $result = syswrite $sd, $rq; -@@ -1855,28 +1860,29 @@ - ###################################################################### - sub get_ip { - my $use = lc shift; -+ my $h = shift; - my ($ip, $arg, $reply, $url, $skip) = (undef, opt($use), ''); - $arg = '' unless $arg; - - if ($use eq 'ip') { -- $ip = opt('ip'); -+ $ip = opt('ip', $h); - $arg = 'ip'; - - } elsif ($use eq 'if') { -- $skip = opt('if-skip') || ''; -+ $skip = opt('if-skip', $h) || ''; - $reply = `ifconfig $arg 2> /dev/null`; - $reply = '' if $?; - - } elsif ($use eq 'cmd') { - if ($arg) { -- $skip = opt('cmd-skip') || ''; -+ $skip = opt('cmd-skip', $h) || ''; - $reply = `$arg`; - $reply = '' if $?; - } - - } elsif ($use eq 'web') { -- $url = opt('web') || ''; -- $skip = opt('web-skip') || ''; -+ $url = opt('web', $h) || ''; -+ $skip = opt('web-skip', $h) || ''; - - if (exists $builtinweb{$url}) { - $skip = $builtinweb{$url}->{'skip'} unless $skip; -@@ -1885,15 +1891,15 @@ - $arg = $url; - - if ($url) { -- $reply = geturl(opt('proxy'), $url) || ''; -+ $reply = geturl(opt('proxy', $h), $url) || ''; - } - - } elsif (($use eq 'cisco')) { - # Stuff added to support Cisco router ip http daemon - # User fw-login should only have level 1 access to prevent - # password theft. This is pretty harmless. -- my $queryif = opt('if'); -- $skip = opt('fw-skip') || ''; -+ my $queryif = opt('if', $h); -+ $skip = opt('fw-skip', $h) || ''; - - # Convert slashes to protected value "\/" - $queryif =~ s%\/%\\\/%g; -@@ -1901,13 +1907,30 @@ - # Protect special HTML characters (like '?') - $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - -- $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; -- $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; -+ $url = "http://".opt('fw', $h)."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; -+ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; -+ $arg = $url; -+ -+ } elsif (($use eq 'cisco-asa')) { -+ # Stuff added to support Cisco ASA ip https daemon -+ # User fw-login should only have level 1 access to prevent -+ # password theft. This is pretty harmless. -+ my $queryif = opt('if', $h); -+ $skip = opt('fw-skip', $h) || ''; -+ -+ # Convert slashes to protected value "\/" -+ $queryif =~ s%\/%\\\/%g; -+ -+ # Protect special HTML characters (like '?') -+ $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; -+ -+ $url = "https://".opt('fw', $h)."/exec/show%20interface%20${queryif}"; -+ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; - $arg = $url; - - } else { -- $url = opt('fw') || ''; -- $skip = opt('fw-skip') || ''; -+ $url = opt('fw', $h) || ''; -+ $skip = opt('fw-skip', $h) || ''; - - if (exists $builtinfw{$use}) { - $skip = $builtinfw{$use}->{'skip'} unless $skip; -@@ -1916,7 +1939,7 @@ - $arg = $url; - - if ($url) { -- $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; -+ $reply = geturl('', $url, opt('fw-login', $h), opt('fw-password', $h)) || ''; - } - } - if (!defined $reply) { - - diff --git a/patches/create_patch.sh b/patches/create_patch.sh deleted file mode 100755 index 1661ac2..0000000 --- a/patches/create_patch.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# whichlist -# * add getopt -# * automatic version - -{ -cat < patches/$2\` -# on $(date) -# applied on r$1 -# -EOF -svn diff -r$1 ddclient -} > patches/$2.new - diff --git a/patches/ddclient-noip.patch b/patches/ddclient-noip.patch deleted file mode 100644 index a87bc71..0000000 --- a/patches/ddclient-noip.patch +++ /dev/null @@ -1,183 +0,0 @@ ---- ddclient 2007-08-28 15:41:51.000000000 -0700 -+++ ddclient.noip 2007-08-28 15:37:32.000000000 -0700 -@@ -376,6 +376,25 @@ - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), - }, -+ 'noip-common-defaults' => { -+ 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), -+ }, -+ 'noip-service-common-defaults' => { -+ 'server' => setv(T_FQDNP, 1, 0, 1, 'dynupdate.no-ip.com', undef), -+ 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), -+ 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), -+ 'host' => setv(T_STRING, 1, 1, 1, '', undef), -+ 'ip' => setv(T_IP, 0, 1, 0, undef, undef), -+ 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), -+ 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), -+ 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), -+ 'status' => setv(T_ANY, 0, 1, 0, '', undef), -+ 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), -+ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), -+ 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), -+ 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), -+ 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), -+ }, - ); - my %services = ( - 'dyndns1' => { -@@ -398,6 +417,16 @@ - $variables{'service-common-defaults'}, - ), - }, -+ 'noip' => { -+ 'updateable' => undef, -+ 'update' => \&nic_noip_update, -+ 'examples' => \&nic_noip_examples, -+ 'variables' => merge( -+ { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, -+ $variables{'noip-common-defaults'}, -+ $variables{'noip-service-common-defaults'}, -+ ), -+ }, - 'concont' => { - 'updateable' => undef, - 'update' => \&nic_concont_update, -@@ -2359,6 +2388,137 @@ - if $state ne 'results2'; - } - } -+ -+ -+###################################################################### -+## nic_noip_update -+## Note: uses same features as nic_dyndns2_update, less return codes -+###################################################################### -+sub nic_noip_update { -+ debug("\nnic_noip_update -------------------"); -+ -+ ## group hosts with identical attributes together -+ my %groups = group_hosts_by([ @_ ], [ qw(login password server static custom wildcard mx backupmx) ]); -+ -+ my %errors = ( -+ 'badauth' => 'Invalid username or password', -+ 'badagent' => 'Invalid user agent', -+ 'nohost' => 'The hostname specified does not exist in the database', -+ '!donator' => 'The offline setting was set, when the user is not a donator', -+ 'abuse', => 'The hostname specified is blocked for abuse; open a trouble ticket at http://www.no-ip.com', -+ 'numhost' => 'System error: Too many or too few hosts found. open a trouble ticket at http://www.no-ip.com', -+ 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', -+ 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', -+ ); -+ -+ ## update each set of hosts that had similar configurations -+ foreach my $sig (keys %groups) { -+ my @hosts = @{$groups{$sig}}; -+ my $hosts = join(',', @hosts); -+ my $h = $hosts[0]; -+ -+ info("setting IP address to %s for %s", $ip, $hosts); -+ verbose("UPDATE:","updating %s", $hosts); -+ -+ my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ $url .= 'noip'; -+ $url .= "&hostname=$hosts"; -+ $url .= "&myip="; -+ $url .= $ip if $ip; -+ -+ -+ print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; -+ -+ -+ my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); -+ if (!defined($reply) || !$reply) { -+ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); -+ last; -+ } -+ last if !header_ok($hosts, $reply); -+ -+ my @reply = split /\n/, $reply; -+ my $state = 'header'; -+ foreach my $line (@reply) { -+ if ($state eq 'header') { -+ $state = 'body'; -+ -+ } elsif ($state eq 'body') { -+ $state = 'results' if $line eq ''; -+ -+ } elsif ($state =~ /^results/) { -+ $state = 'results2'; -+ -+ my ($status, $ip) = split / /, lc $line; -+ my $h = shift @hosts; -+ -+ $config{$h}{'status'} = $status; -+ if ($status eq 'good') { -+ $config{$h}{'ip'} = $ip; -+ $config{$h}{'mtime'} = $now; -+ success("updating %s: %s: IP address set to %s", $h, $status, $ip); -+ -+ } elsif (exists $errors{$status}) { -+ if ($status eq 'nochg') { -+ warning("updating %s: %s: %s", $h, $status, $errors{$status}); -+ $config{$h}{'ip'} = $ip; -+ $config{$h}{'mtime'} = $now; -+ $config{$h}{'status'} = 'good'; -+ -+ } else { -+ failed("updating %s: %s: %s", $h, $status, $errors{$status}); -+ } -+ -+ } elsif ($status =~ /w(\d+)(.)/) { -+ my ($wait, $units) = ($1, lc $2); -+ my ($sec, $scale) = ($wait, 1); -+ -+ ($scale, $units) = (1, 'seconds') if $units eq 's'; -+ ($scale, $units) = (60, 'minutes') if $units eq 'm'; -+ ($scale, $units) = (60*60, 'hours') if $units eq 'h'; -+ -+ $sec = $wait * $scale; -+ $config{$h}{'wtime'} = $now + $sec; -+ warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); -+ -+ } else { -+ failed("updating %s: %s: unexpected status (%s)", $h, $line); -+ } -+ } -+ } -+ failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}) -+ if $state ne 'results2'; -+ } -+} -+###################################################################### -+## nic_noip_examples -+###################################################################### -+sub nic_noip_examples { -+ return < 'The hostname specified exists, but not under the username currently being used', - '!donator' => 'The offline setting was set, when the user is not a donator', - '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', -- 'abuse', => 'The hostname specified is blocked for abuse; contact support@dyndns.org to be unblocked', -+ 'abuse', => 'The hostname specified is blocked for abuse; fill in the form at http://support.dyndns.org/abuse.php to be unblocked', - - 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', - 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', - diff --git a/patches/debianpatches/cachedir.diff b/patches/debianpatches/cachedir.diff deleted file mode 100644 index 3134537..0000000 --- a/patches/debianpatches/cachedir.diff +++ /dev/null @@ -1,22 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-06-14 22:03:52.000000000 +0200 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:19.748088891 +0100 -@@ -22,6 +22,7 @@ - my $now = time; - my $hostname = hostname(); - my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; - my $last_msgs = ''; -@@ -296,7 +297,7 @@ - 'global-defaults' => { - 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), - 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), -- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), -+ 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), - 'pid' => setv(T_FILE, 0, 0, 1, "", undef), - 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), - 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), - diff --git a/patches/debianpatches/cisco_fw.diff b/patches/debianpatches/cisco_fw.diff deleted file mode 100644 index 6772535..0000000 --- a/patches/debianpatches/cisco_fw.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.121898536 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:41.551915957 +0100 -@@ -1823,7 +1823,7 @@ - # Protect special HTML characters (like '?') - $queryif =~ s/([\?&= ])/sprintf("%%%02x",ord($1))/ge; - -- $url = "http://${arg}/level/1/exec/show/ip/interface/brief/${queryif}/CR"; -+ $url = "http://".opt('fw')."/level/1/exec/show/ip/interface/brief/${queryif}/CR"; - $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; - $arg = $url; - - diff --git a/patches/debianpatches/config_path.diff b/patches/debianpatches/config_path.diff deleted file mode 100644 index b59effb..0000000 --- a/patches/debianpatches/config_path.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.151893960 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:22:37.171890909 +0100 -@@ -21,7 +21,7 @@ - $program =~ s/d$//; - my $now = time; - my $hostname = hostname(); --my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $etc = ($program =~ /test/i) ? './' : '/etc/'; - my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; - diff --git a/patches/debianpatches/daemon_check.diff b/patches/debianpatches/daemon_check.diff deleted file mode 100644 index 75699d8..0000000 --- a/patches/debianpatches/daemon_check.diff +++ /dev/null @@ -1,16 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.023913484 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:03.977494794 +0100 -@@ -993,8 +993,8 @@ - - $opt{'timeout'} = 0 if opt('timeout') < 0; - $opt{'daemon'} = minimum('daemon') -- if define($opt{'daemon'},$globals{'daemon'},0) -- && define($opt{'daemon'},$globals{'daemon'}) < minimum('daemon'); -+ if interval(define($opt{'daemon'},$globals{'daemon'},0)) -+ && interval(define($opt{'daemon'},$globals{'daemon'})) < minimum('daemon'); - - ## define or modify host options specified on the command-line - if (exists $opt{'options'} && defined $opt{'options'}) { - diff --git a/patches/debianpatches/daemon_interval.diff b/patches/debianpatches/daemon_interval.diff deleted file mode 100644 index 91f0648..0000000 --- a/patches/debianpatches/daemon_interval.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:36.919929347 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:15.960666685 +0100 -@@ -966,6 +966,8 @@ - sub init_config { - %opt = %saved_opt; - -+ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; -+ - ## - $opt{'quiet'} = 0 if opt('verbose'); - - diff --git a/patches/debianpatches/help_nonroot(2).diff b/patches/debianpatches/help_nonroot(2).diff deleted file mode 100644 index 3056836..0000000 --- a/patches/debianpatches/help_nonroot(2).diff +++ /dev/null @@ -1,46 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 -@@ -553,6 +553,12 @@ - - test_geturl(opt('geturl')) if opt('geturl'); - -+## process help option -+if (opt('help')) { -+ *STDERR = *STDOUT; -+ usage(0); -+} -+ - ## read config file because 'daemon' mode may be defined there. - read_config(define($opt{'file'}, default('file')), \%config, \%globals); - init_config(); -@@ -1109,16 +1115,14 @@ - $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; - } - } -- if (opt('help')) { -- *STDERR = *STDOUT; -- usage(); -- } - } - - ###################################################################### - ## usage - ###################################################################### - sub usage { -+ my $exitcode = 1; -+ $exitcode = shift if @_ != 0; # use first arg if given - my $msg = ''; - if (@_) { - my $format = shift; -@@ -1128,7 +1132,7 @@ - } - printf STDERR "%s%s\n", $msg, $opt_usage; - sendmail(); -- exit 1; -+ exit $exitcode; - } - - ###################################################################### - diff --git a/patches/debianpatches/help_nonroot.diff b/patches/debianpatches/help_nonroot.diff deleted file mode 100644 index 3056836..0000000 --- a/patches/debianpatches/help_nonroot.diff +++ /dev/null @@ -1,46 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.083904332 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:46.118219338 +0100 -@@ -553,6 +553,12 @@ - - test_geturl(opt('geturl')) if opt('geturl'); - -+## process help option -+if (opt('help')) { -+ *STDERR = *STDOUT; -+ usage(0); -+} -+ - ## read config file because 'daemon' mode may be defined there. - read_config(define($opt{'file'}, default('file')), \%config, \%globals); - init_config(); -@@ -1109,16 +1115,14 @@ - $config{$h}{'cacheable'} = [ @{$services{$proto}{'cacheable'}} ]; - } - } -- if (opt('help')) { -- *STDERR = *STDOUT; -- usage(); -- } - } - - ###################################################################### - ## usage - ###################################################################### - sub usage { -+ my $exitcode = 1; -+ $exitcode = shift if @_ != 0; # use first arg if given - my $msg = ''; - if (@_) { - my $format = shift; -@@ -1128,7 +1132,7 @@ - } - printf STDERR "%s%s\n", $msg, $opt_usage; - sendmail(); -- exit 1; -+ exit $exitcode; - } - - ###################################################################### - diff --git a/patches/debianpatches/ip-up_run-parts.diff b/patches/debianpatches/ip-up_run-parts.diff deleted file mode 100644 index 2a504d9..0000000 --- a/patches/debianpatches/ip-up_run-parts.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/sample-etc_ppp_ip-up.local -=================================================================== ---- ddclient-3.7.0.orig/sample-etc_ppp_ip-up.local 2006-06-14 21:59:40.000000000 +0200 -+++ ddclient-3.7.0/sample-etc_ppp_ip-up.local 2006-12-01 23:22:37.101901586 +0100 -@@ -34,7 +34,7 @@ - ;; - *) ( - sleep 5 -- ddclient -daemon=0 -syslog -use=if -if=$1 >/dev/null 2>&1 -+ ddclient -daemon=0 -syslog -use=if -if=$IP >/dev/null 2>&1 - ) & - ;; - esac - diff --git a/patches/debianpatches/maxinterval.diff b/patches/debianpatches/maxinterval.diff deleted file mode 100644 index b245c9d..0000000 --- a/patches/debianpatches/maxinterval.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.062907535 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:24:53.543086628 +0100 -@@ -357,7 +357,7 @@ - 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), - 'status' => setv(T_ANY, 0, 1, 0, '', undef), - 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), -- 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('15d'), 0), -+ 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('30d'), 0), - 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), - - 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), - diff --git a/patches/debianpatches/readme.txt b/patches/debianpatches/readme.txt deleted file mode 100644 index cbd54f5..0000000 --- a/patches/debianpatches/readme.txt +++ /dev/null @@ -1,24 +0,0 @@ -(submitted by Torsten) - -cisco_fw.diff -config_path.diff -daemon_check.diff -daemon_interval.diff -maxinterval.diff -sample_path.diff -smc-barricade-7401bra.patch -smc-barricade-fw-alt.diff -update-new-config.patch - -cisco_fw.diff: Not sure what this change was about, have to check my - change log. -daemon_check.diff: Changes interpretation of the daemon parameter - to interval (to allow 5m for minutes etc.) when checking for min - value. -daemon_interval.diff: Changes interpretation of daemon interval during - input (now that I look at this, those two could probably be merged). - maxinterval.diff: Increase max interval for updates. - sample_path.diff: Adjust path in stamples. - update-new-config.patch: Force update if config has changed (still - needed?) - smc-*: Support for two more routers. diff --git a/patches/debianpatches/sample_path.diff b/patches/debianpatches/sample_path.diff deleted file mode 100644 index 2bfb485..0000000 --- a/patches/debianpatches/sample_path.diff +++ /dev/null @@ -1,26 +0,0 @@ -Index: ddclient-3.6.2/sample-etc_cron.d_ddclient -=================================================================== ---- ddclient-3.6.2.orig/sample-etc_cron.d_ddclient 2002-01-04 00:56:34.000000000 +0100 -+++ ddclient-3.6.2/sample-etc_cron.d_ddclient 2005-10-18 23:41:12.000000000 +0200 -@@ -10,7 +10,7 @@ - ###################################################################### - ## force an update twice a month - ## --30 23 1,15 * * root /root/bin/ddclient -daemon=0 -syslog -quiet -force -+30 23 1,15 * * root /usr/sbin/ddclient -daemon=0 -syslog -quiet -force - ###################################################################### - ## retry failed updates every hour (only if you are not using daemon-mode) - ## -Index: ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe -=================================================================== ---- ddclient-3.6.2.orig/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:40:22.000000000 +0200 -+++ ddclient-3.6.2/sample-etc_dhcpc_dhcpcd-eth0.exe 2005-10-18 23:41:02.000000000 +0200 -@@ -15,6 +15,6 @@ - 192.168.*) ;; - *) - logger -t dhcpcd IP address changed to $1 -- /root/bin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 -+ /usr/sbin/ddclient -daemon=0 -syslog -use=ip -ip=$1 >/dev/null 2>&1 - ;; - esac - diff --git a/patches/debianpatches/smc-barricade-7401bra.patch b/patches/debianpatches/smc-barricade-7401bra.patch deleted file mode 100644 index aadfec5..0000000 --- a/patches/debianpatches/smc-barricade-7401bra.patch +++ /dev/null @@ -1,23 +0,0 @@ -Add support for SMC7401BRA: - -ddclient support several kind of firewall to retrieve IP address, two of -them are smc-barricade and smc-barricade-alt, but these both doesn't -work with an SMC7401BRA. - -Index: ddclient -=================================================================== ---- ddclient.orig 2006-12-01 23:22:36.958923399 +0100 -+++ ddclient 2006-12-01 23:25:09.796607052 +0100 -@@ -73,6 +73,11 @@ - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, -+ 'smc-barricade-7401bra' => { -+ 'name' => 'SMC Barricade 7401BRA FW', -+ 'url' => '/admin/wan1.htm', -+ 'skip' => 'IP Address', -+ }, - 'netgear-rt3xx' => { - 'name' => 'Netgear FW', - 'url' => '/mtenSysStatus.html', - diff --git a/patches/debianpatches/smc-barricade-fw-alt.diff b/patches/debianpatches/smc-barricade-fw-alt.diff deleted file mode 100644 index c42637e..0000000 --- a/patches/debianpatches/smc-barricade-fw-alt.diff +++ /dev/null @@ -1,17 +0,0 @@ -Index: ddclient-3.7.0/ddclient -=================================================================== ---- ddclient-3.7.0.orig/ddclient 2006-12-01 23:22:37.003916535 +0100 -+++ ddclient-3.7.0/ddclient 2006-12-01 23:25:06.131166238 +0100 -@@ -73,6 +73,11 @@ - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, -+ 'smc-barricade-alt' => { -+ 'name' => 'SMC Barricade FW (alternate config)', -+ 'url' => '/status.HTM', -+ 'skip' => 'WAN IP', -+ }, - 'smc-barricade-7401bra' => { - 'name' => 'SMC Barricade 7401BRA FW', - 'url' => '/admin/wan1.htm', - diff --git a/patches/debianpatches/update-new-config.patch b/patches/debianpatches/update-new-config.patch deleted file mode 100644 index 4dd6240..0000000 --- a/patches/debianpatches/update-new-config.patch +++ /dev/null @@ -1,22 +0,0 @@ -ddclient did not update the dynamic DNS entry if the config changes. -This patch by Frans Pop to fixes this problem reported as Debian bug -#217041. -Index: ddclient -=================================================================== ---- ddclient.orig 2006-12-01 23:22:36.938926449 +0100 -+++ ddclient 2006-12-01 23:25:12.987120319 +0100 -@@ -1998,6 +1998,13 @@ - } elsif (defined($sub) && &$sub($host)) { - $update = 1; - -+ } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) || -+ ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) || -+ ($cache{$host}{'mx'} ne $config{$host}{'mx'}) || -+ ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) { -+ info("updating %s because host settings have been changed.", $host); -+ $update = 1; -+ - } else { - success("%s: skipped: IP address was already set to %s.", $host, $ip) - if opt('verbose'); - diff --git a/patches/easydns.patch b/patches/easydns.patch deleted file mode 100644 index 7458fe4..0000000 --- a/patches/easydns.patch +++ /dev/null @@ -1,44 +0,0 @@ -# -# patch from -# ---- ddclient 2004-11-24 17:23:56.000000000 +0100 -+++ ddclient.orig 2005-01-25 10:03:22.640483000 +0100 -@@ -257,6 +257,11 @@ - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), - }, -+ 'easydns-common-defaults' => { -+ 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), -+ 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), -+ 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), -+ }, - 'dnspark-common-defaults' => { - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'mxpri' => setv(T_NUMBER, 0, 0, 1, 5, undef), -@@ -319,6 +324,7 @@ - 'variables' => merge( - { 'server' => setv(T_FQDNP, 1, 0, 1, 'members.easydns.com', undef) }, - { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, -+ $variables{'easydns-common-defaults'}, - $variables{'service-common-defaults'}, - ), - }, -@@ -2487,14 +2493,14 @@ - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - -- #'http://members.easydns.com:80/dyn/ez-ipupdate.php?action=edit&myip=10.20.30.40&host_id=test.burry.ca&' -+ #'http://members.easydns.com/dyn/dyndns.php?hostname=test.burry.ca&myip=10.20.30.40&wildcard=ON' - - my $url; -- $url = "http://$config{$h}{'server'}/dyn/ez-ipupdate.php?action=edit"; -- $url .= "&host_id=$hosts"; -+ $url = "http://$config{$h}{'server'}/dyn/dyndns.php?"; -+ $url .= "hostname=$hosts"; - $url .= "&myip="; - $url .= $ip if $ip; -- $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'YES', 'NO', 'NO') if defined $config{$h}{'wildcard'}; -+ $url .= "&wildcard=" . ynu($config{$h}{'wildcard'}, 'ON', 'OFF', 'OFF') if defined $config{$h}{'wildcard'}; - - if ($config{$h}{'mx'}) { - $url .= "&mx=$config{$h}{'mx'}"; diff --git a/patches/eurodns.patch b/patches/eurodns.patch deleted file mode 100644 index 5d542cc..0000000 --- a/patches/eurodns.patch +++ /dev/null @@ -1,23 +0,0 @@ -# -# patch created with `svn diff -r83 . > patches/eurodns` -# on Tue Feb 19 15:57:27 CET 2008 -# -# This patch is based on the original patch from patch #1668836 -# It's currently not applied to subversion version of ddclient -# -Index: ddclient -=================================================================== ---- ddclient (revision 83) -+++ ddclient (working copy) -@@ -2303,6 +2303,11 @@ - - ## Select the DynDNS system to update - my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ # hack for EuroDynDNS -+ if ($config{$h}{'server'} =~ /.*eurodyndns.*/i) { -+ $url = "http://$config{$h}{'server'}/update/?system="; -+ } -+ - if ($config{$h}{'custom'}) { - warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) - if $config{$h}{'static'}; diff --git a/patches/foreground.patch b/patches/foreground.patch deleted file mode 100644 index 8842885..0000000 --- a/patches/foreground.patch +++ /dev/null @@ -1,51 +0,0 @@ -# [ ddclient-Patches-1893144 ] Foreground patch -# -# Adds a foreground options which makes it possible to run ddclient -# as a deamon without forking. patch submitted by John Palkovic. ---- ddclient-3.8.0 2009-01-27 20:14:02.000000000 +0100 -+++ ddclient+foreground-3.8.0 2009-08-17 22:27:32.000000000 +0200 -@@ -307,6 +307,7 @@ - my %variables = ( - 'global-defaults' => { - 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), -+ 'foreground' => setv(T_BOOL, 0, 0, 1, 0, undef), - 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), - 'cache' => setv(T_FILE, 0, 0, 1, "$cachedir$program.cache", undef), - 'pid' => setv(T_FILE, 0, 0, 1, "", undef), -@@ -535,6 +536,7 @@ - "usage: ${program} [options]", - "options are:", - [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], -++ [ "foreground", "!", "-foreground : do not fork" ], - [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], - [ "server", "=s", "-server host : update DNS information on 'host'" ], - [ "protocol", "=s", "-protocol type : update protocol used" ], -@@ -623,7 +625,10 @@ - $SIG{'HUP'} = sub { $caught_hup = 1; }; - $SIG{'TERM'} = sub { $caught_term = 1; }; - $SIG{'KILL'} = sub { $caught_kill = 1; }; --if (opt('daemon') && !opt('force')) { -+# don't fork() if foreground or force is on -+if (opt('foreground') || opt('force')) { -+ ; -+} elsif (opt('daemon')) { - $SIG{'CHLD'} = 'IGNORE'; - my $pid = fork; - if ($pid < 0) { -@@ -633,12 +638,15 @@ - exit 0; - } - $SIG{'CHLD'} = 'DEFAULT'; -- $opt{'syslog'} = 1; - open(STDOUT, ">/dev/null"); - open(STDERR, ">/dev/null"); - open(STDIN, " { -+ 'updateable' => undef, -+ 'update' => \&nic_freedns_update, -+ 'examples' => \&nic_freedns_examples, -+ 'variables' => merge( -+ { 'server' => setv(T_FQDNP, 1, 0, 1, 'freedns.afraid.org', undef) }, -+ { 'min-interval' => setv(T_DELAY, 0, 0, 1, 0, interval('5m')),}, -+ $variables{'service-common-defaults'}, -+ ), -+ }, - ); - $variables{'merged'} = merge($variables{'global-defaults'}, - $variables{'service-common-defaults'}, -@@ -1157,6 +1167,8 @@ - $proto = $config{$h}{'protocol'}; - $proto = opt('protocol') if !defined($proto); - -+ load_sha1_support() if ($proto eq "freedns"); -+ - if (!exists($services{$proto})) { - warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); - delete $config{$h}; -@@ -1718,6 +1730,19 @@ - { no warnings; $IO::Socket::SSL::DEBUG = 0; } - } - ###################################################################### -+## load_sha1_support -+###################################################################### -+sub load_sha1_support { -+ my $sha1_loaded = eval {require Digest::SHA1}; -+ unless ($sha1_loaded) { -+ fatal(<<"EOM"); -+Error loading the Perl module Digest::SHA1 needed for freedns update. -+On Debian, the package libdigest-sha1-perl must be installed. -+EOM -+ } -+ import Digest::SHA1 (qw/sha1_hex/); -+} -+###################################################################### - ## geturl - ###################################################################### - sub geturl { -@@ -3378,6 +3403,97 @@ - } - } - -+###################################################################### -+ -+###################################################################### -+## nic_freedns_examples -+###################################################################### -+sub nic_freedns_examples { -+return < -+## This returns a list of host|currentIP|updateURL lines. -+## Pick the line that matches myhost, and fetch the URL. -+## word 'Updated' for success, 'fail' for failure. -+## -+###################################################################### -+sub nic_freedns_update { -+ -+ -+ debug("\nnic_freedns_update -------------------"); -+ -+ ## First get the list of updatable hosts -+ my $url; -+ $url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}"); -+ my $reply = geturl(opt('proxy'), $url); -+ if (!defined($reply) || !$reply || !header_ok($_[0], $reply)) { -+ failed("updating %s: Could not connect to %s for site list.", $_[0], $url); -+ return; -+ } -+ my @lines = split("\n", $reply); -+ my %freedns_hosts; -+ grep { -+ my @rec = split(/\|/, $_); -+ $freedns_hosts{$rec[0]} = \@rec if ($#rec > 0); -+ } @lines; -+ if (!keys %freedns_hosts) { -+ failed("Could not get freedns update URLs from %s", $config{$_[0]}{'server'}); -+ return; -+ } -+ ## update each configured host -+ foreach my $h (@_) { -+ if(!$h){ next }; -+ my $ip = delete $config{$h}{'wantip'}; -+ info("setting IP address to %s for %s", $ip, $h); -+ verbose("UPDATE:","updating %s", $h); -+ -+ if($ip ne $freedns_hosts{$h}->[1]) { -+ my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); -+ if (!defined($reply) || !$reply) { -+ failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); -+ last; -+ } -+ last if !header_ok($h, $reply); -+ -+ if($reply =~ /Updated.*host/) { -+ success("updating %s: good: IP address set to %s", $h, $ip); -+ } else { -+ $config{$h}{'status'} = 'failed'; -+ warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); -+ warning("REPLIED: %s", $reply); -+ failed("updating %s: Invalid reply.", $h); -+ } -+ } -+ } -+} -+ - ###################################################################### - # vim: ai ts=4 sw=4 tw=78 : - - - diff --git a/patches/loopia.patch b/patches/loopia.patch deleted file mode 100644 index 2e428ab..0000000 --- a/patches/loopia.patch +++ /dev/null @@ -1,82 +0,0 @@ -# support for LoopiaDNS -# patch submitted by Erik Christiansson: #1609799 -# -Index: sample-etc_ddclient.conf -=================================================================== ---- sample-etc_ddclient.conf (revision 110) -+++ sample-etc_ddclient.conf (working copy) -@@ -164,3 +164,17 @@ - # login=my-namecheap.com-login, \ - # password=my-namecheap.com-password \ - # myhost.namecheap.com -+ -+## -+## -+## Loopia (loopia.se) -+## -+# use=web -+# web=loopia -+# protocol=dyndns2 -+# server=dns.loopia.se -+# script=/XDynDNSServer/XDynDNS.php -+# login=my-loopia.se-login -+# password=my-loopia.se-password -+# my.domain.tld,other.domain.tld -+ -Index: ddclient -=================================================================== ---- ddclient (revision 111) -+++ ddclient (working copy) -@@ -63,6 +63,7 @@ - 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => - 'Current IP Address:', }, - 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, -+ 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current Address:', }, - ); - my %builtinfw = ( - 'watchguard-soho' => { -@@ -292,6 +293,7 @@ - my %web_strategies = ( - 'dyndns'=> 1, - 'dnspark'=> 1, -+ 'loopia'=> 1, - ); - - sub setv { -@@ -428,6 +430,7 @@ - 'examples' => \&nic_dyndns2_examples, - 'variables' => merge( - { 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), }, -+ { 'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef), }, - # { 'offline' => setv(T_BOOL, 0, 1, 1, 0, undef), }, - $variables{'dyndns-common-defaults'}, - $variables{'service-common-defaults'}, -@@ -2295,6 +2298,7 @@ - Configuration variables applicable to the 'dyndns2' protocol are: - protocol=dyndns2 ## - server=fqdn.of.service ## defaults to members.dyndns.org -+ script=/path/to/script ## defaults to /nic/update - backupmx=no|yes ## indicates that this host is the primary MX for the domain. - static=no|yes ## indicates that this host has a static IP address. - custom=no|yes ## indicates that this host is a 'custom' top-level domain name. -@@ -2365,7 +2369,7 @@ - verbose("UPDATE:","updating %s", $hosts); - - ## Select the DynDNS system to update -- my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system="; - if ($config{$h}{'custom'}) { - warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) - if $config{$h}{'static'}; -Index: README -=================================================================== ---- README (revision 110) -+++ README (working copy) -@@ -27,6 +27,7 @@ - DnsPark - See http://www.dnspark.com for details - DslReports - See http://www.dslreports.com for details - Sitelutions - see http://www.sitelutions.com for details -+Loopia - See http://www.loopia.se for details - - DDclient now supports many of cable/dsl broadband routers. - diff --git a/patches/mail-on-kill.patch b/patches/mail-on-kill.patch deleted file mode 100644 index dd38ada..0000000 --- a/patches/mail-on-kill.patch +++ /dev/null @@ -1,44 +0,0 @@ -# -# patch created with `svn diff -r82 . > patches/mail-on-kill.patch` -# on Fri Feb 8 11:03:01 CET 2008 -# applied on r82 -# -# This patch prevent ddclient sending out mail when interrupted by -# a TERM signal. It still sends mail ended by a KILL signal. -# -Index: ddclient -=================================================================== ---- ddclient (revision 82) -+++ ddclient (working copy) -@@ -602,8 +602,10 @@ - } - my $caught_hup = 0; - my $caught_term = 0; -+my $caught_kill = 0; - $SIG{'HUP'} = sub { $caught_hup = 1; }; - $SIG{'TERM'} = sub { $caught_term = 1; }; -+$SIG{'KILL'} = sub { $caught_kill = 1; }; - if (opt('daemon') && !opt('force')) { - $SIG{'CHLD'} = 'IGNORE'; - my $pid = fork; -@@ -665,7 +667,7 @@ - sendmail(); - - my $left = $daemon; -- while (($left > 0) && !$caught_hup && !$caught_term) { -+ while (($left > 0) && !$caught_hup && !$caught_term && !$caught_kill) { - my $delay = $left > 10 ? 10 : $left; - - $0 = sprintf("%s - sleeping for %s seconds", $program, $left); -@@ -681,9 +683,9 @@ - } else { - $result = $result eq 'OK' ? 0 : 1; - } --} while ($daemon && !$result && !$caught_term); -+} while ($daemon && !$result && !$caught_term && !$caught_kill); - --warning("caught SIGTERM; exiting") if $caught_term; -+warning("caught SIGKILL; exiting") if $caught_kill; - unlink_pid(); - sendmail(); - diff --git a/patches/multiple-ip.patch b/patches/multiple-ip.patch deleted file mode 100644 index 121813b..0000000 --- a/patches/multiple-ip.patch +++ /dev/null @@ -1,227 +0,0 @@ -# -# Patch to add multiple IP support to ddclient-3.7.3 -# Copyright (C) 2008 Astaro AG www.astaro.com -# Author: Ingo Schwarze 16.09.2008 -# -# This patch is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This patch is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the ddclient program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, -# or look up http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt . -# -Index: ddclient -=================================================================== -RCS file: /home/cvs/sources/d/ddclient/ddclient,v -retrieving revision 1.1.1.2 -retrieving revision 1.4.2.1 -diff -u -p -r1.1.1.2 -r1.4.2.1 ---- ddclient 15 Sep 2008 11:13:55 -0000 1.1.1.2 -+++ ddclient 24 Sep 2008 10:06:24 -0000 1.4.2.1 -@@ -10,6 +10,9 @@ - # - # website: http://ddclient.sf.net - # -+# Support for multiple IP numbers added by -+# Astaro AG, Ingo Schwarze September 16, 2008 -+# - ###################################################################### - require 5.004; - use strict; -@@ -349,6 +352,19 @@ my %variables = ( - 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), - 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), - 'host' => setv(T_STRING, 1, 1, 1, '', undef), -+ -+ 'use' => setv(T_USE, 0, 0, 1, 'ip', undef), -+ 'if' => setv(T_IF, 0, 0, 1, 'ppp0', undef), -+ 'if-skip' => setv(T_STRING,0, 0, 1, '', undef), -+ 'web' => setv(T_STRING,0, 0, 1, 'dyndns', undef), -+ 'web-skip' => setv(T_STRING,0, 0, 1, '', undef), -+ 'fw' => setv(T_ANY, 0, 0, 1, '', undef), -+ 'fw-skip' => setv(T_STRING,0, 0, 1, '', undef), -+ 'fw-login' => setv(T_LOGIN, 0, 0, 1, '', undef), -+ 'fw-password' => setv(T_PASSWD,0, 0, 1, '', undef), -+ 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), -+ 'cmd-skip' => setv(T_STRING,0, 0, 1, '', undef), -+ - 'ip' => setv(T_IP, 0, 1, 0, undef, undef), - 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), - 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), -@@ -594,7 +610,7 @@ if (opt('daemon') && !opt('force')) { - } - - umask 077; --my ($daemon, $ip); -+my $daemon; - do { - $now = time; - $result = 'OK'; -@@ -617,19 +633,7 @@ do { - $daemon = $opt{'daemon'}; - $daemon = 0 if opt('force'); - -- ## obtain the IP address to use. -- $ip = get_ip(opt('use')); -- -- ## a little sanity check and then update the NICs.. -- if (!defined $ip || !$ip) { -- warning("unable to determine IP address") if !$daemon || opt('verbose'); -- -- } elsif ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { -- warning("malformed IP address (%s)", $ip); -- -- } else { -- update_nics(); -- } -+ update_nics(); - - if ($daemon) { - debug("sleep %s", $daemon); -@@ -683,20 +687,34 @@ sub update_nics { - my %examined = (); - - foreach my $s (sort keys %services) { -- my @hosts = (); -+ my (@hosts, %ips) = (); - my $updateable = $services{$s}{'updateable'}; - my $update = $services{$s}{'update'}; - - foreach my $h (sort keys %config) { - next if $config{$h}{'protocol'} ne lc($s); - $examined{$h} = 1; -+ my $use = $config{$h}{'use'} || opt('use'); -+ local $opt{$use} = $config{$h}{$use} if $config{$h}{$use}; -+ my $ip = get_ip($use); -+ if (!defined $ip || !$ip) { -+ warning("unable to determine IP address") -+ if !$daemon || opt('verbose'); -+ next; -+ } -+ if ($ip !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { -+ warning("malformed IP address (%s)", $ip); -+ next; -+ } -+ $config{$h}{'wantip'} = $ip; - next if !nic_updateable($h, $updateable); - push @hosts, $h; -+ $ips{$ip} = $h; - } - if (@hosts) { - $0 = sprintf("%s - updating %s", $program, join(',', @hosts)); - &$update(@hosts); -- runpostscript($ip); -+ runpostscript(join ' ', keys %ips); - } - } - foreach my $h (sort keys %config) { -@@ -1885,7 +1903,7 @@ sub group_hosts_by { - - my %groups = (); - foreach my $h (@$hosts) { -- my @keys = @$attributes; -+ my @keys = (@$attributes, 'wantip'); - map { $config{$h}{$_} = '' unless exists $config{$h}{$_} } @keys; - my $sig = join(',', map { "$_=$config{$h}{$_}" } @keys); - -@@ -1964,6 +1982,7 @@ sub nic_updateable { - my $host = shift; - my $sub = shift; - my $update = 0; -+ my $ip = $config{$host}{'wantip'}; - - if ($config{$host}{'login'} eq '') { - warning("null login name specified for host %s.", $host); -@@ -2122,6 +2141,7 @@ sub nic_dyndns1_update { - debug("\nnic_dyndns1_update -------------------"); - ## update each configured host - foreach my $h (@_) { -+ my $ip = delete $config{$h}{'wantip'}; - info("setting IP address to %s for %s", $ip, $h); - verbose("UPDATE:","updating %s", $h); - -@@ -2266,6 +2286,8 @@ sub nic_dyndns2_update { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; -+ my $ip = $config{$h}{'wantip'}; -+ delete $config{$_}{'wantip'} foreach @hosts; - - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); -@@ -2398,6 +2420,7 @@ sub nic_concont_update { - - ## update each configured host - foreach my $h (@_) { -+ my $ip = delete $config{$h}{'wantip'}; - info("setting IP address to %s for %s", $ip, $h); - verbose("UPDATE:","updating %s", $h); - -@@ -2480,6 +2503,7 @@ sub nic_dslreports1_update { - debug("\nnic_dslreports1_update -------------------"); - ## update each configured host - foreach my $h (@_) { -+ my $ip = delete $config{$h}{'wantip'}; - info("setting IP address to %s for %s", $ip, $h); - verbose("UPDATE:","updating %s", $h); - -@@ -2555,6 +2579,7 @@ sub nic_hammernode1_update { - - ## update each configured host - foreach my $h (@_) { -+ my $ip = delete $config{$h}{'wantip'}; - info("setting IP address to %s for %s", $ip, $h); - verbose("UPDATE:","updating %s", $h); - -@@ -2636,6 +2661,8 @@ sub nic_zoneedit1_update { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; -+ my $ip = $config{$h}{'wantip'}; -+ delete $config{$_}{'wantip'} foreach @hosts; - - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); -@@ -2778,6 +2805,9 @@ sub nic_easydns_update { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; -+ my $ip = $config{$h}{'wantip'}; -+ delete $config{$_}{'wantip'} foreach @hosts; -+ - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - -@@ -2935,6 +2965,9 @@ sub nic_dnspark_update { - my @hosts = @{$groups{$sig}}; - my $hosts = join(',', @hosts); - my $h = $hosts[0]; -+ my $ip = $config{$h}{'wantip'}; -+ delete $config{$_}{'wantip'} foreach @hosts; -+ - info("setting IP address to %s for %s", $ip, $hosts); - verbose("UPDATE:","updating %s", $hosts); - -@@ -3050,6 +3083,7 @@ sub nic_namecheap_update { - - ## update each configured host - foreach my $h (@_) { -+ my $ip = delete $config{$h}{'wantip'}; - info("setting IP address to %s for %s", $ip, $h); - verbose("UPDATE:","updating %s", $h); - -@@ -3132,6 +3166,7 @@ sub nic_sitelutions_update { - - ## update each configured host - foreach my $h (@_) { -+ my $ip = delete $config{$h}{'wantip'}; - info("setting IP address to %s for %s", $ip, $h); - verbose("UPDATE:","updating %s", $h); diff --git a/patches/namecheap.patch b/patches/namecheap.patch deleted file mode 100644 index 56b761c..0000000 --- a/patches/namecheap.patch +++ /dev/null @@ -1,23 +0,0 @@ -# https://sourceforge.net/forum/message.php?msg_id=4789961 -# By: hankessels -# -# this patch (r99) isn't complete yet. -# Check https://sourceforge.net/forum/message.php?msg_id=5053976 -# for more details. Patch has already been posted to the patches -# section as id #2010819 ---- ddclient.old 2008-02-21 00:57:17.000000000 +0900 -+++ ddclient 2008-02-21 01:36:42.000000000 +0900 -@@ -3060,8 +3060,11 @@ sub nic_namecheap_update { - - my $url; - $url = "http://$config{$h}{'server'}/update"; -- $url .= "?host=$h"; -- $url .= "&domain=$config{$h}{'login'}"; -+ my $domain = $config{$h}{'login'}; -+ my $host = $h; -+ $host =~ s/(.*)\.$domain(.*)/$1$2/; -+ $url .= "?host=$host"; -+ $url .= "&domain=$domain"; - $url .= "&password=$config{$h}{'password'}"; - $url .= "&ip="; - $url .= $ip if $ip; diff --git a/patches/no-host.patch b/patches/no-host.patch deleted file mode 100644 index a5121d3..0000000 --- a/patches/no-host.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ddclient -=================================================================== ---- ddclient (revision 88) -+++ ddclient (working copy) -@@ -1996,7 +1996,7 @@ - my $sub = shift; - my $update = 0; - -- if ($config{$host}{'login'} eq '') { -+ if (!($config{$host}{'login'})) { - warning("null login name specified for host %s.", $host); - - } elsif ($config{$host}{'password'} eq '') { diff --git a/patches/opendns.patch b/patches/opendns.patch deleted file mode 100644 index c4db577..0000000 --- a/patches/opendns.patch +++ /dev/null @@ -1,18 +0,0 @@ -# -# patch created with `svn diff -r65 . > patches/opendns` -# on Mon Jul 23 14:20:22 CEST 2007 -# applied on r65 -# -Index: ddclient -=================================================================== ---- ddclient (revision 65) -+++ ddclient (working copy) -@@ -2272,7 +2272,7 @@ - verbose("UPDATE:","updating %s", $hosts); - - ## Select the DynDNS system to update -- my $url = "http://$config{$h}{'server'}/nic/update?system="; -+ my $url = "https://updates.opendns.com/account/ddns.php?system="; - if ($config{$h}{'custom'}) { - warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $hosts) - if $config{$h}{'static'}; diff --git a/patches/password.patch b/patches/password.patch deleted file mode 100644 index e0d763d..0000000 --- a/patches/password.patch +++ /dev/null @@ -1,77 +0,0 @@ -# -# Patch to improve password handling in ddclient-3.7.3 -# Copyright (C) 2008 Astaro AG www.astaro.com -# Author: Ingo Schwarze 30.09.2008 -# -# Originally posted on the ddclient-user mailing list -# see http://permalink.gmane.org/gmane.network.dns.ddclient.user/18 -# -# This patch is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This patch is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with the ddclient program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, -# or look up http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt . -# -Index: ddclient -=================================================================== -RCS file: /home/cvs/sources/d/ddclient/ddclient,v -retrieving revision 1.1.1.2 -diff -u -p -r1.1.1.2 ddclient ---- ddclient 15 Sep 2008 11:13:55 -0000 1.1.1.2 -+++ ddclient 30 Sep 2008 18:55:52 -0000 -@@ -888,6 +888,7 @@ sub _read_config { - - local $lineno = 0; - my $continuation = ''; -+ my %passwords = (); - while () { - s/[\r\n]//g; - -@@ -903,10 +904,17 @@ sub _read_config { - } - - $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 -+ -+ ## parsing passwords is special -+ if (/^([^#]*\s)?([^#]*?password\S*?)\s*=\s*('.*'|[^']\S*)(.*)/) { -+ my ($head, $key, $value, $tail) = ($1 || '', $2, $3, $4); -+ $value = $1 if $value =~ /^'(.*)'$/; -+ $passwords{$key} = $value; -+ $_ = "${head}${key}=dummy${tail}"; -+ } -+ -+ ## remove comments -+ s/#.*//; - - ## handle continuation lines - $_ = "$continuation$_"; -@@ -931,6 +939,7 @@ sub _read_config { - - ## verify that keywords are valid...and check the value - foreach my $k (keys %locals) { -+ $locals{$k} = $passwords{$k} if defined $passwords{$k}; - if (!exists $variables{'merged'}{$k}) { - warning("unrecognized keyword '%s' (ignored)", $k); - delete $locals{$k}; -@@ -969,6 +978,7 @@ sub _read_config { - $config{$h}{'host'} = $h; - } - } -+ %passwords = (); - } - close(FD); - - diff --git a/patches/prevent-hang.patch b/patches/prevent-hang.patch deleted file mode 100644 index 6c4701a..0000000 --- a/patches/prevent-hang.patch +++ /dev/null @@ -1,37 +0,0 @@ -# http://sourceforge.net/tracker/?func=detail&atid=676130&aid=2880462&group_id=116817 -# ddclient hangs forever under some circumstances - ID: 2880462 -# -Index: ddclient -=================================================================== ---- ddclient (revision 113) -+++ ddclient (working copy) -@@ -1847,14 +1847,12 @@ - my $result = syswrite $sd, $rq; - if ($result != length($rq)) { - warning("cannot send to $peer:$port ($!)."); -- - } else { -- my $timeout = 0; -- local $SIG{'ALRM'} = sub { $timeout = 1; }; -- - $0 = sprintf("%s - reading from %s port %s", $program, $peer, $port); -+ eval { -+ local $SIG{'ALRM'} = sub { die "timeout";}; - alarm(opt('timeout')) if opt('timeout') > 0; -- while (!$timeout && ($_ = <$sd>)) { -+ while ($_ = <$sd>) { - $0 = sprintf("%s - read from %s port %s", $program, $peer, $port); - verbose("RECEIVE:", "%s", define($_, "")); - $reply .= $_ if defined $_; -@@ -1862,8 +1860,10 @@ - if (opt('timeout') > 0) { - alarm(0); - } -+ }; - close($sd); -- if ($timeout) { -+ -+ if ($@ and $@ =~ /timeout/) { - warning("TIMEOUT: %s after %s seconds", $to, opt('timeout')); - $reply = ''; - } diff --git a/patches/readme.patch b/patches/readme.patch deleted file mode 100644 index 812cad4..0000000 --- a/patches/readme.patch +++ /dev/null @@ -1,24 +0,0 @@ -# -# patch submitted by Kmos -# See tracker #1752931 -# ---- README.orig 2007-07-09 23:50:01.000000000 +0100 -+++ README 2007-07-12 20:50:28.000000000 +0100 -@@ -18,7 +16,7 @@ - - Dynamic DNS services currently supported include: - --DynDNS.org - See http://www.dyndns.org for details on obtaining a free account. -+DynDNS.com - See http://www.dyndns.com 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. -@@ -34,7 +32,7 @@ - http://sourceforge.net/projects/ddclient/ - - 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. -+through sourceforge.net. Please check out http://ddclient.sf.net - - ------------------------------------------------------------------------------- - REQUIREMENTS: diff --git a/patches/regex_vlan.patch b/patches/regex_vlan.patch deleted file mode 100644 index e063768..0000000 --- a/patches/regex_vlan.patch +++ /dev/null @@ -1,23 +0,0 @@ -# -# patch created with `svn diff -r61 . > patches/regex_vlan.patch` -# on Tue Jul 10 21:29:49 CEST 2007 -# applied on r61 -# -# bug originally reported on ubuntu: -# https://bugs.edge.launchpad.net/ubuntu/+source/ddclient/+bug/77570 -# posted upstream as bug #1747337 -# patch written by marclogghe -# -Index: ddclient -=================================================================== ---- ddclient (revision 61) -+++ ddclient (working copy) -@@ -1601,7 +1601,7 @@ - return undef if $value eq ""; - - } elsif ($type eq T_IF) { -- return undef if $value !~ /^[a-z0-9:_-]+$/; -+ return undef if $value !~ /^[a-z0-9:._-]+$/; - - } elsif ($type eq T_PROG) { - return undef if $value eq ""; diff --git a/patches/typo_dnspark.patch b/patches/typo_dnspark.patch deleted file mode 100644 index aa9bbdd..0000000 --- a/patches/typo_dnspark.patch +++ /dev/null @@ -1,15 +0,0 @@ -# -# typo_dnspark.patch send by Marco. -# Applied on ddclient Rev 72 -# ---- ddclient.orig 2007-07-31 15:44:20.000000000 +0100 -+++ ddclient 2007-07-31 15:45:52.000000000 +0100 -@@ -2875,7 +2875,7 @@ - - The 'dnspark' protocol is used by DNS service offered by www.dnspark.com. - --Configuration variables applicable to the 'easydns' protocol are: -+Configuration variables applicable to the 'dnspark' protocol are: - protocol=dnspark ## - server=fqdn.of.service ## defaults to www.dnspark.com - backupmx=no|yes ## indicates that DNSPark should be the secondary MX diff --git a/patches/typo_namecheap_patch.diff.new b/patches/typo_namecheap_patch.diff.new deleted file mode 100644 index 53704f8..0000000 --- a/patches/typo_namecheap_patch.diff.new +++ /dev/null @@ -1,18 +0,0 @@ -# -# patch created with `svn diff -r57 . > patches/typo_namecheap_patch.diff` -# on Tue Jul 10 09:25:19 CEST 2007 -# applied on r57 -# -Index: ddclient -=================================================================== ---- ddclient (revision 59) -+++ ddclient (working copy) -@@ -3014,7 +3014,7 @@ - - The 'namecheap' protocol is used by DNS service offered by www.namecheap.com. - --Configuration variables applicable to the 'easydns' protocol are: -+Configuration variables applicable to the 'namecheap' protocol are: - protocol=namecheap ## - server=fqdn.of.service ## defaults to dynamicdns.park-your-domain.com - login=service-login ## login name and password registered with the service diff --git a/patches/ubuntu/checked_ssl_load.diff b/patches/ubuntu/checked_ssl_load.diff deleted file mode 100644 index 305ffb6..0000000 --- a/patches/ubuntu/checked_ssl_load.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-05-03 23:24:39.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-05-03 23:27:44.000000000 +0100 -@@ -1635,6 +1642,20 @@ - $res; - } - ###################################################################### -+## load_ssl_support -+###################################################################### -+sub load_ssl_support { -+ my $ssl_loaded = eval {require IO::Socket::SSL}; -+ unless ($ssl_loaded) { -+ fatal(<<"EOM"); -+Error loading the Perl module IO::Socket::SSL needed for SSL connect. -+On Debian, the package libio-socket-ssl-perl must be installed. -+EOM -+ } -+ import IO::Socket::SSL; -+ { no warnings; $IO::Socket::SSL::DEBUG = 0; } -+} -+###################################################################### - ## geturl - ###################################################################### - sub geturl { -@@ -1663,9 +1684,7 @@ - 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; } -+ load_ssl_support; - } else { - $use_ssl = 0; - $default_port = 80; diff --git a/patches/ubuntu/config_path.diff b/patches/ubuntu/config_path.diff deleted file mode 100644 index 3908302..0000000 --- a/patches/ubuntu/config_path.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-28 14:31:23.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-04-28 14:31:33.000000000 +0100 -@@ -21,7 +21,7 @@ - $program =~ s/d$//; - my $now = time; - my $hostname = hostname(); --my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; -+my $etc = ($program =~ /test/i) ? './' : '/etc/'; - my $cachedir = ($program =~ /test/i) ? './' : '/var/cache/ddclient/'; - my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; - my $msgs = ''; diff --git a/patches/ubuntu/daemon_interval.diff b/patches/ubuntu/daemon_interval.diff deleted file mode 100644 index d997b32..0000000 --- a/patches/ubuntu/daemon_interval.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-28 20:43:53.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-04-28 20:42:57.000000000 +0100 -@@ -977,6 +977,8 @@ - sub init_config { - %opt = %saved_opt; - -+ $opt{'daemon'}=interval($opt{'daemon'}) if defined $opt{'daemon'}; -+ - ## - $opt{'quiet'} = 0 if opt('verbose'); - diff --git a/patches/ubuntu/default-timeout.patch b/patches/ubuntu/default-timeout.patch deleted file mode 100644 index 1f7197f..0000000 --- a/patches/ubuntu/default-timeout.patch +++ /dev/null @@ -1,13 +0,0 @@ -# patch original from ubuntu forum: -# https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 ---- ddclient 2007-10-25 19:39:46.000000000 +0300 -+++ ddclient 2007-10-25 19:36:41.000000000 +0300 -@@ -328,7 +328,7 @@ - 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), - 'cmd-skip' => setv(T_STRING,1, 0, 1, '', undef), - -- 'timeout' => setv(T_DELAY, 0, 0, 1, 0, interval('120s')), -+ 'timeout' => setv(T_DELAY, 0, 0, 1, interval('120s'), 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), diff --git a/patches/ubuntu/sample_ubuntu.diff b/patches/ubuntu/sample_ubuntu.diff deleted file mode 100644 index ab2a7cd..0000000 --- a/patches/ubuntu/sample_ubuntu.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu.orig 2007-04-28 13:01:23.000000000 +0100 -+++ ddclient-3.7.1/sample-etc_rc.d_init.d_ddclient.ubuntu 2007-04-28 13:01:51.000000000 +0100 -@@ -5,7 +5,7 @@ - # Submitted by paolo martinelli - - DDCLIENT=/usr/sbin/ddclient --CONF=/etc/ddclient/ddclient.conf -+CONF=/etc/ddclient.conf - PIDFILE=/var/run/ddclient.pid - - test -x $DDCLIENT || exit 0 diff --git a/patches/ubuntu/series b/patches/ubuntu/series deleted file mode 100644 index 698bcdd..0000000 --- a/patches/ubuntu/series +++ /dev/null @@ -1,6 +0,0 @@ -config_path.diff -dyndns_com.diff -daemon_interval.diff -sample_ubuntu.diff -smc-barricade-fw-alt.diff -checked_ssl_load.diff diff --git a/patches/ubuntu/smc-barricade-fw-alt.diff b/patches/ubuntu/smc-barricade-fw-alt.diff deleted file mode 100644 index a91c63f..0000000 --- a/patches/ubuntu/smc-barricade-fw-alt.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- ddclient-3.7.1/ddclient.orig 2007-04-30 00:43:32.000000000 +0100 -+++ ddclient-3.7.1/ddclient 2007-05-03 23:07:24.000000000 +0100 -@@ -73,6 +73,11 @@ - 'url' => '/status.htm', - 'skip' => 'IP Address', - }, -+ 'smc-barricade-alt' => { -+ 'name' => 'SMC Barricade FW (alternate config)', -+ 'url' => '/status.HTM', -+ 'skip' => 'WAN IP', -+ }, - 'smc-barricade-7401bra' => { - 'name' => 'SMC Barricade 7401BRA FW', - 'url' => '/admin/wan1.htm', From ffc7eade7fbd89db7bdef8936df25bf73fc2282e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 26 Dec 2013 09:42:01 +0000 Subject: [PATCH 189/231] Committing release notes and readme information to trunk git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@158 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 4 ++-- RELEASENOTE | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 04ca6ec..23a0a0b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ =============================================================================== -# DDCLIENT v3.8.1 +# DDCLIENT v3.8.2 ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. @@ -20,7 +20,7 @@ Dynamic DNS services currently supported include: Loopia - See http://www.loopia.se for details Noip - See http://www.noip.com/ for details Freedns - See http://freedns.afraid.org/ for details - ChangeIP - See http://www.changeip.com/ for details + ChangeIP - See http://www.changeip.com/ for details dtdns - See http://www.dtdns.com/ for details DDclient now supports many of cable/dsl broadband routers. diff --git a/RELEASENOTE b/RELEASENOTE index a3c9424..680f5d4 100644 --- a/RELEASENOTE +++ b/RELEASENOTE @@ -1,11 +1,11 @@ -It's been a while but here is new release of ddclient. There are some important -changes and some documentation is modified. A detailed overview can be found -in ChangeLog but here's a quick overview: +It's been a while and has been announced a while agobut here is new release of +ddclient. There are some important changes and some documentation is modified. +A detailed overview can be found in ChangeLog but here's a quick overview: - * Added ddclient-noip.patch send by Kurt Bussche. - * Added and applied default timeout patch from - https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 - * Sending mail when killed, not after TERM-signal - * Added support for multiple IP adresses. + * adding support by ChangeIP - patch send by Michele Giorato + * sha-1 patch send by pirast to allow Digest::SHA + * allow reuse of use - patch send by Rodrigo Araujo + * preventing deep sleep - see [bugs:#46] + * Fallback to iproute if ifconfig doesn't work send by Maccied Grela From de6b2ee8a4eb17667120467d49710fa53e07f524 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 26 Dec 2013 09:42:35 +0000 Subject: [PATCH 190/231] Commiting updated release information git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@159 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- release/readme.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/release/readme.txt b/release/readme.txt index 5e2947f..e574af0 100644 --- a/release/readme.txt +++ b/release/readme.txt @@ -10,17 +10,22 @@ Releasing files * tagging current version: {{{ svn copy trunk \ - https://ddclient.svn.sourceforge.net/svnroot/ddclient/tags/release-3.8.1 + svn+ssh://wimpunk@svn.code.sf.net/p/ddclient/code/tags/release-3.8.2 \ + -m 'Release of version 3.8.2' }}} * svn update tags +* git commit ddclient ChangeLog README.md RELEASENOTE +* git tag -a v3.8.2 -m 'Release of version 3.8.2' +* git push origin v3.8.2 * svn revert trunk -* mkdir trunk/release/ddclient-3.8.1 -* cp ChangeLog trunk/release/ddclient-3.8.1 -* cp tags/release-3.8.1 trunk/release/ddclient-3.8.1 +* mkdir trunk/release/ddclient-3.8.2 +* cp -R tags/release-3.8.2 trunk/release/ddclient-3.8.2 +* ChangeLog doesn't get copied because it's exlucluded from the svn repository: + {{{ cp ChangeLog trunk/release/ddclient-3.8.2 }}} * cd trunk/release -* remove unneeded directories release, patches, ... -* tar -cvzf ddclient-3.8.1.tar.gz ddclient-3.8.1 -* tar -cvjf ddclient-3.8.1.tar.bz2 ddclient-3.8.1 +* remove unneeded directories release, ... +* tar -cvzf ddclient-3.8.2.tar.gz ddclient-3.8.2 +* tar -cvjf ddclient-3.8.2.tar.bz2 ddclient-3.8.2 * transfert via project page. Seems to be changed. * news updaten * mail to ddclient-support @ lists.sourceforge.net From 7a132fc6766f9282e236bf3b42d68a7043b6cb54 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 20 Mar 2014 19:56:58 +0000 Subject: [PATCH 191/231] Corrected release note git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@160 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- RELEASENOTE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASENOTE b/RELEASENOTE index 680f5d4..9b1edd4 100644 --- a/RELEASENOTE +++ b/RELEASENOTE @@ -1,4 +1,4 @@ -It's been a while and has been announced a while agobut here is new release of +It's been a while and has been announced a while ago but here is new release of ddclient. There are some important changes and some documentation is modified. A detailed overview can be found in ChangeLog but here's a quick overview: From db57ab1c9719bee8a06688031b55cde0687d50d2 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 20 Mar 2014 20:02:14 +0000 Subject: [PATCH 192/231] Added Alpine Linux init script Patch send by Tal on github. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@161 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 9 ++++++ README.ssl | 2 ++ ddclient | 1 + sample-etc_rc.d_init.d_ddclient.alpine | 38 ++++++++++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100755 sample-etc_rc.d_init.d_ddclient.alpine diff --git a/README.md b/README.md index 23a0a0b..e734206 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,15 @@ INSTALLATION: ## start the first time by hand /etc/rc.d/init.d/ddclient start + ## For those using Alpine style rc files and using daemon-mode: + cp sample-etc_rc.d_init.d_ddclient.alpine /etc/init.d/ddclient + ## enable automatic startup when booting + rc-update add ddclient + ## make sure you have perl installed + apk add perl + ## start the first time by hand + rc-service ddclient start + ## If you are not using daemon-mode, configure cron and dhcp or ppp ## as described below. diff --git a/README.ssl b/README.ssl index ba75d93..2b875f4 100644 --- a/README.ssl +++ b/README.ssl @@ -6,5 +6,7 @@ you have IO::Socket::SSL. On debian, you need libio-socket-ssl-perl to have IO::Socket::SSL +On alpine, you need perl-io-socket-ssl to have IO::Socket::SSL + ssl support is tested on folowing dynamic dns providers: - dyndns.com diff --git a/ddclient b/ddclient index 61bc0d4..cc91f7f 100755 --- a/ddclient +++ b/ddclient @@ -1784,6 +1784,7 @@ sub load_ssl_support { Error loading the Perl module IO::Socket::SSL needed for SSL connect. On Debian, the package libio-socket-ssl-perl must be installed. On Red Hat, the package perl-IO-Socket-SSL must be installed. +On Alpine, the package perl-io-socket-ssl must be installed. EOM } import IO::Socket::SSL; diff --git a/sample-etc_rc.d_init.d_ddclient.alpine b/sample-etc_rc.d_init.d_ddclient.alpine new file mode 100755 index 0000000..9160823 --- /dev/null +++ b/sample-etc_rc.d_init.d_ddclient.alpine @@ -0,0 +1,38 @@ +#!/sbin/runscript +description="ddclient Daemon for Alpine" +command="/usr/sbin/ddclient" +config_file="/etc/ddclient/ddclient.conf" +command_args="" +pidfile=$(grep -v '^\s*#' "${config_file}" | grep -i -m 1 pid= | awk -F '=' '{print $2}') +delay=$(grep -v '^\s*#' "${config_file}" | grep -i -m 1 "daemon" | awk -F '=' '{print $2}') + +if [ -z "${delay}" ] +then + command_args="-daemon 300" +else + command_args="" +fi + + +depend() { + use logger + need net + after firewall +} + +start() { + ebegin "Starting ddclient" + start-stop-daemon --start \ + --exec "${command}" \ + --pidfile "${pidfile}" \ + -- \ + ${command_args} + eend $? +} + +stop() { + ebegin "Stopping ddclient" + start-stop-daemon --stop --exec "${command}" \ + --pidfile "${pidfile}" + eend $? +} From bed1b5667155d4353afb7d10e7106739d7418f6d Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 29 Apr 2014 17:51:59 +0000 Subject: [PATCH 193/231] Removed revision information Revision information isn't very usable when switching to git. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@162 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 1 - README.ssl | 2 -- ddclient | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e734206..bfc0b4c 100644 --- a/README.md +++ b/README.md @@ -179,4 +179,3 @@ Alternatively, you may just configure ddclient to operate as a daemon and monitor your ethernet interface. ------------------------------------------------------------------------------- -$Id$ diff --git a/README.ssl b/README.ssl index 2b875f4..1d0e2f1 100644 --- a/README.ssl +++ b/README.ssl @@ -1,5 +1,3 @@ -$Id$ - 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. diff --git a/ddclient b/ddclient index cc91f7f..5ff01cf 100755 --- a/ddclient +++ b/ddclient @@ -20,9 +20,9 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -my ($VERSION) = q$Revision$ =~ /(\d+)/; +# my ($VERSION) = q$Revision$ =~ /(\d+)/; -my $version = "3.8.0-r". $VERSION; +my $version = "3.8.2"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From 0a245f8c9b773a1a78c779ddc12d787eaad68123 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 2 Jun 2014 19:51:10 +0000 Subject: [PATCH 194/231] Adding support for nsupdate. Patch provided by Daniel Roethlisberger through github. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@163 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 1 + ddclient | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/README.md b/README.md index bfc0b4c..abd5a20 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Dynamic DNS services currently supported include: Freedns - See http://freedns.afraid.org/ for details ChangeIP - See http://www.changeip.com/ for details dtdns - See http://www.dtdns.com/ for details + nsupdate - See nsupdate(1) and ddns-confgen(8) for details DDclient now supports many of cable/dsl broadband routers. diff --git a/ddclient b/ddclient index 5ff01cf..9a4a2f1 100755 --- a/ddclient +++ b/ddclient @@ -429,6 +429,10 @@ my %variables = ( 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), 'client' => setv(T_STRING, 0, 1, 1, $program, undef), }, + 'nsupdate-common-defaults' => { + 'ttl' => setv(T_NUMBER, 0, 1, 0, 600, undef), + 'zone' => setv(T_STRING, 1, 1, 1, '', undef), + }, ); my %services = ( 'dyndns1' => { @@ -573,6 +577,16 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'nsupdate' => { + 'updateable' => undef, + 'update' => \&nic_nsupdate_update, + 'examples' => \&nic_nsupdate_examples, + 'variables' => merge( + { 'login' => setv(T_LOGIN, 1, 0, 1, '/usr/bin/nsupdate', undef), }, + $variables{'nsupdate-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -3765,6 +3779,108 @@ sub nic_dtdns_update { } } +###################################################################### +## nic_nsupdate_examples +###################################################################### +sub nic_nsupdate_examples { + return < ## fully qualified hostname to update + +Example ${program}.conf file entries: + ## single host update + protocol=nsupdate \\ + server=ns1.example.com \\ + password=/etc/${program}/dyn.example.com.key \\ + zone=dyn.example.com \\ + ttl=3600 \\ + myhost.dyn.example.com + +EoEXAMPLE +} + +###################################################################### +## nic_nsupdate_update +## by Daniel Roethlisberger +###################################################################### +sub nic_nsupdate_update { + debug("\nnic_nsupdate_update -------------------"); + + ## group hosts with identical attributes together + my %groups = group_hosts_by([ @_ ], [ qw(login password server zone) ]); + + ## update each set of hosts that had similar configurations + foreach my $sig (keys %groups) { + my @hosts = @{$groups{$sig}}; + my $hosts = join(',', @hosts); + my $h = $hosts[0]; + my $binary = $config{$h}{'login'}; + my $keyfile = $config{$h}{'password'}; + my $server = $config{$h}{'server'}; + my $zone = $config{$h}{'zone'}; + my $ip = $config{$h}{'wantip'}; + delete $config{$_}{'wantip'} foreach @hosts; + + info("setting IP address to %s for %s", $ip, $hosts); + verbose("UPDATE:","updating %s", $hosts); + + ## send separate requests for each zone with all hosts in that zone + my $instructions = < Date: Mon, 30 Jun 2014 19:20:35 +0000 Subject: [PATCH 195/231] Only delete A RR, not any RR for the FQDN Make the delete command specific to A RRs. This prevents ddclient from deleting other RRs unrelated to the dynamic address, but on the same FQDN. This can be specifically a problem with KEY RRs when using SIG(0) instead of symmetric keys. Reported by: Wellie Chao Bug report: http://sourceforge.net/p/ddclient/bugs/71/ Fixes #71 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@164 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 9a4a2f1..6205618 100755 --- a/ddclient +++ b/ddclient @@ -3854,7 +3854,7 @@ zone $zone. EoINSTR1 foreach (@hosts) { $instructions .= < Date: Wed, 20 Aug 2014 06:08:41 +0000 Subject: [PATCH 196/231] Interfaces can be named almost anything on modern systems. Patch provided by Stephen Couchman through github git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@165 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 6205618..910b52b 100755 --- a/ddclient +++ b/ddclient @@ -1753,7 +1753,7 @@ sub check_value { return undef if $value eq ""; } elsif ($type eq T_IF) { - return undef if $value !~ /^[a-z0-9:._-]+$/; + return undef if $value !~ /^[a-zA-Z0-9:._-]+$/; } elsif ($type eq T_PROG) { return undef if $value eq ""; From 4721e3c5b1543cccb5be9917ff8924ef8578e249 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 20 Aug 2014 06:11:16 +0000 Subject: [PATCH 197/231] Fixing bug #72: Account info revealed during noip update git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@166 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ddclient b/ddclient index 910b52b..4842212 100755 --- a/ddclient +++ b/ddclient @@ -2603,10 +2603,6 @@ sub nic_noip_update { $url .= "&myip="; $url .= $ip if $ip; - - print "here..." . $config{$h}{'login'} . " --> " . $config{$h}{'password'} . "\n"; - - my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); if (!defined($reply) || !$reply) { failed("updating %s: Could not connect to %s.", $hosts, $config{$h}{'server'}); From a52ddf7492564586d8d8b96b5a29b807f10ea14b Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 9 Sep 2014 07:00:39 +0000 Subject: [PATCH 198/231] Bugfix: allowing long username-password combinations Patch provided by dirdi through github. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@169 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 4842212..182227e 100755 --- a/ddclient +++ b/ddclient @@ -1875,7 +1875,7 @@ sub geturl { $request .= "/$url HTTP/1.0\n"; $request .= "Host: $server\n"; - my $auth = encode_base64("${login}:${password}"); + my $auth = encode_base64("${login}:${password}", ""); $request .= "Authorization: Basic $auth\n" if $login || $password; $request .= "User-Agent: ${program}/${version}\n"; $request .= "Connection: close\n"; From e384564d126054ae27753978855332fae75c78f1 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 8 Oct 2014 13:28:29 +0000 Subject: [PATCH 199/231] Added support for Cloudflare and multi domain support for namecheap Pull request #7 from roberthawdon See https://github.com/wimpunk/ddclient/pull/7 for more info. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@170 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 6 +- ddclient | 162 ++++++++++++++++++++++++++++++++++++++- sample-etc_ddclient.conf | 10 +++ 3 files changed, 172 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index abd5a20..820222f 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Dynamic DNS services currently supported include: ChangeIP - See http://www.changeip.com/ for details dtdns - See http://www.dtdns.com/ for details nsupdate - See nsupdate(1) and ddns-confgen(8) for details + CloudFlare - See https://www.cloudflare.com/ for defails DDclient now supports many of cable/dsl broadband routers. @@ -37,8 +38,9 @@ REQUIREMENTS: - 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) +- Perl 5.014 or later + (you need the IO::Socket::SSL perl library for ssl-support + and JSON::Any perl library for JSON support) - Linux or probably any common Unix system diff --git a/ddclient b/ddclient index 182227e..83ad442 100755 --- a/ddclient +++ b/ddclient @@ -13,12 +13,19 @@ # Support for multiple IP numbers added by # Astaro AG, Ingo Schwarze September 16, 2008 # +# Support for multiple domain support for Namecheap by Robert Ian Hawdon 2010-09-03: https://robertianhawdon.me.uk/ +# +# Initial Cloudflare support by Ian Pye, updated by Robert Ian Hawdon 2012-07-16 +# Further updates by Peter Roberts to support the new API 2013-09-26, 2014-06-22: http://blog.peter-r.co.uk/ +# +# ###################################################################### -require 5.004; +require 5.014; use strict; use Getopt::Long; use Sys::Hostname; use IO::Socket; +use JSON::Any; # my ($VERSION) = q$Revision$ =~ /(\d+)/; @@ -433,6 +440,14 @@ my %variables = ( 'ttl' => setv(T_NUMBER, 0, 1, 0, 600, undef), 'zone' => setv(T_STRING, 1, 1, 1, '', undef), }, + 'cloudflare-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef), + 'zone' => setv(T_FQDN, 1, 0, 1, '', undef), + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, ); my %services = ( 'dyndns1' => { @@ -587,6 +602,17 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'cloudflare' => { + 'updateable' => undef, + 'update' => \&nic_cloudflare_update, + 'examples' => \&nic_cloudflare_examples, + 'variables' => merge( + { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef) }, + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'cloudflare-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -598,7 +624,7 @@ my @opt = ( "usage: ${program} [options]", "options are:", [ "daemon", "=s", "-daemon delay : run as a daemon, specify delay as an interval." ], -+ [ "foreground", "!", "-foreground : do not fork" ], + [ "foreground", "!", "-foreground : do not fork" ], [ "proxy", "=s", "-proxy host : use 'host' as the HTTP proxy" ], [ "server", "=s", "-server host : update DNS information on 'host'" ], [ "protocol", "=s", "-protocol type : update protocol used" ], @@ -3407,8 +3433,11 @@ sub nic_namecheap_update { my $url; $url = "http://$config{$h}{'server'}/update"; - $url .= "?host=$h"; - $url .= "&domain=$config{$h}{'login'}"; + my $domain = $config{$h}{'login'}; + my $host = $h; + $host =~ s/(.*)\.$domain(.*)/$1$2/; + $url .= "?host=$host"; + $url .= "&domain=$domain"; $url .= "&password=$config{$h}{'password'}"; $url .= "&ip="; $url .= $ip if $ip; @@ -3877,6 +3906,131 @@ EoINSTR3 } } +###################################################################### + +###################################################################### +## nic_cloudflare_examples +## +## written by Ian Pye +## +###################################################################### +sub nic_cloudflare_examples { + return <jsonToObj($reply); + if ($response->{result} eq 'error') { + failed ("%s", $response->{msg}); + next; + } + + # Pull the ID out of the json, messy + my ($id) = map { $_->{name} eq $domain ? $_->{rec_id} : () } @{ $response->{response}->{recs}->{objs} }; + unless($id) { + failed("updating %s: No domain ID found.", $domain); + next; + } + + # Set domain + $url = "https://$config{$key}{'server'}/api_json.html?a=rec_edit&type=A&ttl=1"; + $url .= "&name=$hostname"; + $url .= "&z=".$config{$key}{'zone'}; + $url .= "&id=".$id; + $url .= "&email=".$config{$key}{'login'}; + $url .= "&tkn=".$config{$key}{'password'}; + $url .= "&content="; + $url .= "$ip" if $ip; + + $reply = geturl(opt('proxy'), $url); + unless ($reply) { + failed("updating %s: Could not connect to %s.", $domain, $config{$domain}{'server'}); + last; + } + last if !header_ok($domain, $reply); + + # Strip header + $reply =~ s/^.*?\n\n//s; + $response = JSON::Any->jsonToObj($reply); + if ($response->{result} eq 'error') { + failed ("%s", $response->{msg}); + } else { + success ("%s -- Updated Successfully to %s", $domain, $ip); + + } + + # Cache + $config{$key}{'ip'} = $ip; + $config{$key}{'mtime'} = $now; + $config{$key}{'status'} = 'good'; + } + } +} + + ###################################################################### # vim: ai ts=4 sw=4 tw=78 : diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 402b25d..5eb45ca 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -196,3 +196,13 @@ ssl=yes # use ssl-support. Works with # client=ddclient, # password=my-dtdns.com-password # myhost.dtdns.net, otherhost.dtdns.net + +## +## CloudFlare (www.cloudflare.com) +## +#protocol=cloudflare, \ +#zone=domain.tld, \ +#server=www.cloudflare.com, \ +#login=your-login-email, \ +#password=APIKey \ +#domain.tld,my.domain.tld From c12ee9123c55df584eb2786308140dd66decc47f Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 20 Jan 2015 11:57:13 +0000 Subject: [PATCH 200/231] Adding support for google domain Patch gently provided through github on https://github.com/wimpunk/ddclient/pull/13 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@171 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 3 +- ddclient | 87 ++++++++++++++++++++++++++++++++++++++++ sample-etc_ddclient.conf | 8 ++++ 3 files changed, 97 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 820222f..edd0dc7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ Dynamic DNS services currently supported include: ChangeIP - See http://www.changeip.com/ for details dtdns - See http://www.dtdns.com/ for details nsupdate - See nsupdate(1) and ddns-confgen(8) for details - CloudFlare - See https://www.cloudflare.com/ for defails + CloudFlare - See https://www.cloudflare.com/ for details + Google - See http://www.google.com/domains for details DDclient now supports many of cable/dsl broadband routers. diff --git a/ddclient b/ddclient index 83ad442..57cba5c 100755 --- a/ddclient +++ b/ddclient @@ -448,6 +448,9 @@ my %variables = ( 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), }, + 'googledomains-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'domains.google.com', undef), + }, ); my %services = ( 'dyndns1' => { @@ -610,6 +613,14 @@ my %services = ( { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, $variables{'cloudflare-common-defaults'}, + }, + 'googledomains' => { + 'updateable' => undef, + 'update' => \&nic_googledomains_update, + 'examples' => \&nic_googledomains_examples, + 'variables' => merge( + { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, + $variables{'googledomains-common-defaults'}, $variables{'service-common-defaults'}, ), }, @@ -3803,6 +3814,82 @@ sub nic_dtdns_update { } } } +###################################################################### + +###################################################################### +## nic_googledomains_examples +## +## written by Nelson Araujo +## +###################################################################### +sub nic_googledomains_examples { + return < Date: Sat, 21 Mar 2015 10:34:18 +0000 Subject: [PATCH 201/231] fixed missing ) for cloudflare service hash Merge pull request #16 from adepretis/master git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@172 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 1 + 1 file changed, 1 insertion(+) diff --git a/ddclient b/ddclient index 57cba5c..738bc8b 100755 --- a/ddclient +++ b/ddclient @@ -613,6 +613,7 @@ my %services = ( { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, $variables{'cloudflare-common-defaults'}, + ), }, 'googledomains' => { 'updateable' => undef, From 8e2dc5d3b8b043224ae415373fd3b6ce61415d2e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 21 Mar 2015 10:39:35 +0000 Subject: [PATCH 202/231] Merge pull request #22 from reddyr/patch-1 loopia.se changed the "Current Address:" output string to "Current IP Address:" git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@173 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index 738bc8b..e5faa9d 100755 --- a/ddclient +++ b/ddclient @@ -72,7 +72,7 @@ my %builtinweb = ( 'dyndns' => { 'url' => 'http://checkip.dyndns.org/', 'skip' => 'Current IP Address:', }, 'dnspark' => { 'url' => 'http://ipdetect.dnspark.com/', 'skip' => 'Current Address:', }, - 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current Address:', }, + 'loopia' => { 'url' => 'http://dns.loopia.se/checkip/checkip.php', 'skip' => 'Current IP Address:', }, ); my %builtinfw = ( 'watchguard-soho' => { From 9037a9b7620619eb8d09cb7c80b4ff56426a3584 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 21 Mar 2015 10:43:29 +0000 Subject: [PATCH 203/231] Add missing config line for CloudFlare Merge pull request #19 from shikasta-net/fixes git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@174 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 1 + 1 file changed, 1 insertion(+) diff --git a/ddclient b/ddclient index e5faa9d..9ee5bd5 100755 --- a/ddclient +++ b/ddclient @@ -613,6 +613,7 @@ my %services = ( { 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef) }, { 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0),}, $variables{'cloudflare-common-defaults'}, + $variables{'service-common-defaults'}, ), }, 'googledomains' => { From 7272ed73babca62ff72a2e0ca02214c103e49fa8 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 21 Mar 2015 10:48:19 +0000 Subject: [PATCH 204/231] Renamed Changelog to Changelog.old Avoiding conflicts on case insensitive filesystems git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@175 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog => Changelog.old | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Changelog => Changelog.old (100%) diff --git a/Changelog b/Changelog.old similarity index 100% rename from Changelog rename to Changelog.old From 6dee46c0aa78b3d5e26b99046bf8aa3cbc319c4e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 21 Mar 2015 11:51:03 +0000 Subject: [PATCH 205/231] update ubuntu init.d script Merge pull request #9 from gottaloveit/master git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@176 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_rc.d_init.d_ddclient.ubuntu | 68 ++++++++++++++------------ 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/sample-etc_rc.d_init.d_ddclient.ubuntu b/sample-etc_rc.d_init.d_ddclient.ubuntu index 93b0ba4..348ffd4 100755 --- a/sample-etc_rc.d_init.d_ddclient.ubuntu +++ b/sample-etc_rc.d_init.d_ddclient.ubuntu @@ -1,8 +1,13 @@ #!/bin/sh -# -# Start ddclient that provides support for updating dynamic DNS services. -# -# Submitted by paolo martinelli +### BEGIN INIT INFO +# Provides: ddclient +# Required-Start: $remote_fs $syslog $network +# Required-Stop: $remote_fs $syslog $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start ddclient daemon at boot time +# Description: Start ddclient that provides support for updating dynamic DNS services. Originally submitted by paolo martinelli, updated by joe passavanti +### END INIT INFO DDCLIENT=/usr/sbin/ddclient CONF=/etc/ddclient/ddclient.conf @@ -14,34 +19,33 @@ test -f $CONF || exit 0 . /lib/lsb/init-functions case "$1" in -start) -log_begin_msg "Starting ddclient..." -DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` -if [ -z "$DELAY" ] ; then -DELAY="-daemon 300" -else -DELAY='' -fi -start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY -log_end_msg $? -;; -stop) -if [ -f $PIDFILE ] ; then -log_begin_msg "Stopping ddclient..." -start-stop-daemon -K -q -p $PIDFILE -log_end_msg $? -rm -f $PIDFILE -fi -;; -restart|reload|force-reload) -$0 stop -$0 start -;; -*) -log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}" -exit 1 -;; + start) + log_begin_msg "Starting ddclient..." + DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` + if [ -z "$DELAY" ] ; then + DELAY="-daemon 300" + else + DELAY='' + fi + start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY + log_end_msg $? + ;; + stop) + if [ -f $PIDFILE ] ; then + log_begin_msg "Stopping ddclient..." + start-stop-daemon -K -q -p $PIDFILE + log_end_msg $? + rm -f $PIDFILE + fi + ;; + restart|reload|force-reload) + $0 stop + $0 start + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}" + exit 1 + ;; esac exit 0 - From 3ec5dd56c6c74c979c38a38164cc4a6107d9c5cc Mon Sep 17 00:00:00 2001 From: wimpunk Date: Sat, 21 Mar 2015 11:58:29 +0000 Subject: [PATCH 206/231] Added duckDNS to the README.md git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@177 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index edd0dc7..a83a1e1 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Dynamic DNS services currently supported include: nsupdate - See nsupdate(1) and ddns-confgen(8) for details CloudFlare - See https://www.cloudflare.com/ for details Google - See http://www.google.com/domains for details + Duckdns - See https://duckdns.org/ for details DDclient now supports many of cable/dsl broadband routers. From ddf25d3ab18fd9b317c11ba13b83d6415b3891c5 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 23 Mar 2015 18:46:16 +0000 Subject: [PATCH 207/231] Added simple support for Duckdns www.duckdns.org Patch provided by gkranis on github. Merge branch 'gkranis' git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@178 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/ddclient b/ddclient index 9ee5bd5..a3d96d8 100755 --- a/ddclient +++ b/ddclient @@ -450,6 +450,9 @@ my %variables = ( }, 'googledomains-common-defaults' => { 'server' => setv(T_FQDNP, 1, 0, 1, 'domains.google.com', undef), + 'duckdns-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'www.duckdns.org', undef), + 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), }, ); my %services = ( @@ -626,6 +629,15 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'duckdns' => { + 'updateable' => undef, + 'update' => \&nic_duckdns_update, + 'examples' => \&nic_duckdns_examples, + 'variables' => merge( + $variables{'duckdns-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -4119,6 +4131,85 @@ sub nic_cloudflare_update { } } +###################################################################### +## nic_duckdns_examples +###################################################################### +sub nic_duckdns_examples { + return < Date: Mon, 23 Mar 2015 18:51:07 +0000 Subject: [PATCH 208/231] ddclient: correction after duckdns merge Correcting duckdns configuration after commit r178 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@179 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ddclient b/ddclient index a3d96d8..40bd017 100755 --- a/ddclient +++ b/ddclient @@ -450,10 +450,11 @@ my %variables = ( }, 'googledomains-common-defaults' => { 'server' => setv(T_FQDNP, 1, 0, 1, 'domains.google.com', undef), - 'duckdns-common-defaults' => { - 'server' => setv(T_FQDNP, 1, 0, 1, 'www.duckdns.org', undef), - 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), - }, + }, + 'duckdns-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'www.duckdns.org', undef), + 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), + }, ); my %services = ( 'dyndns1' => { From 79fe974a94531306b8ccbaf1ed183c53349ed786 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 23 Mar 2015 18:52:33 +0000 Subject: [PATCH 209/231] ddclient: reindenting cloudflare Indenting cloudflare according to the vim tags git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@180 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ddclient b/ddclient index 40bd017..ba45858 100755 --- a/ddclient +++ b/ddclient @@ -440,14 +440,14 @@ my %variables = ( 'ttl' => setv(T_NUMBER, 0, 1, 0, 600, undef), 'zone' => setv(T_STRING, 1, 1, 1, '', undef), }, - 'cloudflare-common-defaults' => { - 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef), - 'zone' => setv(T_FQDN, 1, 0, 1, '', undef), - 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), - 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), - 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), - 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), - }, + 'cloudflare-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'www.cloudflare.com', undef), + 'zone' => setv(T_FQDN, 1, 0, 1, '', undef), + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + }, 'googledomains-common-defaults' => { 'server' => setv(T_FQDNP, 1, 0, 1, 'domains.google.com', undef), }, From ba6ec1cb70d367d39523fc045f558a6038813cb5 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 23 Mar 2015 18:53:56 +0000 Subject: [PATCH 210/231] ddclient: made json optional As suggested in pull 7 on github by @abelbeck and @Bugsbane it is better to make the use of JSON related to the use of cloudflare. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@181 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ddclient b/ddclient index ba45858..ee21a82 100755 --- a/ddclient +++ b/ddclient @@ -25,7 +25,6 @@ use strict; use Getopt::Long; use Sys::Hostname; use IO::Socket; -use JSON::Any; # my ($VERSION) = q$Revision$ =~ /(\d+)/; @@ -1296,6 +1295,7 @@ sub init_config { $proto = opt('protocol') if !defined($proto); load_sha1_support() if ($proto eq "freedns"); + load_json_support() if ($proto eq "cloudflare"); if (!exists($services{$proto})) { warning("skipping host: %s: unrecognized protocol '%s'", $h, $proto); @@ -1875,6 +1875,18 @@ EOM } } ###################################################################### +## load_json_support +###################################################################### +sub load_json_support { + my $json_loaded = eval {require JSON::Any}; + unless ($json_loaded) { + fatal(<<"EOM"); +Error loading the Perl module JSON::Any needed for cloudflare update. +EOM + } + import JSON::Any; +} +###################################################################### ## geturl ###################################################################### sub geturl { From ee9ecc75d61dbf90a994252096bf91f3f183bc1e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 23 Mar 2015 19:03:15 +0000 Subject: [PATCH 211/231] Reverting to the old perl requirements like suggested in #75 The new requirements were added when adding support for cloudflare. By the simple fix suggested by Roy Tam we could revert the requirements which make ddclient back usable on CentOS and RHEL. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@182 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index ee21a82..5106528 100755 --- a/ddclient +++ b/ddclient @@ -20,7 +20,7 @@ # # ###################################################################### -require 5.014; +require 5.004; use strict; use Getopt::Long; use Sys::Hostname; @@ -4075,7 +4075,7 @@ sub nic_cloudflare_update { # FQDNs for my $domain (@hosts) { - my $hostname = $domain =~ s/\.$config{$key}{zone}$//r; + (my $hostname = $domain) =~ s/\.$config{$key}{zone}$//; delete $config{$domain}{'wantip'}; info("setting IP address to %s for %s", $ip, $domain); From 3b1b6fa8f852940398407bdc031ad015a2c92bc9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 28 May 2015 19:36:06 +0000 Subject: [PATCH 212/231] Removing unneeded release directory git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@183 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- release/readme.txt | 48 ---------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 release/readme.txt diff --git a/release/readme.txt b/release/readme.txt deleted file mode 100644 index e574af0..0000000 --- a/release/readme.txt +++ /dev/null @@ -1,48 +0,0 @@ -This directory will contain anything related to releasing a new version of -ddclient. It will be a replacement for -https://sourceforge.net/apps/trac/ddclient/wiki/HowtoRelease - -Releasing files - -* update RELEASENOTE -* update ChangeLog: {{{ svn2cl --group-by-day -i }}} -* update version number: replace the version number in ddclient by the correct one -* tagging current version: -{{{ -svn copy trunk \ - svn+ssh://wimpunk@svn.code.sf.net/p/ddclient/code/tags/release-3.8.2 \ - -m 'Release of version 3.8.2' -}}} -* svn update tags -* git commit ddclient ChangeLog README.md RELEASENOTE -* git tag -a v3.8.2 -m 'Release of version 3.8.2' -* git push origin v3.8.2 -* svn revert trunk -* mkdir trunk/release/ddclient-3.8.2 -* cp -R tags/release-3.8.2 trunk/release/ddclient-3.8.2 -* ChangeLog doesn't get copied because it's exlucluded from the svn repository: - {{{ cp ChangeLog trunk/release/ddclient-3.8.2 }}} -* cd trunk/release -* remove unneeded directories release, ... -* tar -cvzf ddclient-3.8.2.tar.gz ddclient-3.8.2 -* tar -cvjf ddclient-3.8.2.tar.bz2 ddclient-3.8.2 -* transfert via project page. Seems to be changed. -* news updaten -* mail to ddclient-support @ lists.sourceforge.net -* freshmeat updaten -* website bijtimmeren: versie nummer aanpassen -(niet gevonden waar dat nu staat in de wiki) -* [https://www.dyndns.com/developers/listings/3 dyndns update] -(geen mogelijkheid gevonden om die te updaten) - - -website - -* recentste routers -* postscript - - -rss feeds - -* see https://sourceforge.net/export/rss2_project.php?group_id=116817 - From 83a5f70e4caf76d971ab67b5cffac8cd7348fa82 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Thu, 28 May 2015 19:59:34 +0000 Subject: [PATCH 213/231] Preparing for v3.8.3 git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@184 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- RELEASENOTE | 17 +++++++++-------- ddclient | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/RELEASENOTE b/RELEASENOTE index 9b1edd4..7e40879 100644 --- a/RELEASENOTE +++ b/RELEASENOTE @@ -1,11 +1,12 @@ -It's been a while and has been announced a while ago but here is new release of -ddclient. There are some important changes and some documentation is modified. +Yet again it's been a while but here is new release of ddclient. As usual, +there are some important changes and some documentation is modified. A detailed overview can be found in ChangeLog but here's a quick overview: - * adding support by ChangeIP - patch send by Michele Giorato - * sha-1 patch send by pirast to allow Digest::SHA - * allow reuse of use - patch send by Rodrigo Araujo - * preventing deep sleep - see [bugs:#46] - * Fallback to iproute if ifconfig doesn't work send by Maccied Grela - + * added Alpine Linux init scritp - patch send by @Tal on github. + * adding support for nsupdate - patch send by @droe on github + * allow log username-password combinations - patch send by @dirdi on github + * adding support for cloudflare - patch send by @roberthawdon on github + * adding support for duckdns - patch send by @gkranis +A very big thank you for everyone who created a pull request on github and +for everyone who helped to fix the little issues caused by the new providers. diff --git a/ddclient b/ddclient index 5106528..5e8a4b6 100755 --- a/ddclient +++ b/ddclient @@ -28,7 +28,7 @@ use IO::Socket; # my ($VERSION) = q$Revision$ =~ /(\d+)/; -my $version = "3.8.2"; +my $version = "3.8.3"; my $programd = $0; $programd =~ s%^.*/%%; my $program = $programd; From 60fe051b7a504573386e2df2ffa8703dd47a8cb9 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Sep 2015 19:13:03 +0000 Subject: [PATCH 214/231] Cleanup: removing Id tags from the files Preparing a complete move to git. The Id tag isn't useful so removing from the files seemed to be the best solotion git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@186 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- Changelog.old | 2 -- README.cisco | 1 - ddclient | 1 - sample-etc_cron.d_ddclient | 1 - sample-etc_ddclient.conf | 2 -- sample-etc_dhclient-exit-hooks | 2 -- sample-etc_dhcpc_dhcpcd-eth0.exe | 2 -- sample-etc_ppp_ip-up.local | 2 -- sample-etc_rc.d_init.d_ddclient.lsb | 2 -- sample-etc_rc.d_init.d_ddclient.redhat | 2 +- 10 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Changelog.old b/Changelog.old index ca36ece..478d84b 100644 --- a/Changelog.old +++ b/Changelog.old @@ -299,6 +299,4 @@ Changelog This feature can be used to reissue updates that may have failed due to network connectivity problems or a DynDNS server outage -------------------------------------------------------------------------------- -$Id$ ------------------------------------------------------------------------ diff --git a/README.cisco b/README.cisco index 2d7e337..29cb13d 100644 --- a/README.cisco +++ b/README.cisco @@ -1,4 +1,3 @@ -$Id$ Method 1 ------------------------------------------------------ The following config will allow the Linux machine (10.1.1.2) to read diff --git a/ddclient b/ddclient index 5e8a4b6..9b8113b 100755 --- a/ddclient +++ b/ddclient @@ -1,7 +1,6 @@ #!/usr/bin/perl -w #!/usr/local/bin/perl -w ###################################################################### -# $Id$ # # DDCLIENT - a Perl client for updating DynDNS information # diff --git a/sample-etc_cron.d_ddclient b/sample-etc_cron.d_ddclient index 32c51a4..1cdff4f 100644 --- a/sample-etc_cron.d_ddclient +++ b/sample-etc_cron.d_ddclient @@ -1,6 +1,5 @@ ###################################################################### ## ddclient is an IP address updater for www.dyndns.org -## $Id$ ###################################################################### ## minute 0-59 ## hour 0-23 diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 3384f72..21e8957 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -1,7 +1,5 @@ ###################################################################### ## -## $Id$ -## ## Define default global variables with lines like: ## var=value [, var=value]* ## These values will be used for each following host unless overridden diff --git a/sample-etc_dhclient-exit-hooks b/sample-etc_dhclient-exit-hooks index 97102c8..a8c2b42 100644 --- a/sample-etc_dhclient-exit-hooks +++ b/sample-etc_dhclient-exit-hooks @@ -1,7 +1,5 @@ #!/bin/sh ###################################################################### -## $Id$ -###################################################################### # 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 --git a/sample-etc_dhcpc_dhcpcd-eth0.exe b/sample-etc_dhcpc_dhcpcd-eth0.exe index 437e92e..23141c7 100644 --- a/sample-etc_dhcpc_dhcpcd-eth0.exe +++ b/sample-etc_dhcpc_dhcpcd-eth0.exe @@ -1,7 +1,5 @@ #!/bin/sh ###################################################################### -## $Id$ -###################################################################### PATH=/usr/sbin:${PATH} ## update the DNS server unless the IP address is a private address diff --git a/sample-etc_ppp_ip-up.local b/sample-etc_ppp_ip-up.local index ec74f10..2d634bc 100644 --- a/sample-etc_ppp_ip-up.local +++ b/sample-etc_ppp_ip-up.local @@ -1,7 +1,5 @@ #!/bin/sh ###################################################################### -## $Id$ -###################################################################### ## ## On my host, pppd invokes this script with args: ## /etc/ppp/ip-up.local ppp0 /dev/pts/1 115200 192.168.2.1 192.168.2.3 diff --git a/sample-etc_rc.d_init.d_ddclient.lsb b/sample-etc_rc.d_init.d_ddclient.lsb index 01f06e1..7252d3f 100755 --- a/sample-etc_rc.d_init.d_ddclient.lsb +++ b/sample-etc_rc.d_init.d_ddclient.lsb @@ -21,8 +21,6 @@ # can be used on many types of firewalls ### END INIT INFO # -# $Id$ -# ### [ -f /etc/ddclient/ddclient.conf ] || exit 0 diff --git a/sample-etc_rc.d_init.d_ddclient.redhat b/sample-etc_rc.d_init.d_ddclient.redhat index a81b8cb..2e0fd32 100755 --- a/sample-etc_rc.d_init.d_ddclient.redhat +++ b/sample-etc_rc.d_init.d_ddclient.redhat @@ -1,5 +1,5 @@ #!/bin/sh -# $Id$ +# # ddclient This shell script takes care of starting and stopping # ddclient. # From 6b6042bdc3df462334b7de2d02028e563049767e Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Sep 2015 19:21:17 +0000 Subject: [PATCH 215/231] FSF address Address for FSF was wrong, corrected git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@187 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COPYING b/COPYING index 60549be..4d97367 100644 --- a/COPYING +++ b/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. From e21442184b97ea9572e969250f7162ccc611a2dc Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Sep 2015 19:32:39 +0000 Subject: [PATCH 216/231] Cleanup: removing old ignore files Switching to git so we don't need .cvsignore anymore git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@188 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- .cvsignore => .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .cvsignore => .gitignore (80%) diff --git a/.cvsignore b/.gitignore similarity index 80% rename from .cvsignore rename to .gitignore index 22bac99..e69a9a7 100644 --- a/.cvsignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.svn patches release +.svn .cvsignore -UPGRADE +*~ From db5d87ed60566756400247657bc5fb638688c2aa Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Sep 2015 19:36:18 +0000 Subject: [PATCH 217/231] Adding ChangeLog Since we are not going to fetch the changes from svn anymore, we add the old ChangeLog again. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@189 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ChangeLog | 560 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 560 insertions(+) create mode 100644 ChangeLog diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..868a8ac --- /dev/null +++ b/ChangeLog @@ -0,0 +1,560 @@ +2015-05-28 wimpunk + + * [r183] ., release: Removing unneeded release directory + +2015-03-23 wimpunk + + * [r182] ddclient: Reverting to the old perl requirements like + suggested in #75 + + The new requirements were added when adding support for cloudflare. By the + simple fix suggested by Roy Tam we could revert the requirements which make + ddclient back usable on CentOS and RHEL. + + * [r181] ddclient: ddclient: made json optional + + As suggested in pull 7 on github by @abelbeck and @Bugsbane it is + better to make the + use of JSON related to the use of cloudflare. + + * [r180] ddclient: ddclient: reindenting cloudflare + + Indenting cloudflare according to the vim tags + + * [r179] ddclient: ddclient: correction after duckdns merge + + Correcting duckdns configuration after commit r178 + + * [r178] ddclient: Added simple support for Duckdns www.duckdns.org + + Patch provided by gkranis on github. + Merge branch 'gkranis' + +2015-03-21 wimpunk + + * [r177] README.md: Added duckDNS to the README.md + * [r176] sample-etc_rc.d_init.d_ddclient.ubuntu: update ubuntu init.d script + + Merge pull request #9 from gottaloveit/master + + * [r175] Changelog, Changelog.old: Renamed Changelog to + Changelog.old + + Avoiding conflicts on case insensitive filesystems + + * [r174] ddclient: Add missing config line for CloudFlare + + Merge pull request #19 from shikasta-net/fixes + + * [r173] ddclient: Merge pull request #22 from reddyr/patch-1 + + loopia.se changed the "Current Address:" output string to "Current IP + Address:" + + * [r172] ddclient: fixed missing ) for cloudflare service hash + + Merge pull request #16 from adepretis/master + +2015-01-20 wimpunk + + * [r171] README.md, ddclient, sample-etc_ddclient.conf: Adding + support for google domain + + Patch gently provided through github on + https://github.com/wimpunk/ddclient/pull/13 + +2014-10-08 wimpunk + + * [r170] README.md, ddclient, sample-etc_ddclient.conf: Added + support for Cloudflare and multi domain support for namecheap + + Pull request #7 from @roberthawdon + See https://github.com/wimpunk/ddclient/pull/7 for more info. + +2014-09-09 wimpunk + + * [r169] ddclient: Bugfix: allowing long username-password + combinations + + Patch provided by @dirdi through github. + +2014-08-20 wimpunk + + * [r166] ddclient: Fixing bug #72: Account info revealed during + noip update + + * [r165] ddclient: Interfaces can be named almost anything on + modern systems. + + Patch provided by Stephen Couchman through github + +2014-06-30 wimpunk + + * [r164] ddclient: Only delete A RR, not any RR for the FQDN + + Make the delete command specific to A RRs. This prevents ddclient + from deleting other RRs unrelated to the dynamic address, but on the + same FQDN. This can be specifically a problem with KEY RRs when using + SIG(0) instead of symmetric keys. + + Reported by: Wellie Chao + Bug report: http://sourceforge.net/p/ddclient/bugs/71/ + + Fixes #71 + +2014-06-02 wimpunk + + * [r163] README.md, ddclient: Adding support for nsupdate. + + Patch provided by Daniel Roethlisberger through + github. + +2014-04-29 wimpunk + + * [r162] README.md, README.ssl, ddclient: Removed revision + information + + Revision information isn't very usable when switching to git. + +2014-03-20 wimpunk + + * [r161] README.md, README.ssl, ddclient, + sample-etc_rc.d_init.d_ddclient.alpine: Added Alpine Linux init + script + + Patch send by Tal on github. + + * [r160] RELEASENOTE: Corrected release note + +2013-12-26 wimpunk + + * [r159] release/readme.txt: Commiting updated release information + * [r158] README.md, RELEASENOTE: Committing release notes and + readme information to trunk + +2013-11-05 wimpunk + + * [r156] patches: Moving patching to the root of the repository. + + The patches are mostly there for historical reasons. They've been + moved away to make cleaning easier. I think the applied patches should + even be removed. + +2013-10-28 wimpunk + + * [r155] ddclient: Fallback to iproute if ifconfig doesn't work. + + This fix applies the patch provided by Maccied Grela in [bugs:#26] + + * [r154] ddclient: preventing deep sleep - see [bugs:#46] + + Fixing [bugs:#46] by applying the provided patch. + +2013-07-08 wimpunk + + * [r153] ddclient: Applying patch from [fb1ad014] fixing bug [#14] + + More info can be found on [fb1ad014] and has been discussed in + the mailinglist: + http://article.gmane.org/gmane.network.dns.ddclient.user/71. The + patch was send by Rodrigo Araujo. + +2013-05-14 wimpunk + + * [r152] ddclient: Adding sha1-patch provided by pirast in + [9742ac09] + +2013-04-28 wimpunk + + * [r150] README.md, ddclient, sample-etc_ddclient.conf: Adding + support for ChangeIP based on the patch from Michele Giorato + http://sourceforge.net/p/ddclient/discussion/399428/thread/e85661ad/ + * [r148] README.md: Updated README file + * [r147] ., README, README.md: Applying markdown syntax to README + +2011-07-11 wimpunk + + * [r131] release/readme.txt: Updates after releasing 3.8.1 + * [r129] release/readme.txt: Corrected release/readme.txt + * [r128] sample-etc_ppp_ip-up.local: Applied ip-up_run-parts.diff + from ubuntu + * [r127] ddclient: Applied smc-barricade-fw-alt.diff from ubuntu + +2011-07-03 wimpunk + + * [r126] ddclient: Fixing #28: FreeDNS.afraid.org changed api + slightly + +2011-05-19 wimpunk + + * [r125] ddclient, sample-etc_ddclient.conf: Added patch for + dtdns-support (#39) + +2011-03-09 wimpunk + + * [r124] ddclient: Patching with nic_updateable-warning patch + provided by antespi in ticket #2 + +2011-03-08 wimpunk + + * [r123] ddclient: Patching with zoneedit patch provided by + killer-jk in ticket #15 + +2010-12-07 wimpunk + + * [r122] ddclient: Added longer password support, sended by Ingo + Schwarze (#3130634) + +2010-10-13 wimpunk + + * [r121] ddclient: Fixing bug #13: multiple fetch-ip but + introducing a multiple ip bug + +2010-09-14 wimpunk + + * [r120] ddclient: patch for #10: invalid value for keyword ip + +2010-09-13 wimpunk + + * [r119] ddclient: Applied patch from ticket #8, patch for cache + content leaks to global + * [r118] ddclient: Applied patch from ticket #7, provided by Chris + Carr + +2010-07-01 wimpunk + + * [r117] ddclient: Fixed #6: Add Red Hat package name to Perl + module IO::Socket::SSL error message + +2010-02-24 wimpunk + + * [r116] ddclient: Subversion revision added + +2009-11-09 wimpunk + + * [r115] ddclient, patches/cisco-asa.patch: Added cisco-asa patch + (2891001) submitted by Philip Gladstone + * [r114] ddclient, patches/prevent-hang.patch: Added prevent-hang + patch (2880462) submitted by Panos + +2009-10-19 wimpunk + + * [r113] ddclient, patches/foreground.patch: Added foreground patch + (1893144) submitted by John Palkovic + +2009-09-10 wimpunk + + * [r112] README, ddclient, patches/loopia.patch, + sample-etc_ddclient.conf: #1609799 Support for LoopiaDNS + (submitted by scilence) + +2009-08-05 wimpunk + + * [r111] ddclient, patches/freedns-patch: applied freedns patch + (patch 2832129) + +2009-05-16 wimpunk + + * [r110] ddclient: Bug 2792436: fixed abuse message of dyndns + +2009-02-27 wimpunk + + * [r109] sample-etc_ddclient.conf: Added warning about the update + interval (#2619505) + +2009-01-27 wimpunk + + * [r108] .cvsignore, RELEASENOTE, ddclient, release, + release/readme.txt: Modified during the release of ddclient-3.8.0 + +2008-12-04 wimpunk + + * [r106] ddclient: help about postscript added + +2008-11-19 wimpunk + + * [r105] ddclient, patches/password.patch: Added better password + handling sended by Ingo Schwarze + * [r104] TODO, sample-ddclient-wrapper.sh: Added ddclient wrapper + script + * [r103] ddclient: Extra fix for multiple IP's + +2008-11-01 wimpunk + + * [r102] sample-etc_ddclient.conf: Added some remarks concerning + the postscript. See + https://sourceforge.net/forum/message.php?msg_id=5550545 + +2008-09-30 wimpunk + + * [r101] ddclient, patches/multiple-ip.patch: Added support for + multiple IP adresses. See + http://permalink.gmane.org/gmane.network.dns.ddclient.user/17 + * [r100] patches/namecheap.patch: extra comments added to namecheap + patch + +2008-07-04 wimpunk + + * [r99] patches/namecheap.patch: namecheap patch added to patches + section + +2008-06-13 wimpunk + + * [r98] .: New trunk created based on the old trunk/svn + * [r96] svn: Moved old trunk/svn to ddclient and it will be the new + trunk + * [r95] svn: Ignoring test configuration + * [r94] svn/.cvsignore, svn/RELEASENOTE, svn/UPGRADE: Added some + release related files + * [r93] svn/patches/no-host.patch: Added not used no-host patch to + patches section + +2008-06-05 wimpunk + + * [r90] svn/ddclient: Added more info about the daemon interval + * [r89] svn/ddclient: Preventing error while reading cache when ip + wasn't set correctly before + * [r88] svn/ddclient: Preventing an error when trying to send a + message on mail-failure + +2008-06-02 wimpunk + + * [r87] svn/ddclient, svn/sample-etc_ddclient.conf: Modified + documentation about zoneedit based on the comments from Oren Held + +2008-03-04 wimpunk + + * [r86] svn/patches/ddclient.daemon-timeout.patch: Added patch + which was applied to rev 27 (posted by James deBoer) + +2008-02-19 wimpunk + + * [r85] svn/patches/eurodns.patch: Patch modified to apply on + ddclient 3.7.3 + +2008-02-08 wimpunk + + * [r84] svn/patches/mail-on-kill.patch: Added mail-on-kill patch to + patches section + +2008-02-05 wimpunk + + * [r83] svn/ddclient: Sending mail when killed, not after + TERM-signal + * [r82] svn/README: Added creation of cache dir + +2007-10-29 wimpunk + + * [r81] svn/ddclient, svn/patches/ubuntu/default-timeout.patch: + Added and applied default timeout patch from + https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/116066 + +2007-08-29 wimpunk + + * [r80] svn/ddclient, svn/patches/ddclient-noip.patch: Added + ddclient-noip.patch send by Kurt Bussche. + +2007-08-07 wimpunk + + * [r78] svn/ddclient: Updated version number to 3.7.3 + +2007-08-01 wimpunk + + * [r77] svn/ddclient, svn/patches/typo_dnspark.patch: Applied + typo_dnspark.patch send by Marco + +2007-07-31 wimpunk + + * [r76] svn/README.ssl: Renamed dyndns.org to dyndns.com + * [r75] svn/README: Removed ^M at line 37 + * [r74] svn/ddclient: Removed line 183, comments on Vigor 2200 USB + +2007-07-30 wimpunk + + * [r73] svn: Ignoring ChangeLog since autogenerated + * [r72] svn/Changelog: Notification about changed ChangeLog + configuration + * [r71] svn/patches/ubuntu/dyndns_com.diff: Removed patch since + it's invalid + * [r70] svn/patches/opendns.patch: Added not applied opendns.patch, + see tracker #1758564 + * [r69] svn/patches/debianpatches, + svn/patches/debianpatches/abuse_msg.diff, + svn/patches/debianpatches/cachedir.diff, + svn/patches/debianpatches/cisco_fw.diff, + svn/patches/debianpatches/config_path.diff, + svn/patches/debianpatches/daemon_check.diff, + svn/patches/debianpatches/daemon_interval.diff, + svn/patches/debianpatches/help_nonroot(2).diff, + svn/patches/debianpatches/help_nonroot.diff, + svn/patches/debianpatches/ip-up_run-parts.diff, + svn/patches/debianpatches/maxinterval.diff, + svn/patches/debianpatches/readme.txt, + svn/patches/debianpatches/sample_path.diff, + svn/patches/debianpatches/smc-barricade-7401bra.patch, + svn/patches/debianpatches/smc-barricade-fw-alt.diff, + svn/patches/debianpatches/update-new-config.patch, + svn/patches/ubuntu, svn/patches/ubuntu/checked_ssl_load.diff, + svn/patches/ubuntu/config_path.diff, + svn/patches/ubuntu/daemon_interval.diff, + svn/patches/ubuntu/dyndns_com.diff, + svn/patches/ubuntu/sample_ubuntu.diff, svn/patches/ubuntu/series, + svn/patches/ubuntu/smc-barricade-fw-alt.diff: Added debian and + ubuntu patches + +2007-07-29 wimpunk + + * [r68] svn/TODO: Added url to feature request dyndns + +2007-07-12 wimpunk + + * [r67] svn/README, svn/patches/readme.patch: Run dos2unix on + readme and it's patch which Marco Rodrigues submitted. + * [r66] svn/README, svn/patches/readme.patch: Partial applied + readme.patch. See tracker #1752931 + +2007-07-10 wimpunk + + * [r65] svn/ddclient: signature modified + * [r64] svn/ddclient: Added website to ddclient comments + * [r63] svn/patches/regex_vlan.patch: Added extra comments to the + patch. + * [r62] svn/ddclient, svn/patches/create_patch.sh, + svn/patches/regex_vlan.patch, + svn/patches/typo_namecheap_patch.diff.new: Added patches and + applied regex_vlan.patch. See bug #1747337 + * [r61] svn/ddclient: Applied typo_namecheap_patch.diff send by + Marco Rodrigues + +2007-07-07 wimpunk + + * [r60] svn/sample-etc_ppp_ip-up.local: Reverted the patch from + torsten. See [ 1749470 ] Bug in Script sample-etc_ppp_ip-up.local + +2007-07-04 wimpunk + + * [r59] svn/release, svn/release/readme.txt: Adding some release + documentation + +2007-06-14 wimpunk + + * [r57] svn/Changelog, svn/ddclient: Changed version number + * [r55] svn/patches, svn/patches/3com-oc-remote812.patch, + svn/patches/easydns.patch, svn/patches/eurodns.patch: Patches + directory added + +2007-06-12 wimpunk + + * [r54] svn/ddclient: 3com-oc-remote812 patch by The_Beast via IRC: + see patches/3com-oc-remote812.patch + +2007-06-05 wimpunk + + * [r53] svn/ddclient: Applied easydns.patch, patch 117054 + +2007-05-28 wimpunk + + * [r52] svn/ddclient: Changed nic_namecheap_update following the + suggestion of edmdude on the forum + (https://sourceforge.net/forum/message.php?msg_id=4316938) + +2007-05-19 wimpunk + + * [r48] svn/ddclient: Cosmetic change about checkip + * [r47] svn/ddclient: Applied checked_ssl_load.diff from ubuntu + * [r46] svn/ddclient: Removed the two empty lines at the end of + ddclient + +2007-02-26 wimpunk + + * [r44] svn/TODO: added a TODO list + +2007-02-21 wimpunk + + * [r43] svn/Changelog, svn/ddclient: Preventing unitialized values, + check https://sourceforge.net/forum/message.php?msg_id=4167772 + +2007-01-24 wimpunk + + * [r40] svn/Changelog, svn/ddclient: Changed max-interval to + 25days. See https://www.dyndns.com/services/dns/dyndns/faq.html + +2006-12-03 wimpunk + + * [r39] svn/Changelog, svn/ddclient: Applied maxinterval.diff: + Increase max interval for updates. + See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129370 + http://www.dyndns.com/support/services/dyndns/faq.html#q15 + * [r38] svn/ddclient: Applied cisco_fw.diff: Use configured + hostname for firewall access with + -use=cisco (closes: #345712). Thanks to Per Carlson for the + patch! + See http://bugs.debian.org/345712. + +2006-12-02 wimpunk + + * [r37] svn/Changelog, svn/ddclient: Applied + smc-barricade-7401bra.patch: Support for SMC Barricade 7401BRA FW + firewall (submitted by Torsten) + Changelog modified for all previous patches from Torsten + * [r36] svn/ddclient: Applied update-new-config.patch: Force update + if config has changed + (submitted by Torsten) + * [r35] svn/sample-etc_ppp_ip-up.local: Applied + ip-up_run-parts.diff: Fix parameter in ip-up script. + (submitted by Torsten) + * [r34] svn/ddclient: Applied help_nonroot.diff: Allow calling the + help function as non-root. + (submitted by Torsten) + * [r33] svn/ddclient: Applied cachedir.diff: Original ddclient + stores a cache file in /etc which + would belong in /var/cache in my opinion and according to the + FHS. Patch + changes that. (submitted by Torsten) + * [r32] svn/ddclient: Applied abuse_msg.diff: ddclient still + reports the email to contact dyndns.org + but they prefer a web form today (IIRC). This patch adjusts the + abuse warning + printed by ddclient. (submitted by Torsten) + * [r31] svn/Changelog: Changed Changelog syntax + +2006-11-27 wimpunk + + * [r30] svn/Changelog, svn/ddclient: Don't send any mail when in + not running daemon mode (patch submitted by Daniel Thaler) + +2006-11-03 wimpunk + + * [r28] svn/Changelog, svn/ddclient: Added patch "Patch: Treat + --daemon values as intervals" + (submitted by James deBoer) + +2006-09-30 wimpunk + + * [r22] svn/Changelog, svn/sample-etc_rc.d_init.d_ddclient.ubuntu: + Added initscript for Ubuntu (posted by Paolo Martinelli) + +2006-09-14 wimpunk + + * [r21] svn/Changelog, svn/ddclient: URL of zoneedit has changed + (see bug #1558483) + +2006-06-14 wimpunk + + * [r11] svn/Changelog, svn/ddclient: Changed version number + * [r8] ., html, svn, xml: Created trunk and tags, moved directories + to it + * [r6] Changed the order of perl and update of README.ssl + +2006-06-11 ddfisher + + * [r5] see Changelog + +2006-06-10 ddfisher + + * [r4] updated changelog + * [r3] See Changelog + +2006-05-22 wimpunk + + * [r2] Reorganise From 6b6b837b9a2e80fa92a4eff0dcf877973cf8faf2 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Mon, 28 Sep 2015 19:41:09 +0000 Subject: [PATCH 218/231] Cleanup: removing revision info. Removing revision info even when it's just in the comments. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@190 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 2 -- 1 file changed, 2 deletions(-) diff --git a/ddclient b/ddclient index 9b8113b..f0a11fa 100755 --- a/ddclient +++ b/ddclient @@ -25,8 +25,6 @@ use Getopt::Long; use Sys::Hostname; use IO::Socket; -# my ($VERSION) = q$Revision$ =~ /(\d+)/; - my $version = "3.8.3"; my $programd = $0; $programd =~ s%^.*/%%; From 19d517284c8daff731ca5b923c4318f93ddfe12b Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 13 Oct 2015 20:10:15 +0000 Subject: [PATCH 219/231] Added support for woima.fi dyndns service git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@191 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 1 + ddclient | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+) diff --git a/README.md b/README.md index a83a1e1..8ef25a7 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Dynamic DNS services currently supported include: CloudFlare - See https://www.cloudflare.com/ for details Google - See http://www.google.com/domains for details Duckdns - See https://duckdns.org/ for details + woima.fi - See https://woima.fi/ for details DDclient now supports many of cable/dsl broadband routers. diff --git a/ddclient b/ddclient index f0a11fa..a39fcf0 100755 --- a/ddclient +++ b/ddclient @@ -451,6 +451,29 @@ my %variables = ( 'server' => setv(T_FQDNP, 1, 0, 1, 'www.duckdns.org', undef), 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), }, + 'woima-common-defaults' => { + 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), + 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'custom' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'script' => setv(T_STRING, 1, 1, 1, '/nic/update', undef), + }, + 'woima-service-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'dyn.woima.fi', undef), + 'login' => setv(T_LOGIN, 1, 0, 1, '', undef), + 'password' => setv(T_PASSWD, 1, 0, 1, '', undef), + 'ip' => setv(T_IP, 0, 1, 0, undef, undef), + 'wtime' => setv(T_DELAY, 0, 1, 1, 0, interval('30s')), + 'mtime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'atime' => setv(T_NUMBER, 0, 1, 0, 0, undef), + 'status' => setv(T_ANY, 0, 1, 0, '', undef), + 'min-interval' => setv(T_DELAY, 0, 0, 1, interval('30s'), 0), + 'max-interval' => setv(T_DELAY, 0, 0, 1, interval('25d'), 0), + 'min-error-interval' => setv(T_DELAY, 0, 0, 1, interval('5m'), 0), + 'warned-min-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + 'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, 0, undef), + }, ); my %services = ( 'dyndns1' => { @@ -635,6 +658,15 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'woima' => { + 'updateable' => undef, + 'update' => \&nic_woima_update, + 'examples' => \&nic_woima_examples, + 'variables' => merge( + $variables{'woima-common-defaults'}, + $variables{'woima-service-common-defaults'}, + ), + }, ); $variables{'merged'} = merge($variables{'global-defaults'}, $variables{'service-common-defaults'}, @@ -4221,6 +4253,182 @@ sub nic_duckdns_update { } } +###################################################################### +## nic_woima_examples +###################################################################### +sub nic_woima_examples { + return < 'Bad authorization (username or password)', + 'badsys' => 'The system parameter given was not valid', + + 'notfqdn' => 'A Fully-Qualified Domain Name was not provided', + 'nohost' => 'The hostname specified does not exist in the database', + '!yours' => 'The hostname specified exists, but not under the username currently being used', + '!donator' => 'The offline setting was set, when the user is not a donator', + '!active' => 'The hostname specified is in a Custom DNS domain which has not yet been activated.', + 'abuse', => 'The hostname specified is blocked for abuse; you should receive an email notification ' . + 'which provides an unblock request link. More info can be found on ' . + 'https://www.dyndns.com/support/abuse.html', + + 'numhost' => 'System error: Too many or too few hosts found. Contact support@dyndns.org', + 'dnserr' => 'System error: DNS error encountered. Contact support@dyndns.org', + + 'nochg' => 'No update required; unnecessary attempts to change to the current address are considered abusive', + ); + + my @hosts = @_; + foreach my $key (keys @hosts) { + my $h = $hosts[$key]; + my $ip = $config{$h}{'wantip'}; + delete $config{$h}{'wantip'}; + + info("setting IP address to %s for %s", $ip, $h); + verbose("UPDATE:","updating %s", $h); + + ## Select the DynDNS system to update + my $url = "http://$config{$h}{'server'}$config{$h}{'script'}?system="; + if ($config{$h}{'custom'}) { + warning("updating %s: 'custom' and 'static' may not be used together. ('static' ignored)", $h) + if $config{$h}{'static'}; + # warning("updating %s: 'custom' and 'offline' may not be used together. ('offline' ignored)", $h) + # if $config{$h}{'offline'}; + $url .= 'custom'; + + } elsif ($config{$h}{'static'}) { + # warning("updating %s: 'static' and 'offline' may not be used together. ('offline' ignored)", $h) + # if $config{$h}{'offline'}; + $url .= 'statdns'; + + } else { + $url .= 'dyndns'; + } + + $url .= "&hostname=$h"; + $url .= "&myip="; + $url .= $ip if $ip; + + ## some args are not valid for a custom domain. + $url .= "&wildcard=ON" if ynu($config{$h}{'wildcard'}, 1, 0, 0); + if ($config{$h}{'mx'}) { + $url .= "&mx=$config{$h}{'mx'}"; + $url .= "&backmx=" . ynu($config{$h}{'backupmx'}, 'YES', 'NO'); + } + + my $reply = geturl(opt('proxy'), $url, $config{$h}{'login'}, $config{$h}{'password'}); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'}); + last; + } + last if !header_ok($h, $reply); + + my @reply = split /\n/, $reply; + my $state = 'header'; + my $returnedip = $ip; + + foreach my $line (@reply) { + if ($state eq 'header') { + $state = 'body'; + + } elsif ($state eq 'body') { + $state = 'results' if $line eq ''; + + } elsif ($state =~ /^results/) { + $state = 'results2'; + + # bug #10: some dyndns providers does not return the IP so + # we can't use the returned IP + my ($status, $returnedip) = split / /, lc $line; + $ip = $returnedip if (not $ip); + #my $h = shift @hosts; + + $config{$h}{'status'} = $status; + if ($status eq 'good') { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + success("updating %s: %s: IP address set to %s", $h, $status, $ip); + + } elsif (exists $errors{$status}) { + if ($status eq 'nochg') { + warning("updating %s: %s: %s", $h, $status, $errors{$status}); + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + + } else { + failed("updating %s: %s: %s", $h, $status, $errors{$status}); + } + + } elsif ($status =~ /w(\d+)(.)/) { + my ($wait, $units) = ($1, lc $2); + my ($sec, $scale) = ($wait, 1); + + ($scale, $units) = (1, 'seconds') if $units eq 's'; + ($scale, $units) = (60, 'minutes') if $units eq 'm'; + ($scale, $units) = (60*60, 'hours') if $units eq 'h'; + + $sec = $wait * $scale; + $config{$h}{'wtime'} = $now + $sec; + warning("updating %s: %s: wait $wait $units before further updates", $h, $status, $ip); + + } else { + failed("updating %s: %s: unexpected status (%s)", $h, $line); + } + } + } + failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'}) + if $state ne 'results2'; + } +} + + ###################################################################### # vim: ai ts=4 sw=4 tw=78 : From 3d996f08788b2bfb926662be5995de3b6184e16a Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 13 Oct 2015 20:12:21 +0000 Subject: [PATCH 220/231] odd-fw-patch-squashed git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@192 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/ddclient b/ddclient index a39fcf0..1d5e29f 100755 --- a/ddclient +++ b/ddclient @@ -335,6 +335,7 @@ my %variables = ( 'web-skip' => setv(T_STRING,1, 0, 1, '', undef), 'fw' => setv(T_ANY, 0, 0, 1, '', undef), 'fw-skip' => setv(T_STRING,1, 0, 1, '', undef), + 'fw-banlocal' => setv(T_BOOL, 0, 0, 1, 0, undef), 'fw-login' => setv(T_LOGIN, 1, 0, 1, '', undef), 'fw-password' => setv(T_PASSWD,1, 0, 1, '', undef), 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), @@ -374,6 +375,7 @@ my %variables = ( 'web-skip' => setv(T_STRING,0, 0, 1, '', undef), 'fw' => setv(T_ANY, 0, 0, 1, '', undef), 'fw-skip' => setv(T_STRING,0, 0, 1, '', undef), + 'fw-banlocal' => setv(T_BOOL, 0, 0, 1, 0, undef), 'fw-login' => setv(T_LOGIN, 0, 0, 1, '', undef), 'fw-password' => setv(T_PASSWD,0, 0, 1, '', undef), 'cmd' => setv(T_PROG, 0, 0, 1, '', undef), @@ -699,6 +701,7 @@ my @opt = ( "", [ "fw", "=s", "-fw address|url : obtain IP address from firewall at 'address'" ], [ "fw-skip", "=s", "-fw-skip pattern : skip any IP addresses before 'pattern' on the firewall address|url" ], + [ "fw-banlocal", "!", "-fw-banlocal : ignore local IP addresses on the firewall address|url" ], [ "fw-login", "=s", "-fw-login login : use 'login' when getting IP from fw" ], [ "fw-password", "=s", "-fw-password secret : use password 'secret' when getting IP from fw" ], "", @@ -2051,6 +2054,48 @@ sub geturl { return $reply; } ###################################################################### +## un_zero_pad +###################################################################### +sub un_zero_pad { + my $in_str = shift(@_); + my @out_str = (); + + if ($in_str eq '0.0.0.0') { + return $in_str; + } + + foreach my $block (split /\./, $in_str) { + $block =~ s/^0+//; + if ($block eq '') { + $block = '0'; + } + push @out_str, $block; + } + return join('.', @out_str); +} +###################################################################### +## filter_local +###################################################################### +sub filter_local { + my $in_ip = shift(@_); + + if ($in_ip eq '0.0.0.0') { + return $in_ip; + } + + my @guess_local = ( + '^10\.', + '^172\.(?:1[6-9]|2[0-9]|3[01])\.', + '^192\.168' + ); + foreach my $block (@guess_local) { + if ($in_ip =~ /$block/) { + return '0.0.0.0'; + } + } + return $in_ip; +} +###################################################################### ## get_ip ###################################################################### sub get_ip { @@ -2147,6 +2192,8 @@ sub get_ip { } if ($reply =~ /^.*?\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\b.*/is) { $ip = $1; + $ip = un_zero_pad($ip); + $ip = filter_local($ip) if opt('fw-banlocal', $h); } if (($use ne 'ip') && (define($ip,'') eq '0.0.0.0')) { $ip = undef; From 80046c5a23dd6351ab8eac80104b820bdde05c58 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 13 Oct 2015 20:25:45 +0000 Subject: [PATCH 221/231] Prevent service to start multiple times. Added messages if trying to start/stop already started/stopped service. Added daemon install instructions for ubuntu. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@193 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- README.md | 9 +++++++++ sample-etc_rc.d_init.d_ddclient.ubuntu | 20 +++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8ef25a7..241b1a7 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,15 @@ INSTALLATION: apk add perl ## start the first time by hand rc-service ddclient start + + ## For those using Ubuntu style rc files and using daemon-mode: + cp sample-etc_rc.d_init.d_ddclient.ubuntu /etc/init.d/ddclient + ## enable automatic startup when booting + update-rc.d ddclient defaults + ## make sure you have perl installed + apt-get install perl + ## start the first time by hand + service ddclient start ## If you are not using daemon-mode, configure cron and dhcp or ppp ## as described below. diff --git a/sample-etc_rc.d_init.d_ddclient.ubuntu b/sample-etc_rc.d_init.d_ddclient.ubuntu index 348ffd4..b2d6878 100755 --- a/sample-etc_rc.d_init.d_ddclient.ubuntu +++ b/sample-etc_rc.d_init.d_ddclient.ubuntu @@ -20,15 +20,19 @@ test -f $CONF || exit 0 case "$1" in start) - log_begin_msg "Starting ddclient..." - DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` - if [ -z "$DELAY" ] ; then - DELAY="-daemon 300" + if [ ! -f $PIDFILE ]; then + log_begin_msg "Starting ddclient..." + DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'` + if [ -z "$DELAY" ] ; then + DELAY="-daemon 300" + else + DELAY='' + fi + start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY + log_end_msg $? else - DELAY='' + log_warning_msg "Service ddclient already running..." fi - start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY - log_end_msg $? ;; stop) if [ -f $PIDFILE ] ; then @@ -36,6 +40,8 @@ case "$1" in start-stop-daemon -K -q -p $PIDFILE log_end_msg $? rm -f $PIDFILE + else + log_warning_msg "No ddclient running..." fi ;; restart|reload|force-reload) From 017f04b5009fc1bc51989e3db6786eea4dce9335 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 13 Oct 2015 20:25:53 +0000 Subject: [PATCH 222/231] Merge pull request #24 from gkranis/master Adding duckdns example Duckdns example added to sample-etc_ddclient.conf git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@194 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- sample-etc_ddclient.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 21e8957..30da98d 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -212,3 +212,11 @@ ssl=yes # use ssl-support. Works with # login=my-auto-generated-username, # password=my-auto-generated-password # my.domain.tld, otherhost.domain.tld + +## +## Duckdns (http://www.duckdns.org/) +## +# +# password=my-auto-generated-password +# protocol=duckdns hostwithoutduckdnsorg + From 5bea1a58f75ab862bd7172179ea7ccf79cf17782 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Tue, 13 Oct 2015 20:26:00 +0000 Subject: [PATCH 223/231] Merge pull request #25 from dancapper/master Adding configurable TTL to Cloudflare This change adds configurable TTL to cloudflare instead of just using hardcoded value of 1 which sets "automatic" TTL any time ddclient updates the IP address. git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@195 3873ddee-7413-0410-b6c4-c2c57c1ab35a --- ddclient | 4 +++- sample-etc_ddclient.conf | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ddclient b/ddclient index 1d5e29f..7abb5dd 100755 --- a/ddclient +++ b/ddclient @@ -445,6 +445,7 @@ my %variables = ( 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), 'mx' => setv(T_OFQDN, 0, 1, 1, '', undef), 'backupmx' => setv(T_BOOL, 0, 1, 1, 0, undef), + 'ttl' => setv(T_NUMBER, 1, 0, 1, 1, undef), }, 'googledomains-common-defaults' => { 'server' => setv(T_FQDNP, 1, 0, 1, 'domains.google.com', undef), @@ -4186,7 +4187,8 @@ sub nic_cloudflare_update { } # Set domain - $url = "https://$config{$key}{'server'}/api_json.html?a=rec_edit&type=A&ttl=1"; + $url = "https://$config{$key}{'server'}/api_json.html?a=rec_edit&type=A"; + $url .= "&ttl=".$config{$key}{'ttl'}; $url .= "&name=$hostname"; $url .= "&z=".$config{$key}{'zone'}; $url .= "&id=".$id; diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 30da98d..79a7130 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -202,7 +202,8 @@ ssl=yes # use ssl-support. Works with #zone=domain.tld, \ #server=www.cloudflare.com, \ #login=your-login-email, \ -#password=APIKey \ +#password=APIKey, \ +#ttl=1 \ #domain.tld,my.domain.tld ## From eafb7074375ce1ff7fe248251f68cfe9559ea9e5 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Fri, 4 Dec 2015 11:54:18 +0100 Subject: [PATCH 224/231] Revert "Merge branch 'github'" This reverts commit 38f9762e2cf0e58018af54f1f497cb4720d62d60, reversing changes made to 5bea1a58f75ab862bd7172179ea7ccf79cf17782. --- README.md | 2 +- ddclient | 63 ++++++++++++++++++++++++++----------------------------- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 4560eeb..241b1a7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ =============================================================================== -# DDCLIENT v3.8.3 +# DDCLIENT v3.8.2 ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. diff --git a/ddclient b/ddclient index a2805e8..7abb5dd 100755 --- a/ddclient +++ b/ddclient @@ -3704,7 +3704,10 @@ EoEXAMPLE ## ###################################################################### sub nic_freedns_update { + + debug("\nnic_freedns_update -------------------"); + ## First get the list of updatable hosts my $url; $url = "http://$config{$_[0]}{'server'}/api/?action=getdyndns&sha=".&sha1_hex("$config{$_[0]}{'login'}|$config{$_[0]}{'password'}"); @@ -3730,40 +3733,34 @@ sub nic_freedns_update { info("setting IP address to %s for %s", $ip, $h); verbose("UPDATE:","updating %s", $h); - if($ip eq $freedns_hosts{$h}->[1]) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("update not necessary %s: good: IP address already set to %s", $h, $ip); - } else { - my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); - if (!defined($reply) || !$reply) { - failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); - last; - } - if(!header_ok($h, $reply)) { - $config{$h}{'status'} = 'failed'; - last; - } + if($ip eq $freedns_hosts{$h}->[1]) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("update not necessary %s: good: IP address already set to %s", $h, $ip); + } else { + my $reply = geturl(opt('proxy'), $freedns_hosts{$h}->[2]); + if (!defined($reply) || !$reply) { + failed("updating %s: Could not connect to %s.", $h, $freedns_hosts{$h}->[2]); + last; + } + if(!header_ok($h, $reply)) { + $config{$h}{'status'} = 'failed'; + last; + } - if ($reply =~ /Updated.*$h.*to.*$ip/) { - $config{$h}{'ip'} = $ip; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - success("updating %s: good: IP address set to %s", $h, $ip); - } elsif ($reply =~ /Address (\d+\.\d+\.\d+\.\d+) has not changed/) { - $ip = $1; - $config{$h}{'mtime'} = $now; - $config{$h}{'status'} = 'good'; - $config{$h}{'ip'} = $ip; - success("updating %s: good: IP address %s has not changed", $h, $ip); - } else { - $config{$h}{'status'} = 'failed'; - warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); - warning("REPLIED: %s", $reply); - failed("updating %s: Invalid reply.", $h); - } - } + if($reply =~ /Updated.*$h.*to.*$ip/) { + $config{$h}{'ip'} = $ip; + $config{$h}{'mtime'} = $now; + $config{$h}{'status'} = 'good'; + success("updating %s: good: IP address set to %s", $h, $ip); + } else { + $config{$h}{'status'} = 'failed'; + warning("SENT: %s", $freedns_hosts{$h}->[2]) unless opt('verbose'); + warning("REPLIED: %s", $reply); + failed("updating %s: Invalid reply.", $h); + } + } } } From b3a234a70f4a4f23c9025c081ba4102fcb4c0d64 Mon Sep 17 00:00:00 2001 From: Tomasz Grabowski Date: Mon, 16 Jan 2017 18:03:26 -0500 Subject: [PATCH 225/231] Adding support for free dns service at freemyip.com --- ddclient | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/ddclient b/ddclient index 46b6eab..d5a66c5 100755 --- a/ddclient +++ b/ddclient @@ -456,6 +456,10 @@ my %variables = ( 'server' => setv(T_FQDNP, 1, 0, 1, 'www.duckdns.org', undef), 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), }, + 'freemyip-common-defaults' => { + 'server' => setv(T_FQDNP, 1, 0, 1, 'freemyip.com', undef), + 'login' => setv(T_LOGIN, 0, 0, 0, 'unused', undef), + }, 'woima-common-defaults' => { 'static' => setv(T_BOOL, 0, 1, 1, 0, undef), 'wildcard' => setv(T_BOOL, 0, 1, 1, 0, undef), @@ -663,6 +667,15 @@ my %services = ( $variables{'service-common-defaults'}, ), }, + 'freemyip' => { + 'updateable' => undef, + 'update' => \&nic_freemyip_update, + 'examples' => \&nic_freemyip_examples, + 'variables' => merge( + $variables{'freemyip-common-defaults'}, + $variables{'service-common-defaults'}, + ), + }, 'woima' => { 'updateable' => undef, 'update' => \&nic_woima_update, @@ -4412,6 +4425,80 @@ sub nic_duckdns_update { } } +###################################################################### +## nic_freemyip_examples +###################################################################### +sub nic_freemyip_examples { + return < Date: Mon, 16 Jan 2017 18:12:29 -0500 Subject: [PATCH 226/231] Adding required documentation and examples --- README.md | 1 + README.ssl | 1 + sample-etc_ddclient.conf | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 8fa84d5..477793a 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Dynamic DNS services currently supported include: CloudFlare - See https://www.cloudflare.com/ for details Google - See http://www.google.com/domains for details Duckdns - See https://duckdns.org/ for details + Freemyip - See https://freemyip.com for details woima.fi - See https://woima.fi/ for details DDclient now supports many of cable/dsl broadband routers. diff --git a/README.ssl b/README.ssl index 1d0e2f1..ed8d19b 100644 --- a/README.ssl +++ b/README.ssl @@ -8,3 +8,4 @@ On alpine, you need perl-io-socket-ssl to have IO::Socket::SSL ssl support is tested on folowing dynamic dns providers: - dyndns.com +- freemyip.com diff --git a/sample-etc_ddclient.conf b/sample-etc_ddclient.conf index 77dd7b5..4674dc2 100644 --- a/sample-etc_ddclient.conf +++ b/sample-etc_ddclient.conf @@ -220,6 +220,14 @@ ssl=yes # use ssl-support. Works with # password=my-auto-generated-password # protocol=duckdns hostwithoutduckdnsorg +## +## Freemyip (http://freemyip.com/) +## +# +# protocol=freemyip, +# password=my-token +# myhost + ## ## MyOnlinePortal (http://myonlineportal.net) ## From fca9b2149bfa5fdc26b22124a4f34cb7b4b82209 Mon Sep 17 00:00:00 2001 From: Lonnie Abelbeck Date: Fri, 20 Jan 2017 15:05:25 -0600 Subject: [PATCH 227/231] Use JSON::PP instead of the (deprecated) JSON::Any --- ddclient | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ddclient b/ddclient index 3ff2972..caad74f 100755 --- a/ddclient +++ b/ddclient @@ -1949,13 +1949,13 @@ EOM ## load_json_support ###################################################################### sub load_json_support { - my $json_loaded = eval {require JSON::Any}; + my $json_loaded = eval {require JSON::PP}; unless ($json_loaded) { fatal(<<"EOM"); -Error loading the Perl module JSON::Any needed for cloudflare update. +Error loading the Perl module JSON::PP needed for cloudflare update. EOM } - import JSON::Any; + import JSON::PP (qw/decode_json/); } ###################################################################### ## geturl @@ -4273,9 +4273,9 @@ sub nic_cloudflare_update { # Strip header $reply =~ s/^.*?\n\n//s; - my $response = JSON::Any->jsonToObj($reply); - if ($response->{result} eq 'error') { - failed ("%s", $response->{msg}); + my $response = eval {decode_json($reply)}; + if (!defined $response || !defined $response->{result}) { + failed ("invalid json or result."); next; } @@ -4300,9 +4300,9 @@ sub nic_cloudflare_update { # Strip header $reply =~ s/^.*?\n\n//s; - $response = JSON::Any->jsonToObj($reply); - if ($response->{result} eq 'error') { - failed ("%s", $response->{msg}); + $response = eval {decode_json($reply)}; + if (!defined $response || !defined $response->{result}) { + failed ("invalid json or result."); next; } @@ -4326,9 +4326,9 @@ sub nic_cloudflare_update { # Strip header $reply =~ s/^.*?\n\n//s; - $response = JSON::Any->jsonToObj($reply); - if ($response->{result} eq 'error') { - failed ("%s", $response->{msg}); + $response = eval {decode_json($reply)}; + if (!defined $response || !defined $response->{result}) { + failed ("invalid json or result."); } else { success ("%s -- Updated Successfully to %s", $domain, $ip); From 7321959383e90e22f4932ee559fbc54367e1f882 Mon Sep 17 00:00:00 2001 From: Lonnie Abelbeck Date: Sat, 21 Jan 2017 07:06:13 -0600 Subject: [PATCH 228/231] cosmetic, remove stray space indent --- ddclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient b/ddclient index caad74f..6053c1c 100755 --- a/ddclient +++ b/ddclient @@ -4274,7 +4274,7 @@ sub nic_cloudflare_update { # Strip header $reply =~ s/^.*?\n\n//s; my $response = eval {decode_json($reply)}; - if (!defined $response || !defined $response->{result}) { + if (!defined $response || !defined $response->{result}) { failed ("invalid json or result."); next; } From 40409911b33f2d88806bc2fc79467ea1e437125f Mon Sep 17 00:00:00 2001 From: Rusk85 Date: Fri, 4 Nov 2016 07:54:41 +0100 Subject: [PATCH 229/231] script to retrieve IP from fritzbox via UPnP Original author of this one-liner can be found here: http://scytale.name/blog/2010/01/fritzbox-wan-ip --- get-ip-from-fritzbox | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 get-ip-from-fritzbox diff --git a/get-ip-from-fritzbox b/get-ip-from-fritzbox new file mode 100644 index 0000000..ce82540 --- /dev/null +++ b/get-ip-from-fritzbox @@ -0,0 +1,12 @@ +#!/bin/bash +# All credits for this one liner go to the author of this blog: +# http://scytale.name/blog/2010/01/fritzbox-wan-ip +# As the author explains its not required to tamper with the provided IP for the FritzBox +# as it always binds to that address for UPnP. +# Disclaimer: It might be necessary to make the script executable + +curl -s -H 'Content-Type: text/xml; charset="utf-8"' \ + -H 'SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress' \ + --data-binary '' \ + http://169.254.1.1:49000/upnp/control/WANCommonIFC1 | \ + sed -n -e 's#^.*\(.*\).*$#\1#p' From e33aa2fa96d7ef155286e81d41c5888968e2b72d Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 15 Feb 2017 21:31:09 +0100 Subject: [PATCH 230/231] Adding sample-get-ip-from-fritzbox Example config showing how to retrieve IP from fritzbox via UPnP using ddclients cmd option. The script has been provided by @Rusk85 in pull request #45 --- get-ip-from-fritzbox => sample-get-ip-from-fritzbox | 8 ++++++++ 1 file changed, 8 insertions(+) rename get-ip-from-fritzbox => sample-get-ip-from-fritzbox (82%) mode change 100644 => 100755 diff --git a/get-ip-from-fritzbox b/sample-get-ip-from-fritzbox old mode 100644 new mode 100755 similarity index 82% rename from get-ip-from-fritzbox rename to sample-get-ip-from-fritzbox index ce82540..87b986e --- a/get-ip-from-fritzbox +++ b/sample-get-ip-from-fritzbox @@ -1,4 +1,12 @@ #!/bin/bash +# +# Scirpt to fetch IP from fritzbox +# +# Contributed by @Rusk85 in request #45 +# Script can be used in the configuration by adding +# +# use=cmd, cmd=/etc/ddclient/get-ip-from-fritzbox +# # All credits for this one liner go to the author of this blog: # http://scytale.name/blog/2010/01/fritzbox-wan-ip # As the author explains its not required to tamper with the provided IP for the FritzBox From 94dc35984f42f2b239ea2763fc58f63d30a07217 Mon Sep 17 00:00:00 2001 From: wimpunk Date: Wed, 15 Feb 2017 21:49:25 +0100 Subject: [PATCH 231/231] Update version in README Corrected version number as suggested by @abelbeck. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f0a2d8..fe6583c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ =============================================================================== -# DDCLIENT v3.8.2 +# DDCLIENT v3.8.3 ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services.