summaryrefslogtreecommitdiff
path: root/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools')
-rwxr-xr-xrecipes-devtools/node-red/files/node-red.init5
-rw-r--r--recipes-devtools/node-red/node-red_0.15.3.bb17
2 files changed, 11 insertions, 11 deletions
diff --git a/recipes-devtools/node-red/files/node-red.init b/recipes-devtools/node-red/files/node-red.init
deleted file mode 100755
index 05df9ad..0000000
--- a/recipes-devtools/node-red/files/node-red.init
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-# This is a placeholder for AEP's init script to prevent
-# overwriting the node-red init script.
-# This file is not used in non-AEP node-red and should be ignored in all cases.
-true
diff --git a/recipes-devtools/node-red/node-red_0.15.3.bb b/recipes-devtools/node-red/node-red_0.15.3.bb
index dfe1539..e6ecc74 100644
--- a/recipes-devtools/node-red/node-red_0.15.3.bb
+++ b/recipes-devtools/node-red/node-red_0.15.3.bb
@@ -5,10 +5,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7ca
DEPENDS = "nodejs nodejs-native"
RDEPENDS_${PN} += "bash"
PR = "r0"
-SRC_URI += "file://node-red.init"
-# Added so we do not delete AEP file of same name.
-CONFFILES_${PN} += "${sysconfdir}/init.d/node-red"
inherit npm
S = "${WORKDIR}"
@@ -45,9 +42,17 @@ do_install() {
# install node-red
install -d ${D}/opt/node-red
cp -r ./node_modules/node-red/* ${D}/opt/node-red/
- # AEP package compatibility
- install -d -m 0755 ${D}${sysconfdir}/init.d/
- install -m 0755 ${S}/node-red.init ${D}${sysconfdir}/init.d/node-red
+}
+pkg_preinst_${PN}() {
+ if grep 'Application Execution Platform with mLinux' /etc/issue ; then
+ ((aep=1))
+ fi
+ ls /etc/init.d >/tmp/init.txt
+
+ if ((aep == 1)) ; then
+ logger -t opkg -s -p user.error 'Application Execution Platform detected in /etc/issue -- this node-red package is for mLinux not AEP'
+ exit 1
+ fi
}
FILES_${PN} += "/opt/node-red"