aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2019-08-23 13:51:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-07 07:47:14 +0100
commit703e3faaec8c5a22fe3bc9a2a040c960862136c7 (patch)
treec7547c31576cda8f86a3eb0bf70a3ae7f8190683
parent805dd4807d322dc70cef97edd68fdb3142b60fb1 (diff)
downloadopenembedded-core-contrib-703e3faaec8c5a22fe3bc9a2a040c960862136c7.tar.gz
openembedded-core-contrib-703e3faaec8c5a22fe3bc9a2a040c960862136c7.tar.bz2
openembedded-core-contrib-703e3faaec8c5a22fe3bc9a2a040c960862136c7.zip
dropbear: don't create invalid symlinks if ssh, scp, etc are disabled
Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/dropbear/dropbear.inc11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index dcbda741c3..7269888a4e 100644
--- a/meta/recipes-core/dropbear/dropbear.inc
+++ b/meta/recipes-core/dropbear/dropbear.inc
@@ -70,8 +70,13 @@ do_install() {
install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
install -m 0755 dropbearmulti ${D}${sbindir}/
- ln -s ${sbindir}/dropbearmulti ${D}${bindir}/dbclient
+ for i in ${BINCOMMANDS}
+ do
+ # ssh and scp symlinks are created by update-alternatives
+ if [ $i = ssh ] || [ $i = scp ]; then continue; fi
+ ln -s ${sbindir}/dropbearmulti ${D}${bindir}/$i
+ done
for i in ${SBINCOMMANDS}
do
ln -s ./dropbearmulti ${D}${sbindir}/$i
@@ -101,7 +106,7 @@ do_install() {
inherit update-alternatives
ALTERNATIVE_PRIORITY = "20"
-ALTERNATIVE_${PN} = "scp ssh"
+ALTERNATIVE_${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}"
ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"
@@ -113,3 +118,5 @@ pkg_postrm_append_${PN} () {
rm ${sysconfdir}/dropbear/dropbear_dss_host_key
fi
}
+
+FILES_${PN} += "${bindir}"