diff options
author | Jonathan Liu <net147@gmail.com> | 2014-04-10 18:24:19 +1000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-10 17:35:15 +0100 |
commit | b24f5e8252a2b3f176f03e19fef1d2cda28ef77c (patch) | |
tree | 35b7c600ccc10f247471ea2603210d74e11b694d /meta/classes/image.bbclass | |
parent | db80f796e78746014a0f9497638e5c6fd2953ef0 (diff) | |
download | poky-b24f5e8252a2b3f176f03e19fef1d2cda28ef77c.tar.gz |
image.bbclass: improve sed expressions for ssh_allow_empty_password()
The sed expression was also replacing documentation text containing
PermitRootLogin in the line so "PermitRootLogin yes" was specified
twice.
(From OE-Core rev: 0572196158d9505a624bdee71760978f284728b0)
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r-- | meta/classes/image.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 32df01d2b3..79de5a2cae 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
@@ -285,8 +285,8 @@ zap_empty_root_password () { | |||
285 | # allow dropbear/openssh to accept root logins and logins from accounts with an empty password string | 285 | # allow dropbear/openssh to accept root logins and logins from accounts with an empty password string |
286 | ssh_allow_empty_password () { | 286 | ssh_allow_empty_password () { |
287 | if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then | 287 | if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then |
288 | sed -i 's#.*PermitRootLogin.*#PermitRootLogin yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config | 288 | sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config |
289 | sed -i 's#.*PermitEmptyPasswords.*#PermitEmptyPasswords yes#' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config | 289 | sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config |
290 | fi | 290 | fi |
291 | 291 | ||
292 | if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then | 292 | if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then |