no services starting on reboot

Hello,

For some reason whenever I reboot my FreeBSD box none of the services listed in my /etc/rc.conf or /usr/local/etc/rc.conf file are started.

I have to go into /etc/rc.d and start the following services manually:

netif, routing, hostname, sshd

This is how my /etc/rc.conf file looks right now:

Code:
# -- sysinstall generated deltas -- # Sun Aug 15 18:54:08 2010
# Created: Sun Aug 15 18:54:08 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.1.1"
hostname="LBSD2.summitnjhome.com"
ifconfig_bge0="inet 192.168.1.44  netmask 255.255.255.0"
sshd_enable="YES"
apache22_enable=YES
mysql_enable=YES
hald_enable=YES
dbus_enable=YES
named_enable=YES
netif_enable="YES"
routing_enable="YES"
hostname_enable="YES"
slapd_enable="YES"
# -- sysinstall generated deltas -- # Thu Sep 16 00:12:09 2010
#rpcbind_enable="YES"
# -- sysinstall generated deltas -- # Sun Oct 17 23:30:16 2010
ifconfig_bge0="inet 192.168.1.44  netmask 255.255.255.0"
defaultrouter="192.168.1.1"
hostname="LBSD2.summitnjhome.com"

This is how my /usr/local/etc/rc.conf file looks currently:

Code:
LBSD2# vi /usr/local/etc/rc.conf

# -- sysinstall generated deltas -- # Sun Aug 15 18:54:08 2010
# Created: Sun Aug 15 18:54:08 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.1.1"
hostname="LBSD2.summitnjhome.com"
ifconfig_bge0="inet 192.168.1.44  netmask 255.255.255.0"
sshd_enable="YES"
apache22_enable=YES
mysql_enable=YES
dbus_enable=YES
hald_enable="YES"
local_startup="{local_startup} /usr/local/kde4/etc/rc.d"
slapd_enable=YES
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://192.168.1.44/"'
slapd_sockets="/var/run/openldap/ldapi
dbus_enabled="YES"
hald_enabled="YES"
# -- sysinstall generated deltas -- # Thu Sep 16 00:12:09 2010

I would appreciate some advice on how to correct this. thanks
 
Remove /usr/local/etc/rc.conf and move everything to /etc/rc.conf.

Remove all the crap and double entries. Use a plain editor, don't use sysinstall for such a simple task.

Make sure the values are surrounded by double quotes (a lot of them aren't).

Remove these:
Code:
netif_enable="YES"
routing_enable="YES"
hostname_enable="YES"
 
According to your post, the slapd_sockets variable is incorrectly quoted. Double check everything. I also agree with SirDice, move everything to /etc/rc.conf and remove your duplicates.
 
You can sanity check the rc.conf syntax with this command:

Code:
sh -n /etc/rc.conf

If it produces no output, then its probably okay. If you forgot a trailing quotation mark, it will usually tell you what line.
 
all services are starting

Gentlemen,

Thanks for your help! I have moved everything from /usr/local/etc/rc.conf to /etc/rc.conf, and tidied everything up and made what seems like a neater, and more organized file.

Code:
# -- sysinstall generated deltas -- # Sun Aug 15 18:54:08 2010
# Created: Sun Aug 15 18:54:08 2010
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="192.168.1.1"
hostname="LBSD2.summitnjhome.com"
ifconfig_bge0="inet 192.168.1.44  netmask 255.255.255.0"
sshd_enable="YES"
apache22_enable="YES"
mysql_enable="YES"
hald_enable="YES"
dbus_enable="YES"
named_enable="YES"
nfs_client_enable="YES"
rsyncd_enable=YES
slapd_enable="YES"
rpcbind_enable="YES"
dbus_enable="YES"
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://192.168.1.44/"'
slapd_sockets="/var/run/openldap/ldapi"
local_startup="{local_startup} /usr/local/kde4/etc/rc.d"

and I have verified it with

Code:
LBSD2# sh -n /etc/rc.conf
LBSD2#

Which produced no output, and after bouncing the box with init 6 everything came up. :e

The only thing I need to work on at this point is the quoting around my slapd socket file. Other than that I believe I'm good to go!!

Thanks again for your help!
 
You still have dbus_enable="YES" in there twice. All the comments at the start can be removed, too.
 
improved rc.conf

Here's how it stands as of now.. thanks again for the input.


Code:
defaultrouter="192.168.1.1"
hostname="LBSD2.summitnjhome.com"
ifconfig_bge0="inet 192.168.1.44  netmask 255.255.255.0"
sshd_enable="YES"
apache22_enable="YES"
mysql_enable="YES"
hald_enable="YES"
dbus_enable="YES"
named_enable="YES"
nfs_client_enable="YES"
rsyncd_enable=YES
slapd_enable="YES"
rpcbind_enable="YES"
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://192.168.1.44/"'
slapd_sockets="/var/run/openldap/ldapi"
local_startup="{local_startup} /usr/local/kde4/etc/rc.d"
 
bluethundr said:
Here's how it stands as of now.. thanks again for the input.

Code:
...
local_startup="{local_startup} /usr/local/kde4/etc/rc.d"

According to the Handbook, that line is missing a dollar sign:

Code:
local_startup="${local_startup} /usr/local/kde4/etc/rc.d"
 
finished product?

ok I think this is done at this point..;)


Code:
defaultrouter="192.168.1.1"
hostname="LBSD2.summitnjhome.com"
ifconfig_bge0="inet 192.168.1.44  netmask 255.255.255.0"
sshd_enable="YES"
apache22_enable="YES"
mysql_enable="YES"
hald_enable="YES"
dbus_enable="YES"
named_enable="YES"
nfs_client_enable="YES"
rsyncd_enable=YES
slapd_enable="YES"
rpcbind_enable="YES"
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://192.168.1.44/"'
slapd_sockets="/var/run/openldap/ldapi"
local_startup="${local_startup} /usr/local/kde4/etc/rc.d"

thanks for helping to improve this config!
 
Back
Top