Skip to content

Commit

Permalink
package/skeleton-init-openrc: fix root filesystem ro/rw remount
Browse files Browse the repository at this point in the history
The regular expressions used in the sed commands assumes that there is a
space after '/dev/root' but the skeleton file contains a tab. Use a more
flexible '[[:blank:]]', instead.

Signed-off-by: Carlos Santos <[email protected]>
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
casantos authored and yann-morin-1998 committed Feb 24, 2020
1 parent 78a9eab commit c51c981
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/skeleton-init-openrc/skeleton-init-openrc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
# Comment /dev/root entry in fstab. When openrc does not find fstab entry for
# "/", it will try to remount "/" as "rw".
define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW
$(SED) '\:^/dev/root :s/^/# /' $(TARGET_DIR)/etc/fstab
$(SED) '\:^/dev/root[[:blank:]]:s/^/# /' $(TARGET_DIR)/etc/fstab
endef
else
# Uncomment /dev/root entry in fstab which has "ro" option so openrc notices
# it and doesn't remount root to rw.
define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW
$(SED) '\:^# /dev/root:s/^# //' $(TARGET_DIR)/etc/fstab
$(SED) '\:^#[[:blank:]]*/dev/root[[:blank:]]:s/^# //' $(TARGET_DIR)/etc/fstab
endef
endif # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW

Expand Down

0 comments on commit c51c981

Please sign in to comment.