j wrote:
> The title says it all- I have a single /etc/rc script that starts the
> machine, invoked by inittab with the line
>
> si::sysinit:/etc/rc
>
> The last line of this script is
>
> /usr/sbin/dhcpd
>
> When the machine starts, all messages indicate that dhcpd is running
> (on the screen and in /var/log/messages), but ps -Af does not show
> dhcpd running, and external machines can not get dhcp addresses.
>
> I am trying to debug this, but the frustrating thing is that in every
> debug test I have ran, dhcp works! In particular:
>
> 1). It works when I put a "sleep 2" after the dhcpd start in
> rc (but this seems like the wrong way to go about fixing this).
>
> 2). When I type /usr/sbin/dhcpd by hand in bash, it works.
>
> 3). When I boot into single user mode and run /etc/rc by hand,
> it also works.
>
> 4). When I start dhcpd with strace in /etc/rc, it also works.
>
> Because dhcpd works in every debug test I have tried, I am running out
> of ideas on how to debug this.
>
> thanks
> -J
What happens when you run the rc script by hand? If it does not start I
suggest that you place the line:
set -x
at the top of the rc script, right below the #!/bin/sh line. This will
cause every command in the script to get echoed to the console so that
you can see its result.
HTH
Neil
--
/************************************************** *
*Neil Horman
*Software Engineer
*Red Hat, Inc.,
www.redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*
http://www.keyserver.net
************************************************** */