bt-enable: unbreak initscript
PATCH 1/2 bt-enable: unbreak initscript
From: Denys Dmytriyenko <[email protected]>
This was using a SysVinit initscript that was also called from a systemd unit file when systemd-compat-units were enabled. With systemd and SysVinit now fully separated in Arago, adjust initscripts accordingly to work for both init managers.
Signed-off-by Denys Dmytriyenko <[email protected]>
--- .../recipes-connectivity/bt-enable/bt-enable.bb | 16 +++++++++++----- .../bt-enable/bt-enable/bt-enable.service | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-)
meta-arago-distro/recipes-connectivity/bt-enable/bt-enable.bb +11 -5
@@ -21,9 +21,15 @@ SYSTEMD_SERVICE:${PN} = "bt-enable.service" RDEPENDS:${PN} += "bash" do_install () { - install -d ${D}${sysconfdir}/init.d - install -m 0755 bt-enable.sh ${D}${sysconfdir}/init.d/ - - install -d ${D}${systemd_system_unitdir} - install -m0644 bt-enable.service ${D}${systemd_system_unitdir} + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 bt-enable.sh ${D}${sysconfdir}/init.d/ + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${bindir} + install -d ${D}${systemd_system_unitdir} + install -m 0755 bt-enable.sh ${D}${bindir} + install -m 0644 bt-enable.service ${D}${systemd_system_unitdir} + fi }
meta-arago-distro/recipes-connectivity/bt-enable/bt-enable/bt-enable.service +2 -2
@@ -4,8 +4,8 @@ After=network.target [Service] Type=oneshot -ExecStart=/etc/init.d/bt-enable.sh -WorkingDirectory=/etc/init.d +ExecStart=/usr/bin/bt-enable.sh +WorkingDirectory=/usr/bin StandardOutput=syslog [Install]
Signature · 1 line
2.35.3
PATCH 2/2 arago-gpl-notice: unbreak initscript
From: Denys Dmytriyenko <[email protected]>
This was using a SysVinit initscript that was also called from a systemd unit file when systemd-compat-units were enabled. With systemd and SysVinit now fully separated in Arago, adjust initscripts accordingly to work for both init managers.
Signed-off-by Denys Dmytriyenko <[email protected]>
--- .../arago-gpl-notice/arago-gpl-notice.bb | 16 +++++++++++----- .../arago-gpl-notice/gplv3-notice.service | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-)
meta-arago-distro/recipes-core/arago-gpl-notice/arago-gpl-notice.bb +11 -5
@@ -15,11 +15,17 @@ SRC_URI = " file://print-gplv3-packages.sh \ file://gplv3-notice.service" do_install(){ - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${S}/print-gplv3-packages.sh ${D}${sysconfdir}/init.d/gplv3-notice - - install -d ${D}${systemd_system_unitdir} - install -m0644 ${WORKDIR}/gplv3-notice.service ${D}${systemd_system_unitdir} + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${S}/print-gplv3-packages.sh ${D}${sysconfdir}/init.d/gplv3-notice + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${bindir} + install -d ${D}${systemd_system_unitdir} + install -m 0755 ${S}/print-gplv3-packages.sh ${D}${bindir}/gplv3-notice + install -m 0644 ${WORKDIR}/gplv3-notice.service ${D}${systemd_system_unitdir} + fi } SYSTEMD_SERVICE:${PN} = "gplv3-notice.service"
meta-arago-distro/recipes-core/arago-gpl-notice/arago-gpl-notice/gplv3-notice.service +2 -2
@@ -3,8 +3,8 @@ Description=Print notice about GPLv3 packages [Service] Type=oneshot -ExecStart=/etc/init.d/gplv3-notice -WorkingDirectory=/etc/init.d +ExecStart=/usr/bin/gplv3-notice +WorkingDirectory=/usr/bin StandardOutput=tty [Install]
Signature · 1 line
2.35.3