summaryrefslogtreecommitdiffstats
path: root/abs/extra/ddclient/ddclient-foreground.patch
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2010-09-05 06:13:57 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2010-09-05 06:13:57 (GMT)
commitb172f79fadb565ecfbcec9508f9377d8618a4f4c (patch)
treebf8823b07e3313c3afa000a9b31e4f9a735cb818 /abs/extra/ddclient/ddclient-foreground.patch
parentf9d54ab7c3853208484e304bc6cf40ab0f79d400 (diff)
parent5e7027c6194237ca1dc5fcbb3648483a970fb500 (diff)
downloadlinhes_pkgbuild-b172f79fadb565ecfbcec9508f9377d8618a4f4c.zip
linhes_pkgbuild-b172f79fadb565ecfbcec9508f9377d8618a4f4c.tar.gz
linhes_pkgbuild-b172f79fadb565ecfbcec9508f9377d8618a4f4c.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra/ddclient/ddclient-foreground.patch')
-rw-r--r--abs/extra/ddclient/ddclient-foreground.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/abs/extra/ddclient/ddclient-foreground.patch b/abs/extra/ddclient/ddclient-foreground.patch
new file mode 100644
index 0000000..a814ede
--- /dev/null
+++ b/abs/extra/ddclient/ddclient-foreground.patch
@@ -0,0 +1,47 @@
+--- ../ddclient-orig/ddclient 2009-10-19 22:45:15.000000000 +1030
++++ ddclient 2009-10-19 22:50:11.000000000 +1030
+@@ -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, "</dev/null");
++}
+
++# write out the pid file if we're daemon'ized
++if(opt('daemon')) {
+ write_pid();
++ $opt{'syslog'} = 1;
+ }
+
+ umask 077;