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
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
more specifically, ddclient.cache needs write access. the ebuild says to set the group to ddclient and mode 640 (no group write).
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
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.
(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 :)
(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.
same than comment #6 before i do "chmod 0755 /etc/ddclient", dont know why i have anything else ( perhaps an old ebuild? )
Created attachment 73970 [details, diff] ddclient-3.6.6.ebuild.patch
Created attachment 73971 [details, diff] ddclient-cfgprotect.diff
Created attachment 73972 [details, diff] ddclient-cachefix.diff
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)
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?
Also requesting these to be fixed upstream: cfgprotect: http://sourceforge.net/tracker/index.php?func=detail&aid=1328268&group_id=116817&atid=676128 cachefix: http://sourceforge.net/tracker/index.php?func=detail&aid=1372687&group_id=116817&atid=676128
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
(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. :)
*** Bug 99617 has been marked as a duplicate of this bug. ***
Created attachment 75123 [details, diff] ddclient-normalexit.diff Makes ddclient exit gracefully on SIGUSR1
Created attachment 75124 [details, diff] ddclient.init.patch Fix init script to send ddclient SIGUSR1
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
*** Bug 89807 has been marked as a duplicate of this bug. ***
x86 team members, can you all test this stuff and confirm?
ddclient, exits gracefully and updates the dns entry in dyndns. All the above patches apply cleanly.
removing x86
Isn't this a dupe of bug #117124?
(In reply to comment #24) > Isn't this a dupe of bug #117124? Not exactly. Bug #117124 refers to the next version of ddclient.
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.
marking test request.