From: Chen Qi Date: Thu, 4 Dec 2025 08:32:07 +0000 (+0000) Subject: rootfs-postcommands.bbclass: fix echo + '\n' in 'no password' banner X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dfb6c79588ae5542260047c2cd10e9c0cec43be;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git rootfs-postcommands.bbclass: fix echo + '\n' in 'no password' banner 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 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- 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 } #