On Mon, Aug 20, 2018 at 9:50 AM, Ari-Pekka Sihvonen <
asi...@iki.fi> wrote:
> So instead of this:
>
> inherit mender-state-scripts
>
> FILES_${PN}+="/etc/mender/scripts/*"
> FILES_${PN}+="/var/lib/mender/scripts/*"
>
> RDEPENDS_${PN}+="python"
>
> do_install() {
> install -d ${D}/etc/mender/scripts/
> install -d ${D}/var/lib/mender/scripts/
> install -m 755 ${DEV}../scripts/* ${D}/etc/mender/scripts/
> install -m 755 ${DEV}../scripts/* ${D}/var/lib/mender/scripts/
> }
>
> I should:
> inherit mender-state-scripts
>
> FILES_${PN}+="/etc/mender/scripts/*"
> FILES_${PN}+="/var/lib/mender/scripts/*"
>
> RDEPENDS_${PN}+="python"
>
> do_install() {
> install -d ${D}/etc/mender/scripts/
> install -d ${D}/var/lib/mender/scripts/
> install -m 755 ${DEV}../scripts/* ${MENDER_STATE_SCRIPTS_DIR}
>
> }
You are not providing the full-context, but yeah something like that.
You can even reduce it to:
inherit mender-state-scripts
do_install() {
install -m 755 ${DEV}../scripts/* ${MENDER_STATE_SCRIPTS_DIR}
}
The "mender-state-script" class will put it at the correct location
based on the script name, e.g if the state scripts starts with
Artifact it will put it in the artifact (-s option to mender-artifact
tool) otherwise it will install them to /etc/mender/scripts.