[Buildroot] [PATCH 4/4] dropbear: use BR2_SYSTEM_DEFAULT_PATH as default PATH

Markus Mayer mmayer at broadcom.com
Tue Dec 18 00:51:16 UTC 2018


We use the configuration option BR2_SYSTEM_DEFAULT_PATH to set the
default PATH in dropbear sessions.

Signed-off-by: Markus Mayer <mmayer at broadcom.com>
---
 package/dropbear/dropbear.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index 7b1468cfb100..7dc5f46bcc81 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -81,6 +81,14 @@ define DROPBEAR_DISABLE_STANDALONE
 	echo '#define NON_INETD_MODE 0'                 >> $(@D)/localoptions.h
 endef
 
+ifneq ($(BR2_SYSTEM_DEFAULT_PATH),"")
+define DROPBEAR_CUSTOM_PATH
+	echo '#define DEFAULT_PATH $(BR2_SYSTEM_DEFAULT_PATH)' >>$(@D)/localoptions.h
+endef
+
+DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_CUSTOM_PATH
+endif
+
 define DROPBEAR_INSTALL_INIT_SYSTEMD
 	$(INSTALL) -D -m 644 package/dropbear/dropbear.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/dropbear.service
-- 
2.17.1



More information about the buildroot mailing list