All of lore.kernel.org
 help / color / mirror / Atom feed
* dhcp-server and init scripts
@ 2012-12-03 19:01 r10kindsofpeople
  2012-12-03 19:13 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: r10kindsofpeople @ 2012-12-03 19:01 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]

I seem to have figured out how to add the dhcp-server to my image,
including my own dhcpd.conf and default-server files by creating a
"dhcp_4.2.4-P1.bbappend" recipe.  Everything works, except the dhcp-server
doesn't run on boot.

If I login and run "update-rc.d dhcp-server defaults" on the target, then
it creates the entries in /etc/rc0.d (etc) and the service starts on the
next boot.

The question is, how can I get bitbake to create those entries when it
creates the image?  I'm open to completely different ways of going about
this as well.  Looking at other recipes, I thought this recipe would do,
but it doesn't:

{named dhcp_4.2.4-P1.bbappend}
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

inherit update-rc.d

INITSCRIPT_NAME = "dhcp-server"
INITSCRIPT_PARAMS = "defaults"

# Not sure this is needed, since I'm not adding files, just replacing the
default copies
SRC_URI += "file://dhcpd.conf \
                     file://default-server \
                     "
{end file}

I'm using the 8.0 "danny" release with Crown-bay BSP.  The "layer.conf"
file includes IMAGE_INSTALL_append = " dhcp-server" (among other things).

Thanks in advance for any assistance you can offer,

John

[-- Attachment #2: Type: text/html, Size: 1595 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dhcp-server and init scripts
  2012-12-03 19:01 dhcp-server and init scripts r10kindsofpeople
@ 2012-12-03 19:13 ` Gary Thomas
  2012-12-03 19:37   ` r10kindsofpeople
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Thomas @ 2012-12-03 19:13 UTC (permalink / raw)
  To: yocto

On 2012-12-03 12:01, r10kindsofpeople wrote:
> I seem to have figured out how to add the dhcp-server to my image, including my own dhcpd.conf and default-server files by creating a "dhcp_4.2.4-P1.bbappend" recipe.  Everything
> works, except the dhcp-server doesn't run on boot.
>
> If I login and run "update-rc.d dhcp-server defaults" on the target, then it creates the entries in /etc/rc0.d (etc) and the service starts on the next boot.
>
> The question is, how can I get bitbake to create those entries when it creates the image?  I'm open to completely different ways of going about this as well.  Looking at other
> recipes, I thought this recipe would do, but it doesn't:
>
> {named dhcp_4.2.4-P1.bbappend}
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>
> inherit update-rc.d
>
> INITSCRIPT_NAME = "dhcp-server"
> INITSCRIPT_PARAMS = "defaults"
>
> # Not sure this is needed, since I'm not adding files, just replacing the default copies
> SRC_URI += "file://dhcpd.conf \
>                       file://default-server \
>                       "
> {end file}
>
> I'm using the 8.0 "danny" release with Crown-bay BSP.  The "layer.conf" file includes IMAGE_INSTALL_append = " dhcp-server" (among other things).
>
> Thanks in advance for any assistance you can offer,

You just missed one piece.  I have this working using these extra lines in my .bbappend:

inherit update-rc.d
INITSCRIPT_PACKAGES = "dhcp-server"
INITSCRIPT_NAME = "dhcp-server"
INITSCRIPT_PARAMS = "start 50 S . stop 50 0 6 1 ."

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dhcp-server and init scripts
  2012-12-03 19:13 ` Gary Thomas
@ 2012-12-03 19:37   ` r10kindsofpeople
  0 siblings, 0 replies; 3+ messages in thread
From: r10kindsofpeople @ 2012-12-03 19:37 UTC (permalink / raw)
  To: Gary Thomas, yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]

Thanks, Gary!  That did the trick.

John


On Mon, Dec 3, 2012 at 2:13 PM, Gary Thomas <gary@mlbassoc.com> wrote:

> On 2012-12-03 12:01, r10kindsofpeople wrote:
>
>> I seem to have figured out how to add the dhcp-server to my image,
>> including my own dhcpd.conf and default-server files by creating a
>> "dhcp_4.2.4-P1.bbappend" recipe.  Everything
>> works, except the dhcp-server doesn't run on boot.
>>
>> If I login and run "update-rc.d dhcp-server defaults" on the target, then
>> it creates the entries in /etc/rc0.d (etc) and the service starts on the
>> next boot.
>>
>> The question is, how can I get bitbake to create those entries when it
>> creates the image?  I'm open to completely different ways of going about
>> this as well.  Looking at other
>> recipes, I thought this recipe would do, but it doesn't:
>>
>> {named dhcp_4.2.4-P1.bbappend}
>> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>>
>> inherit update-rc.d
>>
>> INITSCRIPT_NAME = "dhcp-server"
>> INITSCRIPT_PARAMS = "defaults"
>>
>> # Not sure this is needed, since I'm not adding files, just replacing the
>> default copies
>> SRC_URI += "file://dhcpd.conf \
>>                       file://default-server \
>>                       "
>> {end file}
>>
>> I'm using the 8.0 "danny" release with Crown-bay BSP.  The "layer.conf"
>> file includes IMAGE_INSTALL_append = " dhcp-server" (among other things).
>>
>> Thanks in advance for any assistance you can offer,
>>
>
> You just missed one piece.  I have this working using these extra lines in
> my .bbappend:
>
> inherit update-rc.d
> INITSCRIPT_PACKAGES = "dhcp-server"
> INITSCRIPT_NAME = "dhcp-server"
> INITSCRIPT_PARAMS = "start 50 S . stop 50 0 6 1 ."
>
> --
> ------------------------------**------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------**------------------------------
> ______________________________**_________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.**org/listinfo/yocto<https://lists.yoctoproject.org/listinfo/yocto>
>

[-- Attachment #2: Type: text/html, Size: 2984 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-03 19:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03 19:01 dhcp-server and init scripts r10kindsofpeople
2012-12-03 19:13 ` Gary Thomas
2012-12-03 19:37   ` r10kindsofpeople

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.