]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Merge commit 'origin/master' into next
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 3 Sep 2011 14:05:55 +0000 (16:05 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 3 Sep 2011 14:05:55 +0000 (16:05 +0200)
config/rootfiles/core/52/exclude
config/rootfiles/core/52/filelists/apache2 [new symlink]
config/rootfiles/core/52/filelists/ethtool [new symlink]
config/rootfiles/core/52/filelists/files
config/rootfiles/core/52/update.sh
html/cgi-bin/ddns.cgi
lfs/ethtool
src/scripts/setddns.pl

index ce199d8511a8260b17b0fa4f8e154be635fc8e5a..bb0d8c84ba55edad13e03c26d8cce26bef54daa0 100644 (file)
@@ -1 +1,2 @@
 srv/web/ipfire/html/proxy.pac
+var/updatecache
diff --git a/config/rootfiles/core/52/filelists/apache2 b/config/rootfiles/core/52/filelists/apache2
new file mode 120000 (symlink)
index 0000000..eef95ef
--- /dev/null
@@ -0,0 +1 @@
+../../../common/apache2
\ No newline at end of file
diff --git a/config/rootfiles/core/52/filelists/ethtool b/config/rootfiles/core/52/filelists/ethtool
new file mode 120000 (symlink)
index 0000000..494a53e
--- /dev/null
@@ -0,0 +1 @@
+../../../common/ethtool
\ No newline at end of file
index dca50befa6bc6e79938d0431a2cc958da6999b97..331514d941f53b03c7c09d6e1e34e5789fdd5b9f 100644 (file)
@@ -2,3 +2,5 @@ etc/system-release
 var/ipfire/langs/
 etc/rc.d/init.d/console
 usr/local/sbin/setup
+usr/local/bin/setddns.pl
+srv/web/ipfire/cgi-bin/ddns.cgi
index 16e8368e64da78e94f3f6cb76926bbb9372d2cd9..1e2f61e7f9d3923d61965a0e23e9bd351b2fd79c 100644 (file)
@@ -34,6 +34,7 @@ done
 
 #
 #Stop services
+/etc/init.d/apache stop
 
 #
 #Extract files
@@ -41,6 +42,7 @@ extract_files
 
 #
 #Start services
+/etc/init.d/apache start
 
 #
 #Update Language cache
index f7ae56852d8b4da6cb3c2513ecb6c7eca034dc47..4453542475ac6a0cd6996cb148c8bcadd9403778 100644 (file)
@@ -139,11 +139,13 @@ if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
        }
        
        # Permit an empty HOSTNAME for the nsupdate, regfish, dyndns, enom, ovh, zoneedit, no-ip, easydns
