diff mbox series

rootfs-postcommands: Remove dropbear inconsistent comment

Message ID 20220927103006.722389-1-daniel@qtec.com
State Accepted, archived
Commit cb80493fa8e2f4fc0f368b0f77ffb35c58ba5b40
Headers show
Series rootfs-postcommands: Remove dropbear inconsistent comment | expand

Commit Message

Daniel Gomez Sept. 27, 2022, 10:30 a.m. UTC
When allow-root-login, remove default dropbear comment 'Disallow
root'.

Signed-off-by: Daniel Gomez <daniel@qtec.com>
---
 meta/classes-recipe/rootfs-postcommands.bbclass | 1 +
 1 file changed, 1 insertion(+)

--
2.35.1
diff mbox series

Patch

diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass
index 74601f0829..690fa976aa 100644
--- a/meta/classes-recipe/rootfs-postcommands.bbclass
+++ b/meta/classes-recipe/rootfs-postcommands.bbclass
@@ -204,6 +204,7 @@  ssh_allow_root_login () {
 	if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
 		if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then
 			sed -i '/^DROPBEAR_EXTRA_ARGS=/ s/-w//' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
+			sed -i '/^# Disallow root/d' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
 		fi
 	fi
 }