Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 91500 - ddclient 3.6.6 init script does not start
Summary: ddclient 3.6.6 init script does not start
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
: 89807 99617 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-04 17:11 UTC by Roie Kerstein
Modified: 2007-12-03 15:59 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ddclient-3.6.6.ebuild.patch (ddclient-3.6.6.ebuild.patch,499 bytes, patch)
2005-12-02 23:44 UTC, Arun Raghavan (RETIRED)
Details | Diff
ddclient-cfgprotect.diff (ddclient-cfgprotect.diff,646 bytes, patch)
2005-12-02 23:45 UTC, Arun Raghavan (RETIRED)
Details | Diff
ddclient-cachefix.diff (ddclient-cachefix.diff,1.01 KB, patch)
2005-12-02 23:46 UTC, Arun Raghavan (RETIRED)
Details | Diff
ddclient-normalexit.diff (ddclient-normalexit.diff,768 bytes, patch)
2005-12-19 10:29 UTC, Arun Raghavan (RETIRED)
Details | Diff
ddclient.init.patch (ddclient.init.patch,374 bytes, patch)
2005-12-19 10:31 UTC, Arun Raghavan (RETIRED)
Details | Diff
ddclient-3.6.6.ebuild.patch (ddclient-3.6.6.ebuild.patch,1.68 KB, patch)
2005-12-19 10:32 UTC, Arun Raghavan (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roie Kerstein 2005-05-04 17:11:37 UTC
Since I upgraded ddclient to 3.6.6 the init script refuses to start.
When I start ddclient manually (# ddclient) it works.

Reproducible: Always
Steps to Reproduce:
1.emerge ddclient
2./etc/init.d/ddclient start
3.
Actual Results:  
[!!] 

Expected Results:  
[ok] 

Portage 2.0.51.21 (default-linux/x86/2005.0, gcc-3.4.3-20050110, 
glibc-2.3.5-r0, 2.6.11-gentoo-r6 i686) 
================================================================= 
System uname: 2.6.11-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz 
Gentoo Base System version 1.6.11 
dev-lang/python:     2.3.5 
sys-apps/sandbox:    1.2.3 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 
sys-devel/binutils:  2.15.92.0.2-r8 
sys-devel/libtool:   1.5.16 
virtual/os-headers:  2.6.11 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" 
CXXFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
http://gentoo.mirror.icd.hu/ http://gentoo.eliteitminds.com 
ftp://194.117.143.72/mirrors/gentoo http://194.117.143.70 
ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://194.117.143.71/mirrors/gentoo 
ftp://194.117.143.70/mirrors/gentoo http://194.117.143.71" 
LINGUAS="he" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="x86 X X509 acpi alsa apm arts artswrappersuid avi bash-completion berkdb 
bidi bitmap-fonts blas bzlib cddb cdparanoia cdr crypt ctype cups curl dga 
divx4linux doc dpms dvd dvdr dvdread eds emboss encode foomaticdb fortran ftp 
gd gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml hal i8x0 icq imagemagick imlib 
jpeg jpeg2k kde kdeenablefinal libg++ libwww lm_sensors mad mikmod mmx mono 
mozilla moznocompose moznoirc moznomail mp3 mpeg msn ncurses nls nomotif nowin 
nptl nptlonly offensive opengl pam pango pdflib perl pic plotutils png python 
qt readline real sdl slang spell sse sse2 ssl subversion svga tcpd tetex 
threads truetype truetype-fonts type1-fonts unicode win32codecs xine xml xml2 
xv xvid zlib video_cards_i915 linguas_he userland_GNU kernel_linux libc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 David Girault 2005-05-10 03:03:59 UTC
You need to change the owner:group of the config and cache files in /etc/ddclient.
# cd /etc/ddclient
# chown ddclient:ddclient ddclient.c*

After this change, init script work well.
Ebuild need update to do that automaticaly.

Have a nice day.

David
Comment 2 Chris Bandy 2005-05-27 15:13:50 UTC
more specifically, ddclient.cache needs write access.

the ebuild says to set the group to ddclient and mode 640 (no group write).
Comment 3 Nathan Sullivan 2005-05-31 03:38:35 UTC
I can confirm Chris's solution, after the below permission changes my ddclient
starts up as the user ddclient.

cd /etc/ddclient
chown root:ddclient *
chmod 640 *
chmod 660 ddclient.cache
Comment 4 Jacoby Yves 2005-07-17 08:40:10 UTC
I changed averything as said in the bug report and now, it says [ok].
Nevertheless, it doesn't pop up in the process list. Version 3.6.3 pops up
there, so I can only assume that it says ok, but doesn't really run. 
Comment 5 Eduardo Romero 2005-07-20 11:11:52 UTC
(In reply to comment #4)
> I changed averything as said in the bug report and now, it says [ok].
> Nevertheless, it doesn't pop up in the process list. Version 3.6.3 pops up
> there, so I can only assume that it says ok, but doesn't really run. 

This may be because the configuration file, if you dont tell in
/etc/ddclient/ddclient.conf 
daemon=5

(where 5 can be any number and means seconds to wait until next update)

ddclient wont run as daemon, will run once and quit, that may be why its not
shown in the process list. running it as daemon keeps it running and shows in
the process list like this:

# ps x
... lot of other processes here ...
  706 ?        S      0:00 ddclient - sleeping for 3070 seconds

here's my config file:

# cat /etc/ddclient/ddclient.conf
daemon=3420
use=web, web=dyndns,
protocol=dyndns2,
login=myuser,password=mypass
wildcard=yes,
myhosthere.homelinux.net


Hope this helps :)
Comment 6 Shyam Mani (RETIRED) gentoo-dev 2005-07-24 12:03:25 UTC
(In reply to comment #3)
> I can confirm Chris's solution, after the below permission changes my ddclient
> starts up as the user ddclient.
> 
> cd /etc/ddclient
> chown root:ddclient *
> chmod 640 *
> chmod 660 ddclient.cache

Still can't get it to work after the above. Additionally, I get this on strace.

stat64("/var/lib/init.d/softscripts.old", 0xbfffbc70) = -1 ENOENT (No such file
or directory)
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
stat64(".", {st_mode=S_IFDIR|0700, st_size=4056, ...}) = 0
stat64("/bin/rm", {st_mode=S_IFREG|0755, st_size=33164, ...}) = 0
stat64("/bin/rm", {st_mode=S_IFREG|0755, st_size=33164, ...}) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [RTMIN], 8) = 0
fork()                                  = 8134
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 8134
waitpid(-1, 0xbfffc1ec, WNOHANG)        = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [RTMIN])
rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0
rt_sigaction(SIGINT, {0x8080380, [], 0}, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, {0x8080380, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0
rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
read(255, "\n\n# vim:ts=4\n", 8192)     = 13
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0
read(255, "", 8192)                     = 0
exit_group(1)                           = ?

ddclient works seperately. The init script doesn't.
Comment 7 Patrick Fourniols 2005-11-08 15:04:57 UTC
same than comment #6 before i do "chmod 0755 /etc/ddclient", dont know why i
have anything else ( perhaps an old ebuild? )
Comment 8 Arun Raghavan (RETIRED) gentoo-dev 2005-12-02 23:44:07 UTC
Created attachment 73970 [details, diff]
ddclient-3.6.6.ebuild.patch
Comment 9 Arun Raghavan (RETIRED) gentoo-dev 2005-12-02 23:45:01 UTC
Created attachment 73971 [details, diff]
ddclient-cfgprotect.diff
Comment 10 Arun Raghavan (RETIRED) gentoo-dev 2005-12-02 23:46:04 UTC
Created attachment 73972 [details, diff]
ddclient-cachefix.diff
Comment 11 Arun Raghavan (RETIRED) gentoo-dev 2005-12-02 23:47:04 UTC
Okay, I've got a couple of patches to fix this. Please review/test and let me know.

Summary of what I've done:

1) Stopped the script from changing permissions on /etc/ddclient/ddclient.conf
(this will happen if the user runs ddclient manually as root)

2) Fixed the cache directory to /var/run/ddclient (used to be /etc/ddclient)
Comment 12 Arun Raghavan (RETIRED) gentoo-dev 2005-12-03 21:21:12 UTC
One thing I forgot - the cachefix patch assumes that /var/run/ddclient exists at
runtime. Don't know how to ensure that this happens. Is it sufficient to create
it at runtime if it does not exist?
Comment 14 Shyam Mani (RETIRED) gentoo-dev 2005-12-03 21:41:10 UTC
With Arun's patches - the easy way is to do this

1) Backup your /etc/ddclient/ddclient.conf
2) emerge -C ddclient && rm -rf /etc/ddclient
3) emerge ddclient and copy back ddclient.conf to /etc/ddclient/
4) Fire it up and it works
Comment 15 Arun Raghavan (RETIRED) gentoo-dev 2005-12-03 22:32:07 UTC
(In reply to comment #14)
> 3) emerge ddclient and copy back ddclient.conf to /etc/ddclient/

