Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DHCP Daemon problems (NOT CLIENT DAEMON) - RUNSCRIPT.SH
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Scott Frappier
n00b
n00b


Joined: 08 May 2002
Posts: 57

PostPosted: Sat Jun 22, 2002 4:17 am    Post subject: DHCP Daemon problems (NOT CLIENT DAEMON) - RUNSCRIPT.SH Reply with quote

evangelion init.d # ./dhcp stop
/sbin/runscript.sh: dhcp: command not found
* Stopping dhcpd... [ ok ]

Why am i constantly getting this error message? I'm horrible @ scripting, and when I go into 'runscript.sh' I cannot where it is getting this 'dhcp' variable.

Is there an easy way to follow scripts and input commands? I work in a CSIDE enviroment that allows me to 'step' through the code...is there such a think for the bash scripts that exist?

If anyone can point me out how to get rid of that annoying message, please feel free to tell me :) !

Thanks much everyone, and I have to say it, Gentoo made me switch from Slackware, and now I am never going back :)...Now I just wish VMWare worked in FreeBSD :).

Scott Frappier
Back to top
View user's profile Send private message
carpman
Advocate
Advocate


Joined: 20 Jun 2002
Posts: 2202
Location: London - UK

PostPosted: Sat Jun 22, 2002 12:11 pm    Post subject: Reply with quote

try looking here, i had runscript.sh problem and thise cured it

https://forums.gentoo.org/viewtopic.php?t=5722
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Sat Jun 22, 2002 4:08 pm    Post subject: Re: DHCP Daemon problems (NOT CLIENT DAEMON) - RUNSCRIPT.SH Reply with quote

Scott Frappier wrote:
evangelion init.d # ./dhcp stop
/sbin/runscript.sh: dhcp: command not found
* Stopping dhcpd... [ ok ]


Try issuing the following command instead:

Code:
/etc/init.d/dhcpd stop


note the 'd' at the end of dhcp.

As for where the variable comes from, it's coming from /etc/init.d/dhcp (or dhcpd, which I think is the right name of the command)

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
Scott Frappier
n00b
n00b


Joined: 08 May 2002
Posts: 57

PostPosted: Sun Jun 23, 2002 7:04 am    Post subject: Reply with quote

klieber wrote:
Quote:
Try issuing the following command instead:

Code:
 /etc/init.d/dhcpd stop


It looks like there is no dhcpd in my init.d directory. There is of course the daemon in /sbin.

Upon futher examination, it looks like the dhcp-3.0-r2 package itself has a mislabeled init.d script. Here is the information from the CONTENTS file:

Code:
 obj /etc/init.d/dhcp b3e4e6d39bd41d9900733b87380b0fbb 1024447908


Shouldn't that be dhcpd? If I change it to dhcpd, my problem is solved, and I no longer recieve errors.


So in the end, is renaming the file the 'correct' solution...I know it works now, but I want to know if this is by design, or by a typo :).

Thanks for the reply klieber :)

Scott Frappier
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Sun Jun 23, 2002 12:29 pm    Post subject: Reply with quote

Eh...I don't use dhcp all that much, so I may have mislead you. I just looked at the one box that I do have dhcpd installed on -- the "correct" path is /etc/init.d/dhcp (no 'd').

I'm not sure why you're getting the runscript error, but it does look like it's still working (stopping dhcpd, etc.) Check your /etc/init.d/dhcp file and make sure it looks similar to this one:

Code:
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# /space/gentoo/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcp.rc7,v 1.1 2002/06/17 04:07:11 lostlogic Exp

#configuration is done in /etc/conf.d/dhcp

depend() {
    need net
}

checkconfig() {
    if [ ! -e /etc/dhcp/dhcpd.conf ] ; then
        eerror "You need an /etc/dhcp/dhcpd.conf file to run dhcpd"
        eerror "There is a sample conf file in /usr/share/doc/dhcp"
        return 1
    fi
}

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

stop() {
    ebegin "Stopping dhcpd"
    start-stop-daemon --stop --quiet --exec /usr/sbin/dhcpd
    eend $?
}


--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum