Skip to contentSkip to conversation

package/skeleton-init-openrc: fix root filesystem ro/rw remount

PATCH New unixmania at gmail.com 3 participants 3 messages Feb 24, 2020 – Mar 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/skeleton-init-openrc: fix root filesystem ro/rw remount

From: Carlos Santos <[email protected]>

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.

---
 package/skeleton-init-openrc/skeleton-init-openrc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/skeleton-init-openrc/skeleton-init-openrc.mk +2 -2
index 656fc531d7..b0538ad03f 100644
@@ -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
 
Signature · 1 line
2.18.2
#1 lore raw

PATCH 1/1 package/skeleton-init-openrc: fix root filesystem ro/rw remount

Carlos, All,

On 2020-02-24 08:41 -0300, unixmania at gmail.com spake thusly:

Quoted 7 lines

From: Carlos Santos <[email protected]>

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.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 31 lines
---
 package/skeleton-init-openrc/skeleton-init-openrc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/skeleton-init-openrc/skeleton-init-openrc.mk +2 -2
index 656fc531d7..b0538ad03f 100644
@@ -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
 
Signature · 6 lines
2.18.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/skeleton-init-openrc: fix root filesystem ro/rw remount

In reply to unixmania at gmail.com
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"unixmania" == unixmania <[email protected]> writes:

From: Carlos Santos <[email protected]>
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.

Committed to 2019.11.x (not in 2019.02.x), thanks.

Signature · 1 line
Bye, Peter Korsgaard