View previous topic :: View next topic |
Author |
Message |
Scott Frappier n00b
Joined: 08 May 2002 Posts: 57
|
Posted: Sat Jun 22, 2002 4:17 am Post subject: DHCP Daemon problems (NOT CLIENT DAEMON) - RUNSCRIPT.SH |
|
|
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 |
|
|
carpman Advocate
Joined: 20 Jun 2002 Posts: 2202 Location: London - UK
|
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sat Jun 22, 2002 4:08 pm Post subject: Re: DHCP Daemon problems (NOT CLIENT DAEMON) - RUNSCRIPT.SH |
|
|
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 |
|
|
Scott Frappier n00b
Joined: 08 May 2002 Posts: 57
|
Posted: Sun Jun 23, 2002 7:04 am Post subject: |
|
|
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 |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Sun Jun 23, 2002 12:29 pm Post subject: |
|
|
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 |
|
|
|