diff options
Diffstat (limited to 'package/dropbear')
-rw-r--r-- | package/dropbear/Config.in | 8 | ||||
-rw-r--r-- | package/dropbear/dropbear.mk | 40 |
2 files changed, 30 insertions, 18 deletions
diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in index 20469f8b2..e47ba4545 100644 --- a/package/dropbear/Config.in +++ b/package/dropbear/Config.in @@ -5,3 +5,11 @@ config BR2_PACKAGE_DROPBEAR A small SSH 2 server designed for small memory environments. http://matt.ucc.asn.au/dropbear/dropbear.html + +config BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS + bool "disable reverse DNS lookups" + depends on BR2_PACKAGE_DROPBEAR + help + Disable reverse DNS lookups on connection. This can be handy + on systems without working DNS, as connections otherwise + stall until DNS times out. diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk index c73525b04..0457935b9 100644 --- a/package/dropbear/dropbear.mk +++ b/package/dropbear/dropbear.mk @@ -17,30 +17,34 @@ DROPBEAR_CONF_ENV = ac_cv_type_struct_sockaddr_storage=yes DROPBEAR_MAKE = $(MAKE) MULTI=1 SCPPROGRESS=1 \ PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" -$(eval $(call AUTOTARGETS,package,dropbear)) +define DROPBEAR_FIX_XAUTH + $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h +endef + +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_AUTH + +define DROPBEAR_DISABLE_REVERSE_DNS + $(SED) 's,^#define DO_HOST_LOOKUP.*,/* #define DO_HOST_LOOKUP */,' $(@D)/options.h +endef -$(DROPBEAR_HOOK_POST_EXTRACT): - $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(DROPBEAR_DIR)/options.h - touch $@ - -$(DROPBEAR_TARGET_INSTALL_TARGET): - $(call MESSAGE,"Installing to target") - $(INSTALL) -m 755 $(DROPBEAR_DIR)/dropbearmulti \ - $(TARGET_DIR)/usr/sbin/dropbear - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dbclient - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearkey - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearconvert - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/scp - ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/ssh +ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),y) +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_REVERSE_DNS +endif + +define DROPBEAR_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear + for f in $(DROPBEAR_TARGET_BINS); do \ + ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \ + done if [ ! -f $(TARGET_DIR)/etc/init.d/S50dropbear ]; then \ $(INSTALL) -m 0755 -D package/dropbear/S50dropbear $(TARGET_DIR)/etc/init.d/S50dropbear; \ fi - touch $@ +endef -$(DROPBEAR_TARGET_UNINSTALL): - $(call MESSAGE,"Uninstalling") +define DROPBEAR_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/sbin/dropbear rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(DROPBEAR_TARGET_BINS)) rm -f $(TARGET_DIR)/etc/init.d/S50dropbear - rm -f $(DROPBEAR_TARGET_INSTALL_TARGET) $(DROPBEAR_HOOK_POST_INSTALL) +endef +$(eval $(call AUTOTARGETS,package,dropbear)) |