]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rootfs-postcommands.bbclass: fix echo + '\n' in 'no password' banner
authorChen Qi <Qi.Chen@windriver.com>
Thu, 4 Dec 2025 08:32:07 +0000 (08:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Dec 2025 11:04:29 +0000 (11:04 +0000)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rootfs-postcommands.bbclass

index d3a569ba3ed3724add24432cd72041da611e844a..f4fbc4c57e78b958ef841df39e0a4c856b58264d 100644 (file)
@@ -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
 }
 
 #