]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blobdiff - package/dash/dash.mk
package/dash: add /etc/dash to /etc/shells
[coffee/buildroot.git] / package / dash / dash.mk
index 2ee292b8d3e7e8d262aad16c09c1c2e90fb2d71f..9a26ebb642c3c0202fedb91c1bc67c09f5cfe2ab 100644 (file)
@@ -28,4 +28,12 @@ define DASH_INSTALL_TARGET_CMDS
        $(INSTALL) -m 0755 $(@D)/src/dash $(TARGET_DIR)/bin/dash
 endef
 
+# Add /bin/dash to /etc/shells otherwise some login tools like dropbear
+# can reject the user connection. See man shells.
+define DASH_ADD_DASH_TO_SHELLS
+       grep -qsE '^/bin/dash$$' $(TARGET_DIR)/etc/shells \
+               || echo "/bin/dash" >> $(TARGET_DIR)/etc/shells
+endef
+DASH_TARGET_FINALIZE_HOOKS += DASH_ADD_DASH_TO_SHELLS
+
 $(eval $(autotools-package))