# Blank /etc/init.d/dhcp file when trying 2 set up server/host

## Gizmo89

hi, i'm trying to set up my gentoo as a server/host, so i can use it for a network install/boot. But i'm supposed to start dhcp, which i can't do, because i've typed in "/etc/init.d/dhcp start" to start the dhcp server, but the file "/etc/init.d/dhcp" does not exist.

"linux # /etc/init.d/dhcp start

bash: /etc/init.d/dhcp: No such file or directory" :S

What do i do?

----------

## jmbsvicetto

Hi.

Just in case you're confused, /etc/init.d/dhcp is the init script for the dhcp server. If you're looking for the dhcp client, it should be started by your interface - for instance /etc/init.d/net.eth0.

----------

## Gizmo89

so why won't dhcp server start then?

----------

## jmbsvicetto

Did you install it? If so, please look at the output of qlist -v dhcp - qlist is part of portage-utils.

----------

## Gizmo89

emerge dhcp

if that's right?!

then it did something, installing stuff and seemed fine, whatever it did :S

----------

## UberLord

It's /etc/init.d/dhcpd

If there's a document stating otherwise, please open a bug so we can fix it  :Smile: 

----------

## Gizmo89

is this right?

# /etc/init.d/in.tftpd start

/etc/rc.conf: line 39: Gnome: command not found

 * Starting tftpd ...                                                     [ !! ]

# /etc/init.d/dhcp start

bash: /etc/init.d/dhcp: No such file or directory

and also; what am i supposed to have in the following files? ;/etc/conf.d/dhcp, dhcpd.conf?

----------

## UberLord

your /etc/rc.conf file is badly messed up. post it. Actually, change the line that says GNOME to read like so

XSESSION="Gnome"

Stop thinking about /etc/init.d/dhcp and /etc/conf.d/dhcp - they should not exist. it's got a "d" on the end of it, which should exist.

----------

## Gizmo89

but i don't know what "exactly" i should have typed in the "/etc/init.d/dhcpd" and "/etc/conf.d/dhcpd" files

:s

----------

## UberLord

OK, re-read your first post. Then read my answers. If you have any more questions please start a new thread.

----------

## Gizmo89

what does this mean then?

# /etc/init.d/dhcpd start

 * Caching service dependencies ...

/etc/conf.d/net: line 5: syntax error near unexpected token `"192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255"'

/etc/conf.d/net: line 5: `config_eth1( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) '

/etc/conf.d/net: line 5: syntax error near unexpected token `"192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255"'

/etc/conf.d/net: line 5: `config_eth1( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) '

/etc/conf.d/net: line 5: syntax error near unexpected token `"192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255"'

/etc/conf.d/net: line 5: `config_eth1( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) '                                                         [ ok ]

 * WARNING:  dhcpd has already been started.

(/etc/init.d/dhcp start)

May  7 09:24:40 Leech3 rc-scripts: Configuration not set for eth0 - assuming DHCP

May  7 09:24:40 Leech3 dhcpcd[7819]: MAC address = 00:50:8d:e9:64:bf

May  7 09:26:40 Leech3 dhcpcd[7819]: timed out waiting for a valid DHCP server response

May  7 09:26:41 Leech3 dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.

May  7 09:26:41 Leech3 dhcpd: Wrote 0 deleted host decls to leases file.

May  7 09:26:41 Leech3 dhcpd: Wrote 0 new dynamic host decls to leases file.

May  7 09:26:41 Leech3 dhcpd: Wrote 0 leases to leases file.

May  7 09:26:43 Leech3 Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

May  7 09:26:43 Leech3 rpc.statd[8198]: Version 1.0.11 Starting

May  7 09:26:44 Leech3 rpc.statd[8198]: gethostbyname error for Leech3

May  7 09:26:44 Leech3 exportfs[8205]: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.71:/diskless/192.168.1.71".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:26:44 Leech3 exportfs[8205]: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.68:/diskless/192.168.1.68".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:26:44 Leech3 exportfs[8205]: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/opt".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:26:44 Leech3 exportfs[8205]: /etc/exports [4]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/usr".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:26:44 Leech3 exportfs[8205]: /etc/exports [5]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/home".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:26:44 Leech3 exportfs[8205]: /etc/exports [6]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.71:/var/log".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:26:44 Leech3 rc-scripts: Error starting NFS mountd

