Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

/etc/init.d/tc-config: line 614: /etc/init.d/dhcp.sh: not found #1229

Open
simonvanderveldt opened this issue Dec 30, 2016 · 1 comment
Open
Labels
question Usability question, not directly related to an error with Boot2Docker

Comments

@simonvanderveldt
Copy link
Contributor

simonvanderveldt commented Dec 30, 2016

During booting the following error is thrown:

/etc/init.d/tc-config: line 614: /etc/init.d/dhcp.sh: not found

Obviously there shouldn't be any errors during normal boot.

This is caused by the fact that tc-config expects /etc/init.d/dhcp.sh but that file doesn't exist anymore because it's moved to /etc/rc.d/dhcp.sh during the build. AFAIK this was done in #960. I don't think simply moving this file is the correct solution, which was already kind of hinted at in #960 by @SvenDowideit

The current tc-config includes a wrapper to wrap the async dhcp.sh to wait for either an interface with a broadcast address or until a ping succeeds.
It will only use this wrapper when either a tiny core extension is loaded during startup using tftplist/httplist or when an NFS or NBD mount is used.
Also, there's an option to disable triggering DHCP entirely from tc-config (which will obviously only work when not using any of the above 3 extra options) called nodhcp.

Since by default we don't use any of these but we do want a guarantee that there's a DHCP lease before running other commands I believe we have the following options:

  • Patch /etc/init.d/dhcp.sp to not run async (ie change udhcpc -b to udhcpd -A <seconds>)
  • Patch tc-config to always execute the wait4Server() function. Since tc-config calls bootsync.sh it'll always be done before our custom actions are executed
  • Use nodhcp to disable DHCP in tc-config and run either udhcpc -A <seconds>, which blocks/waits for <seconds> waiting to obtain the lease or wait4Server() from tc-config in bootsync.sh/bootscript.sh before running any other custom actions

If someone has a better idea please let me know :)

@simonvanderveldt simonvanderveldt changed the title /etc/init.d/tc-config: line 614: /etc/init.d/dhcp.sh: not found /etc/init.d/tc-config: line 614: /etc/init.d/dhcp.sh: not found Dec 30, 2016
@simonvanderveldt
Copy link
Contributor Author

Sample implementation of patching dhcp.sh can be found here simonvanderveldt@86bd92f

@wglambert wglambert added the question Usability question, not directly related to an error with Boot2Docker label Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Usability question, not directly related to an error with Boot2Docker
Projects
None yet
Development

No branches or pull requests

2 participants