fi
endef
+# Add /bin/{a,hu}sh to /etc/shells otherwise some login tools like dropbear
+# can reject the user connection. See man shells.
+define BUSYBOX_INSTALL_ADD_TO_SHELLS
+ if grep -q CONFIG_ASH=y $(@D)/.config; then \
+ grep -qsE '^/bin/ash$$' $(TARGET_DIR)/etc/shells \
+ || echo "/bin/ash" >> $(TARGET_DIR)/etc/shells; \
+ fi
+ if grep -q CONFIG_HUSH=y $(@D)/.config; then \
+ grep -qsE '^/bin/hush$$' $(TARGET_DIR)/etc/shells \
+ || echo "/bin/hush" >> $(TARGET_DIR)/etc/shells; \
+ fi
+endef
+BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_INSTALL_ADD_TO_SHELLS
+
# Enable "noclobber" in install.sh, to prevent BusyBox from overwriting any
# full-blown versions of apps installed by other packages with sym/hard links.
define BUSYBOX_NOCLOBBER_INSTALL