Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99617 - ddclient init.d script fails to stop ddclient
Summary: ddclient init.d script fails to stop ddclient
Status: RESOLVED DUPLICATE of bug 91500
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2005-07-19 21:52 UTC by Eduardo Romero
Modified: 2005-12-09 06:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Romero 2005-07-19 21:52:04 UTC
ddclient init.d script fails to stop ddclient, the init.d script has an "error",
as it doesnt pass the pid file to start-stop-daemon, this it cannot stop it when
issuing /etc/init.d/ddclient stop

Reproducible: Always
Steps to Reproduce:
1. configure the /etc/ddclient/ddclient.conf
2. /etc/init.d/ddclient start
3. /etc/init.d/ddclient start

Actual Results:  
 * Stopping DDClient ...                                                       
                                        [ !! ]

Expected Results:  
 * Stopping DDClient ...                                                       
                                        [ ok ]

This has a easy fix:

start() {
        checkconfig || return 1
        ebegin "Starting DDClient"
        start-stop-daemon --start --quiet --exec /usr/sbin/ddclient \
                -- -pid=/var/run/ddclient.pid
        eend $?
}
Comment 1 Eduardo Romero 2005-07-19 21:53:27 UTC
(In reply to comment #0)

Original /etc/init.d/ddclient:

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/files/ddclient.rc6,v 1.4
2004/07/14 23:21:59 agriffis Exp $

depend() {
        need net
}

checkconfig() {
        if [ ! -e /etc/ddclient/ddclient.conf ] ; then
                eerror "You need a /etc/ddclient/ddclient.conf file to run ddclient"
                eerror "There is a sample file in /etc/ddclient/"
                return 1
        fi

}

start() {
        checkconfig || return 1
        ebegin "Starting DDClient"
        start-stop-daemon --start --quiet --exec /usr/sbin/ddclient
        eend $?
}

stop() {
        ebegin "Stopping DDClient"
        start-stop-daemon --stop --quiet --pidfile /var/run/ddclient.pid
        eend $?
}


Fixed /etc/init.d/ddclient:

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-dns/ddclient/files/ddclient.rc6,v 1.4 200
4/07/14 23:21:59 agriffis Exp $

depend() {
        need net
}

checkconfig() {
        if [ ! -e /etc/ddclient/ddclient.conf ] ; then
                eerror "You need a /etc/ddclient/ddclient.conf file to run ddcli
ent"
                eerror "There is a sample file in /etc/ddclient/"
                return 1
        fi

}

start() {
        checkconfig || return 1
        ebegin "Starting DDClient"
        start-stop-daemon --start --quiet --exec /usr/sbin/ddclient \
                -- -pid=/var/run/ddclient.pid
        eend $?
}

stop() {
        ebegin "Stopping DDClient"
        start-stop-daemon --stop --quiet --pidfile /var/run/ddclient.pid
        eend $?
}
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-07-20 01:10:16 UTC
Thanks; BTW, do you have any ideas about Bug 91500? 
Comment 3 Eduardo Romero 2005-07-20 11:16:09 UTC
(In reply to comment #2)
> Thanks; BTW, do you have any ideas about Bug 91500? 

I've posted what i think may have caused Bug 91500, i currently can do both
start and stop, both give me [ ok ]

I hope that's what's causing it =)
Comment 4 Shyam Mani (RETIRED) gentoo-dev 2005-12-03 21:42:14 UTC
Seems fixing Bug #91500 fixes this one too...
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2005-12-09 06:22:43 UTC
I'll dupe this to 91500

*** This bug has been marked as a duplicate of 91500 ***