May  7 09:26:44 Leech3 cron[8298]: (CRON) STARTUP (V5.0)

May  7 09:27:09 Leech3 login(pam_unix)[8379]: session opened for user root by (uid=0)

May  7 09:27:09 Leech3 login[8395]: ROOT LOGIN  on `tty1'

May  7 09:27:32 Leech3 gdm(pam_unix)[8401]: session opened for user root by (uid=0)

May  7 09:27:34 Leech3 (root-8460): starting (version 2.14.0), pid 8460 user 'root'

May  7 09:27:34 Leech3 (root-8460): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0

May  7 09:27:34 Leech3 (root-8460): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 1

May  7 09:27:34 Leech3 (root-8460): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2

May  7 09:27:41 Leech3 gnome-power-manager: (root) Critical error: This program cannot start until you start the dbus system service. It is <b>strongly recommended</b> you reboot your computer after starting this service.

May  7 09:27:42 Leech3 (root-8460): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 0

May  7 09:30:01 Leech3 cron[9502]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

May  7 09:34:18 Leech3 device eth1 entered promiscuous mode

May  7 09:34:18 Leech3 audit(1178530458.785:2): dev=eth1 prom=256 old_prom=0 auid=4294967295

May  7 09:40:01 Leech3 cron[14456]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

May  7 09:50:01 Leech3 cron[25250]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

May  7 09:52:13 Leech3 exportfs[25425]: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.71:/diskless/192.168.1.71".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:52:13 Leech3 exportfs[25425]: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.68:/diskless/192.168.1.68".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:52:13 Leech3 exportfs[25425]: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/opt".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:52:13 Leech3 exportfs[25425]: /etc/exports [4]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/usr".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:52:13 Leech3 exportfs[25425]: /etc/exports [5]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.0/24:/home".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:52:13 Leech3 exportfs[25425]: /etc/exports [6]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.71:/var/log".   Assuming default behaviour ('subtree_check').   NOTE: this default will change with nfs-utils version 1.1.0

May  7 09:57:03 Leech3 dhcpd: DHCPDISCOVER from 00:c0:9f:f4:c7:a6 via eth1: network 192.168.1/24: no free leases

May  7 09:57:05 Leech3 dhcpd: DHCPDISCOVER from 00:c0:9f:f4:c7:a6 via eth1: network 192.168.1/24: no free leases

May  7 09:57:09 Leech3 dhcpd: DHCPDISCOVER from 00:c0:9f:f4:c7:a6 via eth1: network 192.168.1/24: no free leases

May  7 09:57:17 Leech3 dhcpd: DHCPDISCOVER from 00:c0:9f:f4:c7:a6 via eth1: network 192.168.1/24: no free leases

May  7 10:00:01 Leech3 cron[25475]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )

May  7 10:00:01 Leech3 cron[25477]: (root) CMD (rm -f /var/spool/cron/lastrun/cron.hourly)

May  7 10:01:08 Leech3 rc-scripts: WARNING:  dhcpd has already been started.

----------

## UberLord

 *Gizmo89 wrote:*   

> what does this mean then?

 

# /etc/init.d/dhcpd start

 * Caching service dependencies ...

/etc/conf.d/net: line 5: syntax error near unexpected token `"192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255"'

/etc/conf.d/net: line 5: `config_eth1( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) '

/etc/conf.d/net: line 5: syntax error near unexpected token `"192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255"'

/etc/conf.d/net: line 5: `config_eth1( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) '

/etc/conf.d/net: line 5: syntax error near unexpected token `"192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255"'

/etc/conf.d/net: line 5: `config_eth1( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) '                                                         [ ok ]

 * WARNING:  dhcpd has already been started.

[/quote]

Someone forgot to put an = sign in their net config.

config_eth1=( "192.168.1.65 netmask 255.255.255.0 brd 192.168.1.255" ) 

 *Quote:*   

> 
> 
> May  7 09:57:03 Leech3 dhcpd: DHCPDISCOVER from 00:c0:9f:f4:c7:a6 via eth1: network 192.168.1/24: no free leases
> 
> May  7 09:57:05 Leech3 dhcpd: DHCPDISCOVER from 00:c0:9f:f4:c7:a6 via eth1: network 192.168.1/24: no free leases
> ...

 

That's the error, and maybe due to your net config error. Fix the first one, restart net.eth1, restart dhcpd and it may start working.

----------

