View | Details | Raw Unified | Return to bug 159199
Collapse All | Expand All

(-)Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	ddclient
8
PORTNAME=	ddclient
9
PORTVERSION=	3.8.0
9
PORTVERSION=	3.8.1
10
PORTREVISION=	2
11
CATEGORIES=	dns
10
CATEGORIES=	dns
12
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
11
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
13
12
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (ddclient-3.8.0.tar.bz2) = 910dc49bd4b2920fad6c4afce03805de5a4cffd0db5f3d902c5417353420aef4
1
SHA256 (ddclient-3.8.1.tar.bz2) = 77a82668a53fdbed1e05ad6febe6dbefb093e3922afb20b993d4ad9ee868258f
2
SIZE (ddclient-3.8.0.tar.bz2) = 41701
2
SIZE (ddclient-3.8.1.tar.bz2) = 43711
(-)files/patch-ddclient (-16 / +15 lines)
Lines 1-21 Link Here
1
--- ./ddclient.orig	2009-01-27 20:14:02.000000000 +0100
1
--- ./ddclient.orig	2011-07-25 19:41:39.000000000 -0700
2
+++ ./ddclient	2010-08-17 20:13:00.000000000 +0200
2
+++ ./ddclient	2011-07-25 19:41:48.000000000 -0700
3
@@ -1,4 +1,3 @@
3
@@ -1,4 +1,3 @@
4
-#!/usr/bin/perl -w
4
-#!/usr/bin/perl -w
5
 #!/usr/local/bin/perl -w
5
 #!/usr/local/bin/perl -w
6
 ######################################################################
6
 ######################################################################
7
 # $Id: ddclient 106 2008-12-04 18:05:23Z wimpunk $
7
 # $Id: ddclient 130 2011-07-11 21:02:07Z wimpunk $
8
@@ -19,6 +18,7 @@
8
@@ -19,6 +18,7 @@
9
 use Getopt::Long;
9
 use Getopt::Long;
10
 use Sys::Hostname;
10
 use Sys::Hostname;
11
 use IO::Socket;
11
 use IO::Socket;
12
+use POSIX 'setsid';
12
+use POSIX 'setsid';
13
 
13
 
14
 my $version  = "3.8.0";
14
 my ($VERSION) = q$Revision: 130 $ =~ /(\d+)/;
15
 my $programd  = $0; 
15
 
16
@@ -625,6 +625,9 @@
16
@@ -668,6 +668,9 @@
17
 $SIG{'KILL'}   = sub { $caught_kill = 1; };
17
     ;
18
 if (opt('daemon') && !opt('force')) {
18
 } elsif (opt('daemon')) {
19
     $SIG{'CHLD'}   = 'IGNORE';
19
     $SIG{'CHLD'}   = 'IGNORE';
20
+    chdir '/';
20
+    chdir '/';
21
+    open(STDIN,  "</dev/null");
21
+    open(STDIN,  "</dev/null");
Lines 23-57 Link Here
23
     my $pid = fork;
23
     my $pid = fork;
24
     if ($pid < 0) {
24
     if ($pid < 0) {
25
 	print STDERR "${program}: can not fork ($!)\n";
25
 	print STDERR "${program}: can not fork ($!)\n";
26
@@ -632,11 +635,10 @@
26
@@ -675,10 +678,9 @@
27
     } elsif ($pid) {
27
     } elsif ($pid) {
28
 	exit 0;
28
 	exit 0;
29
     }
29
     }
30
+    setsid;
30
+    setsid;
31
     $SIG{'CHLD'}   = 'DEFAULT';
31
     $SIG{'CHLD'}   = 'DEFAULT';
32
     $opt{'syslog'} = 1;
33
-    open(STDOUT, ">/dev/null");
32
-    open(STDOUT, ">/dev/null");
34
-    open(STDERR, ">/dev/null");
33
-    open(STDERR, ">/dev/null");
35
-    open(STDIN,  "</dev/null");
34
-    open(STDIN,  "</dev/null");
36
+    open(STDERR, "&STDOUT");
35
+    open(STDERR, "&STDOUT");
37
 
38
     write_pid();
39
 }
36
 }
40
@@ -1404,17 +1406,17 @@
37
 
38
 # write out the pid file if we're daemon'ized
39
@@ -1463,17 +1465,17 @@
41
     ## execute the command.
40
     ## execute the command.
42
     local *FD;
41
     local *FD;
43
     if (! open(FD, $cmd)) {
42
     if (! open(FD, $cmd)) {
44
-	printf STDERR "$program: cannot execute command %s.\n", $cmd;
43
-	printf STDERR "$program: cannot execute command %s.\n", $cmd;
45
+    warning("$program: cannot execute command %s.\n", $cmd);
44
+	warning("$program: cannot execute command %s.\n", $cmd);
46
 
45
 
47
     } elsif ($stdin && (! print FD "$stdin\n")) {
46
     } elsif ($stdin && (! print FD "$stdin\n")) {
48
-	printf STDERR "$program: failed writting to %s.\n", $cmd;
47
-	printf STDERR "$program: failed writting to %s.\n", $cmd;
49
+    warning("$program: failed writing to %s.\n", $cmd);
48
+	warning("$program: failed writing to %s.\n", $cmd);
50
 	close(FD);
49
 	close(FD);
51
 
50
 
52
     } elsif (! close(FD)) {
51
     } elsif (! close(FD)) {
53
-	printf STDERR "$program: failed closing %s.($@)\n", $cmd;
52
-	printf STDERR "$program: failed closing %s.($@)\n", $cmd;
54
+    warning("$program: failed closing %s.($@)\n", $cmd);
53
+	warning("$program: failed closing %s.($@)\n", $cmd);
55
 
54
 
56
     } elsif (opt('exec') && $?) {
55
     } elsif (opt('exec') && $?) {
57
-	printf STDERR "$program: failed %s. ($@)\n", $cmd;
56
-	printf STDERR "$program: failed %s. ($@)\n", $cmd;
(-)files/patch-ticket2 (-21 lines)
Removed Link Here
1
--- ddclient.orig	2011-03-11 00:00:19.394750047 -0800
2
+++ ddclient	2011-03-11 00:04:28.967751644 -0800
3
@@ -2094,10 +2094,14 @@
4
     } elsif (defined($sub) && &$sub($host)) {
5
 	$update = 1;
6
 
7
-    } elsif (($cache{$host}{'static'} ne $config{$host}{'static'}) ||
8
-	     ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'}) ||
9
-	     ($cache{$host}{'mx'} ne $config{$host}{'mx'}) ||
10
-	     ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) {
11
+    } elsif ((defined($cache{$host}{'static'}) && defined($config{$host}{'static'}) &&
12
+	     ($cache{$host}{'static'} ne $config{$host}{'static'})) ||
13
+	     (defined($cache{$host}{'wildcard'}) && defined($config{$host}{'wildcard'}) &&
14
+	     ($cache{$host}{'wildcard'} ne $config{$host}{'wildcard'})) ||
15
+	     (defined($cache{$host}{'mx'}) && defined($config{$host}{'mx'}) &&
16
+	     ($cache{$host}{'mx'} ne $config{$host}{'mx'})) ||
17
+	     (defined($cache{$host}{'backupmx'}) && defined($config{$host}{'backupmx'}) &&
18
+	     ($cache{$host}{'backupmx'} ne $config{$host}{'backupmx'})) ) {
19
 	info("updating %s because host settings have been changed.", $host);
20
 	$update = 1;
21

Return to bug 159199