* # honister #systemd attempting to run script on boot...
@ 2022-10-11 19:54 Monsees, Steven C (US)
0 siblings, 0 replies; 2+ messages in thread
From: Monsees, Steven C (US) @ 2022-10-11 19:54 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]
I am trying to make use of system to run a test script at boot...
I can exercise my test_script/test_script.service manually using systemctl commands and it appears to work as expects.
I created a recipe based on this, it builds clean (no errors/warnings), but it doesn't appear to set things up correctly.
I have only recently begun working with honister, and new to systemd...
Could someone have look at my recipe & service file and see if they can spot anything ?
My recipe:
#
# This file is the my_test_script recipe.
#
SUMMARY = "Simple my_test_script application"
SECTION = "apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
inherit systemd
SRC_URI = "file://test_script.sh \
file://test_script.service"
S = "${WORKDIR}"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "test_script.service"
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/test_script.sh ${D}${bindir}
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${S}/test_script.service ${D}${systemd_system_unitdir}
}
FILES_${PN} = "${bindir}"
FILES_${PN} += "${systemd_system_unitdir}"
REQUIRED_DISTRO_FEATURES="systemd"
---
My test script service file:
[Unit]
Description=Configure test
[Service]
Type=oneshot
ExecStart=/usr/bin/test_script.sh start
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
---
My test script:
#!/bin/bash
# description: Description comes here....
echo "*******************************"
echo "START: Hello PetaLinux World :)"
date +"%m/%d/%Y %H:%M:%S $HOSTNAME"
echo "*******************************"
Thanks,
Steve
[-- Attachment #2: Type: text/html, Size: 6498 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: # honister #systemd attempting to run script on boot...
[not found] <MADEUP.171D1BE272B653C5.8969@lists.yoctoproject.org>
@ 2022-10-12 18:28 ` Monsees, Steven C (US)
0 siblings, 0 replies; 2+ messages in thread
From: Monsees, Steven C (US) @ 2022-10-12 18:28 UTC (permalink / raw)
To: Monsees, Steven C (US), yocto@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 2723 bytes --]
I have this working now…
Thanks Matt for spotting those honister config issues, that led led me to the heart of the problem…
Steve
From: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> On Behalf Of Monsees, Steven C (US) via lists.yoctoproject.org
Sent: Tuesday, October 11, 2022 3:55 PM
To: yocto@lists.yoctoproject.org
Subject: [yocto] # honister #systemd attempting to run script on boot...
External Email Alert
This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.
I am trying to make use of system to run a test script at boot…
I can exercise my test_script/test_script.service manually using systemctl commands and it appears to work as expects.
I created a recipe based on this, it builds clean (no errors/warnings), but it doesn’t appear to set things up correctly.
I have only recently begun working with honister, and new to systemd…
Could someone have look at my recipe & service file and see if they can spot anything ?
My recipe:
#
# This file is the my_test_script recipe.
#
SUMMARY = "Simple my_test_script application"
SECTION = "apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302<file://$%7bCOMMON_LICENSE_DIR%7d/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302>"
inherit systemd
SRC_URI = "file://test_script.sh \
file://test_script.service"
S = "${WORKDIR}"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "test_script.service"
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/test_script.sh ${D}${bindir}
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${S}/test_script.service ${D}${systemd_system_unitdir}
}
FILES_${PN} = "${bindir}"
FILES_${PN} += "${systemd_system_unitdir}"
REQUIRED_DISTRO_FEATURES="systemd"
---
My test script service file:
[Unit]
Description=Configure test
[Service]
Type=oneshot
ExecStart=/usr/bin/test_script.sh start
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
---
My test script:
#!/bin/bash
# description: Description comes here....
echo "*******************************"
echo "START: Hello PetaLinux World :)"
date +"%m/%d/%Y %H:%M:%S $HOSTNAME"
echo "*******************************"
Thanks,
Steve
[-- Attachment #2: Type: text/html, Size: 9897 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-12 18:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <MADEUP.171D1BE272B653C5.8969@lists.yoctoproject.org>
2022-10-12 18:28 ` # honister #systemd attempting to run script on boot Monsees, Steven C (US)
2022-10-11 19:54 Monsees, Steven C (US)
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.