diff options
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index 498174a664..1d66a42953 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -84,7 +84,9 @@ systemd_create_users () { | |||
84 | # | 84 | # |
85 | read_only_rootfs_hook () { | 85 | read_only_rootfs_hook () { |
86 | # Tweak the mount option and fs_passno for rootfs in fstab | 86 | # Tweak the mount option and fs_passno for rootfs in fstab |
87 | sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab | 87 | if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then |
88 | sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab | ||
89 | fi | ||
88 | 90 | ||
89 | # If we're using openssh and the /etc/ssh directory has no pre-generated keys, | 91 | # If we're using openssh and the /etc/ssh directory has no pre-generated keys, |
90 | # we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly | 92 | # we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly |