# dhcpd (dhcp server) will not start on boot.

## dgiorgio

dhcp server will not start on boot.

but it is possible to start after the system has loaded.

 *Quote:*   

> # /etc/init.d/dhcpd restart
> 
>  * Starting dhcpd ...     

 

 *Quote:*   

> # rc-update 
> 
>        NetworkManager |      default                 
> 
>                 acpid |      default                 
> ...

 

 *Quote:*   

> # more /etc/dhcp/dhcpd.conf
> 
> # dhcpd.conf
> 
> # Sample DHCP Server Configuration File
> ...

 

interface "vboxnet0" would be the problem?

----------

## tuner23

Hy,

dhcpd needs a succesfull started net interface, so yes vboxnet0 has to be up.

If you want to use it only with vbox, you have to wait till vbox is started.

Possible solutions are:

* change the dependencies in the init-scripts

e.g. try (hope the name of the service is /etc/init.d/vbox )

[code]/etc/init.d/dhcp

...

need net vbox

...

[code]

the problem here is that you ever have to update the init-script, when recompiling dhcpd.

* Or add dhcpd service to service local (/etc/local.d/), when everything is already up and running.

Hope that helps.

Greets,

Antonis.[/code]

----------

## khayyam

 *tuner23 wrote:*   

> [...] the problem here is that you ever have to update the init-script, when recompiling dhcpd.

 

tuner23 ...

rc_need_*, rc_after_*, rc_provide_*, rc_before_*, etc, can be defined in /etc/conf.d/* or /etc/rc.conf, so its better to make changes there rather than in /etc/init.d/*

An example, to have an interface need 'iptables' 

/etc/conf.d/net

```
rc_net_eth0_need="iptables"
```

or, similarly, to have 'ipset' start before 'iptables'.

/etc/conf.d/net

```
rc_ipset_before="iptables"
```

Anyhow, all this may be besides the point as I'm not even sure virtualbox is started via init. 

HTH & best ... khay

----------

## tuner23

Oh, thanks for the info..

----------

## dgiorgio

 *Quote:*   

> # more /etc/conf.d/modules 
> 
> # You can define a list modules for a specific kernel version,
> 
> # a released kernel version, a main kernel version or just a list.
> ...

 

the modules are started at boot.

how do I load the network interface "vboxnet0"?

----------

