package/dropbear: use BR2_SYSTEM_DEFAULT_PATH as default PATH
authorMarkus Mayer <mmayer@broadcom.com>
Thu, 20 Dec 2018 17:58:14 +0000 (09:58 -0800)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 31 Dec 2018 13:33:33 +0000 (14:33 +0100)
We use the configuration option $(BR2_SYSTEM_DEFAULT_PATH) to set the
default PATH in dropbear sessions.

$(BR2_SYSTEM_DEFAULT_PATH) is a Kconfig string. So it is already
quoted, which is exactly what we want.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/dropbear/dropbear.mk

index 7b1468cfb1001227fc37179b18a9e68e07800ebe..a5a8243bd431b429f65749bcee4fb2ae9cea32f0 100644 (file)
@@ -81,6 +81,12 @@ define DROPBEAR_DISABLE_STANDALONE
        echo '#define NON_INETD_MODE 0'                 >> $(@D)/localoptions.h
 endef
 
+define DROPBEAR_CUSTOM_PATH
+       echo '#define DEFAULT_PATH $(BR2_SYSTEM_DEFAULT_PATH)' >>$(@D)/localoptions.h
+endef
+
+DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_CUSTOM_PATH
+
 define DROPBEAR_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 644 package/dropbear/dropbear.service \
                $(TARGET_DIR)/usr/lib/systemd/system/dropbear.service