summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2017-11-28 16:41:12 -0600
committerJohn Klug <john.klug@multitech.com>2017-11-28 16:42:44 -0600
commitfbdbd1251e1d4ae063e924873cf4f667731eb60c (patch)
tree107feeeef106634cc901d189b925afe3af6be80b
parent76ddf2d5c5b143b5651c73e3916d88c9dd783886 (diff)
downloadmeta-mlinux-fbdbd1251e1d4ae063e924873cf4f667731eb60c.tar.gz
meta-mlinux-fbdbd1251e1d4ae063e924873cf4f667731eb60c.tar.bz2
meta-mlinux-fbdbd1251e1d4ae063e924873cf4f667731eb60c.zip
Previous AEP compatibility incomplete, bail out on install if AEP in /etc/issue
-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"