All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH V4 1/2] rootfs-postcommands.bbclass: fix echo + '\n' in 'no password' banner
@ 2025-12-01  5:25 Qi.Chen
  2025-12-01  5:25 ` [OE-core][PATCH V4 2/2] rootfs-postcommands.bbclass: fix adding " Qi.Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Qi.Chen @ 2025-12-01  5:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: alex

From: Chen Qi <Qi.Chen@windriver.com>

The '\n' means hostname instead of new line in /etc/issues.

bash and dash have different behavior on echo + '\n'.
So we avoid this '\n' and use an extra echo "" instead.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes-recipe/rootfs-postcommands.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass
index d3a569ba3e..f4fbc4c57e 100644
--- a/meta/classes-recipe/rootfs-postcommands.bbclass
+++ b/meta/classes-recipe/rootfs-postcommands.bbclass
@@ -259,7 +259,8 @@ zap_empty_root_password () {
 # This function adds a note to the login banner that the system is configured for root logins without password
 #
 add_empty_root_password_note () {
-	echo "Type 'root' to login with superuser privileges (no password will be asked).\n" >> ${IMAGE_ROOTFS}/etc/issue
+	echo "Type 'root' to login with superuser privileges (no password will be asked)." >> ${IMAGE_ROOTFS}/etc/issue
+	echo "" >> ${IMAGE_ROOTFS}/etc/issue
 }
 
 #
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-04  3:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-01  5:25 [OE-core][PATCH V4 1/2] rootfs-postcommands.bbclass: fix echo + '\n' in 'no password' banner Qi.Chen
2025-12-01  5:25 ` [OE-core][PATCH V4 2/2] rootfs-postcommands.bbclass: fix adding " Qi.Chen
2025-12-01 11:05   ` Alexander Kanavin
2025-12-03 19:37   ` Mathieu Dubois-Briand
2025-12-04  3:13     ` Chen, Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.