* Script being installed under /etc/init.d instead of /usr/lib/systemd folder
@ 2016-06-09 1:11 Dey, Megha
2016-06-14 15:32 ` piotr.lewicki
2016-06-14 16:41 ` Burton, Ross
0 siblings, 2 replies; 4+ messages in thread
From: Dey, Megha @ 2016-06-09 1:11 UTC (permalink / raw)
To: yocto@yoctoproject.org, poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]
Hi,
I am trying to use the systemd init system from the existing system. I have added the following to my conf file:
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
I have also added the 'systemd' binary to the INSTALL_APPEND.
When I boot the resulting image, I do see systemd up and running and I am able to start and stop services.
However, I do have a script recipe which is currently placed as a bbappend to initscripts (meta/recipes-core/initscripts/initscript_..bb) in my custom meta layer.
This script even after shifting to systemd, is being placed in the /etc/init.d/ folder, and hence doesn't run on boot. I want this to be placed in the /usr/lib/system.d/ folder instead. How would I be able to do this?
Is it because this script is an append to initscripts, it by default gets installed under /etc/init.d? If so, where should I place the recipe?
Thanks,
Megha
[-- Attachment #2: Type: text/html, Size: 3451 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Script being installed under /etc/init.d instead of /usr/lib/systemd folder
2016-06-09 1:11 Script being installed under /etc/init.d instead of /usr/lib/systemd folder Dey, Megha
@ 2016-06-14 15:32 ` piotr.lewicki
2016-06-14 16:41 ` Burton, Ross
1 sibling, 0 replies; 4+ messages in thread
From: piotr.lewicki @ 2016-06-14 15:32 UTC (permalink / raw)
To: Dey, Megha, yocto@yoctoproject.org, poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1886 bytes --]
Take a look at example from my some-recipe.bb
:
inherit systemd
SYSTEMD_SERVICE_${PN} = "some-recipe.service"
do_install_append () {
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${S}/configs/some-recipe.service
${D}${systemd_unitdir}/system
}
First in your recipe inherit from "systemd".
Then install your systemd service file in
"${D}${systemd_unitdir}/system" (there is also a variable for this
directory, I think it's ${systemd_system_unitdir} or something similar).
Remember to create a directory before placing a file there.
In the last step use "SYSTEMD_SERVICE_${PN}" where you specify systemd
services that should be run.
I hope that helps..
Best regards,
Piotr Lewicki
On 09.06.2016 03:11, Dey, Megha wrote:
>
> Hi,
>
> I am trying to use the systemd init system from the existing system. I
> have added the following to my conf file:
>
> DISTRO_FEATURES_append = " systemd"
>
> VIRTUAL-RUNTIME_init_manager = "systemd"
>
> VIRTUAL-RUNTIME_initscripts = ""
>
> DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
>
> I have also added the ‘systemd’ binary to the INSTALL_APPEND.
>
> When I boot the resulting image, I do see systemd up and running and I
> am able to start and stop services.
>
> However, I do have a script recipe which is currently placed as a
> bbappend to initscripts
> (meta/recipes-core/initscripts/initscript_..bb) in my custom meta layer.
>
> This script even after shifting to systemd, is being placed in the
> /etc/init.d/ folder, and hence doesn’t run on boot. I want this to be
> placed in the /usr/lib/system.d/ folder instead. How would I be able
> to do this?
>
> Is it because this script is an append to initscripts, it by default
> gets installed under /etc/init.d? If so, where should I place the recipe?
>
> Thanks,
>
> Megha
>
>
>
[-- Attachment #2: Type: text/html, Size: 4855 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [yocto] Script being installed under /etc/init.d instead of /usr/lib/systemd folder
2016-06-09 1:11 Script being installed under /etc/init.d instead of /usr/lib/systemd folder Dey, Megha
@ 2016-06-14 16:41 ` Burton, Ross
2016-06-14 16:41 ` Burton, Ross
1 sibling, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2016-06-14 16:41 UTC (permalink / raw)
To: Dey, Megha; +Cc: yocto@yoctoproject.org, poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
On 9 June 2016 at 02:11, Dey, Megha <megha.dey@intel.com> wrote:
> However, I do have a script recipe which is currently placed as a bbappend
> to initscripts (meta/recipes-core/initscripts/initscript_..bb) in my custom
> meta layer.
>
>
>
> This script even after shifting to systemd, is being placed in the
> /etc/init.d/ folder, and hence doesn’t run on boot. I want this to be
> placed in the /usr/lib/system.d/ folder instead. How would I be able to do
> this?
>
>
sysv-style init scripts go into /etc/init.d, systemd units do into
/lib/system.d As this is your append then it is up to you to place the
file in the right location.
If you're installing a traditional init script then /etc/init.d is the
right place for it to be installed, if you're attempting to install a
systemd unit then look at the documentation for the systemd class.
Ross
[-- Attachment #2: Type: text/html, Size: 1411 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Script being installed under /etc/init.d instead of /usr/lib/systemd folder
@ 2016-06-14 16:41 ` Burton, Ross
0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2016-06-14 16:41 UTC (permalink / raw)
To: Dey, Megha; +Cc: yocto@yoctoproject.org, poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 878 bytes --]
On 9 June 2016 at 02:11, Dey, Megha <megha.dey@intel.com> wrote:
> However, I do have a script recipe which is currently placed as a bbappend
> to initscripts (meta/recipes-core/initscripts/initscript_..bb) in my custom
> meta layer.
>
>
>
> This script even after shifting to systemd, is being placed in the
> /etc/init.d/ folder, and hence doesn’t run on boot. I want this to be
> placed in the /usr/lib/system.d/ folder instead. How would I be able to do
> this?
>
>
sysv-style init scripts go into /etc/init.d, systemd units do into
/lib/system.d As this is your append then it is up to you to place the
file in the right location.
If you're installing a traditional init script then /etc/init.d is the
right place for it to be installed, if you're attempting to install a
systemd unit then look at the documentation for the systemd class.
Ross
[-- Attachment #2: Type: text/html, Size: 1411 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-14 16:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 1:11 Script being installed under /etc/init.d instead of /usr/lib/systemd folder Dey, Megha
2016-06-14 15:32 ` piotr.lewicki
2016-06-14 16:41 ` [yocto] " Burton, Ross
2016-06-14 16:41 ` Burton, Ross
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.