+       #and namecheap
         unless ($settings{'SERVICE'} eq 'zoneedit.com' || $settings{'SERVICE'} eq 'nsupdate' || 
                $settings{'SERVICE'} eq 'dyndns-custom'|| $settings{'SERVICE'} eq 'regfish.com' || 
                $settings{'SERVICE'} eq 'enom.com' || $settings{'SERVICE'} eq 'dnspark.com' ||
                $settings{'SERVICE'} eq 'ovh.com' || $settings{'HOSTNAME'} ne '' ||
-               $settings{'SERVICE'} eq 'no-ip.com' || $settings{'SERVICE'} eq 'easydns.com' ) {
+               $settings{'SERVICE'} eq 'no-ip.com' || $settings{'SERVICE'} eq 'easydns.com'  ||
+               $settings{'SERVICE'} eq 'namecheap.com' )       {
            $errormessage = $Lang::tr{'hostname not set'};
        }
        unless ($settings{'HOSTNAME'} eq '' || $settings{'HOSTNAME'} =~ /^[a-zA-Z_0-9-]+$/) {
@@ -243,6 +245,7 @@ $checked{'SERVICE'}{'easydns.com'} = '';
 $checked{'SERVICE'}{'enom.com'} = '';
 $checked{'SERVICE'}{'freedns.afraid.org'} = '';
 $checked{'SERVICE'}{'hn.org'} = '';
+$checked{'SERVICE'}{'namecheap.com'} = '';
 $checked{'SERVICE'}{'no-ip.com'} = '';
 $checked{'SERVICE'}{'nsupdate'} = '';
 $checked{'SERVICE'}{'ovh.com'} = '';
@@ -336,6 +339,7 @@ print <<END
     <option $checked{'SERVICE'}{'enom.com'}>enom.com</option>
     <option $checked{'SERVICE'}{'freedns.afraid.org'}>freedns.afraid.org</option>
     <option $checked{'SERVICE'}{'hn.org'}>hn.org</option>
+       <option $checked{'SERVICE'}{'namecheap.com'}>namecheap.com</option>
     <option $checked{'SERVICE'}{'no-ip.com'}>no-ip.com</option>
     <option $checked{'SERVICE'}{'nsupdate'}>nsupdate</option>
     <option $checked{'SERVICE'}{'ovh.com'}>ovh.com</option>
index 00b4a13e53b03a7b85625af11809a90571aeec6e..15f0419d868ac29e2afe5416ea4d870d04b861fd 100644 (file)
 
 include Config
 
-VER        = 3
+VER        = 3.0
 
 THISAPP    = ethtool-$(VER)
-DL_FILE    = $(THISAPP).tar.gz
+DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_MD5 = b4e71f7fa2629250677eefcb338442c5
+$(DL_FILE)_MD5 = cb129398cbbf39859901b55ecac101da
 
 install : $(TARGET)
 
@@ -69,7 +69,7 @@ $(subst %,%_MD5,$(objects)) :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && ./configure --prefix=/usr
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
index 2c7c947f548d68f903e2034e0d93f7125d232cdc..f66b841d7ac9697c51d5553d84faf4fb45f49ab9 100644 (file)
@@ -515,6 +515,36 @@ if ($ip ne $ipcache) {
                                &General::log("Dynamic DNS ip-update for $settings{'HOSTDOMAIN'} : failure (could not connect to server)");
                            }
                        }
+                       #namecheap test
+                       elsif ($settings{'SERVICE'} eq 'namecheap') {
+                               # use proxy ?
+                               my %proxysettings;
+                               &General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
+                               if ($_=$proxysettings{'UPSTREAM_PROXY'}) {
+                                       my ($peer, $peerport) = (/^(?:[a-zA-Z ]+\:\/\/)?(?:[A-Za-z0-9\_\.\-]*?(?:\:[A-Za-z0-9\_\.\-]*?)?\@)?([a-zA-Z0-9\.\_\-]*?)(?:\:([0-9]{1,5}))?(?:\/.*?)?$/);
+                                       Net::SSLeay::set_proxy($peer,$peerport,$proxysettings{'UPSTREAM_USER'},$proxysettings{'UPSTREAM_PASSWORD'} );
+                               }
+
+                               my ($out, $response) = Net::SSLeay::get_https(  'dynamicdns.park-your-domain.com',
+                                                               443,
+                                                               "/update?host=$settings{'HOSTNAME'}&domain=$settings{'DOMAIN'}&password=$settings{'PASSWORD'}&ip=$ip",
+                                                               Net::SSLeay::make_headers('User-Agent' => 'IPFire' )
+                                                               );
+                                       #Valid responses from service are:
+                                       # wait confirmation!!
+                                       if ($response =~ m%HTTP/1\.. 200 OK%) {
+                                               if ( $out !~ m/<ErrCount>0<\/ErrCount>/ ) {
+                                                       $out =~ m/<Err1>(.*)<\/Err1>/;
+                                                       &General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure ($1)");
+                                               } else {
+                                                       &General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : success");
+                                                       $success++;
+                                               }
+                                       } else {
+                                               &General::log("Dynamic DNS ip-update for $settings{'HOSTNAME'}.$settings{'DOMAIN'} : failure (could not connect to server)");
+                               }
+                       }
+                       #end namecheap test
                        elsif ($settings{'SERVICE'} eq 'dynu') {
                            # use proxy ?
                            my %proxysettings;