FreeBSD 5.1 and localdaemons
Darin
derwood at naebunny.net
Wed Jun 18 22:14:18 PDT 2003
Hello,
This is my first try at FreeBSD.
I've been able to get the install completed and that seems fine.
I started compiling ports in and have discovered a problem. I compiled in
ProFTPD and MySQL along with all their dependencies and found that they were
not starting up when the box would boot up.
I've checked /usr/local/etc/rc.d and can see the scripts there for proftpd
and mysql. I checked the /etc/defaults/rc.conf and the path for
local_startup is set to /usr/local/etc/rc.d
The execute bit is set for all the startup scripts in /usr/local/etc/rc.d
also..
I tried turning on the rc_debug option so that I could see what happened in
the dmesg.
And I can see the following from dmesg -a output:
/etc/rc: DEBUG: run_rc_command: evaluating local_start().
Starting local daemons:
.
But, the ProFTPD and MySQL still wont start..
I did some digging in the scripts in /etc/rc.d and found the local and
localdaemons scripts.. After playing around a bit, I found that the
localdaemons script is actually what executes the local scripts.. But for
whatever reason, local is not starting localdaemons.
I can start both daemons manually by running their scripts manually, so
theres no problem that I can see with the installation..
I tried adding a line to the /etc/rc.d/local script that called the
localdaemons script.. When I rebooted, MySQL and ProFTPD start fine during
boot..
Anyone have any ideas on this one??
Darin -
Here is the local script:
#!/bin/sh
#
# $NetBSD: local,v 1.6 2002/03/22 04:33:59 thorpej Exp $
# $FreeBSD: src/etc/rc.d/local,v 1.4 2002/10/17 23:46:32 sobomax Exp $
#
# PROVIDE: local
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD NetBSD shutdown
. /etc/rc.subr
name="local"
start_cmd="local_start"
stop_cmd="local_stop"
local_start()
{
echo -n 'Starting local daemons:'
if [ -f /etc/rc.local ]; then
. /etc/rc.local
fi
echo '.'
}
# . /etc/rc.d/localdaemons start ##I added this line to call
localdaemons. When uncommented MySQL and ProFPTD start fine.
local_stop()
{
echo -n 'Shutting down local daemons:'
if [ -f /etc/rc.shutdown.local ]; then
. /etc/rc.shutdown.local
fi
echo '.'
}
load_rc_config $name
run_rc_command "$1"
More information about the freebsd-newbies
mailing list