[OE-core] [PATCH 11/13] dropbear: don't create invalid symlinks if ssh, scp, etc are disabled
Andre McCurdy
armccurdy at gmail.com
Fri Aug 23 20:51:42 UTC 2019
Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
---
meta/recipes-core/dropbear/dropbear.inc | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
index dcbda74..7269888 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}"
--
1.9.1
More information about the Openembedded-core
mailing list