Don't forget to chown this to root:ddclient and chmod it to 640. :)
Comment 16 Seemant Kulleen (RETIRED) gentoo-dev 2005-12-09 06:22:43 UTC
*** Bug 99617 has been marked as a duplicate of this bug. ***
Comment 17 Arun Raghavan (RETIRED) gentoo-dev 2005-12-19 10:29:28 UTC
Created attachment 75123 [details, diff]
ddclient-normalexit.diff

Makes ddclient exit gracefully on SIGUSR1
Comment 18 Arun Raghavan (RETIRED) gentoo-dev 2005-12-19 10:31:01 UTC
Created attachment 75124 [details, diff]
ddclient.init.patch

Fix init script to send ddclient SIGUSR1
Comment 19 Arun Raghavan (RETIRED) gentoo-dev 2005-12-19 10:32:24 UTC
Created attachment 75125 [details, diff]
ddclient-3.6.6.ebuild.patch

Fixed 2 things:

1) Allow a graceful exit using SIGUSR1
2) Based on Seemant's suggestions on IRC, dump ewarn messages only if there are permission issues with the ddclient.conf file
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-01-17 14:44:51 UTC
*** Bug 89807 has been marked as a duplicate of this bug. ***
Comment 21 Seemant Kulleen (RETIRED) gentoo-dev 2006-02-21 15:12:45 UTC
x86 team members, can you all test this stuff and confirm?
Comment 22 Joshua Jackson (RETIRED) gentoo-dev 2006-02-21 22:57:41 UTC
ddclient, exits gracefully and updates the dns entry in dyndns. All the above patches apply cleanly. 
Comment 23 Joshua Jackson (RETIRED) gentoo-dev 2006-03-02 13:38:24 UTC
removing x86 
Comment 24 Paul Bredbury 2006-04-06 07:49:57 UTC
Isn't this a dupe of bug #117124?
Comment 25 michael@smith-li.com 2006-04-10 14:50:58 UTC
(In reply to comment #24)
> Isn't this a dupe of bug #117124?

Not exactly. Bug #117124 refers to the next version of ddclient.

Comment 26 Doug Goldstein (RETIRED) gentoo-dev 2007-12-03 15:58:22 UTC
Can anyone test the newer 3.7.3 and see if that version fixes these issues for them? This bug is getting a bit stale.
Comment 27 Doug Goldstein (RETIRED) gentoo-dev 2007-12-03 15:59:34 UTC
marking test request.