* [Buildroot] [PATCH] package/skeleton-init-openrc: fix root filesystem ro/rw remount
@ 2020-02-24 11:41 unixmania at gmail.com
2020-02-24 18:34 ` Yann E. MORIN
2020-03-14 16:28 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: unixmania at gmail.com @ 2020-02-24 11:41 UTC (permalink / raw)
To: buildroot
From: Carlos Santos <unixmania@gmail.com>
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 <unixmania@gmail.com>
---
package/skeleton-init-openrc/skeleton-init-openrc.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/skeleton-init-openrc/skeleton-init-openrc.mk b/package/skeleton-init-openrc/skeleton-init-openrc.mk
index 656fc531d7..b0538ad03f 100644
--- a/package/skeleton-init-openrc/skeleton-init-openrc.mk
+++ b/package/skeleton-init-openrc/skeleton-init-openrc.mk
@@ -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
--
2.18.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/skeleton-init-openrc: fix root filesystem ro/rw remount
2020-02-24 11:41 [Buildroot] [PATCH] package/skeleton-init-openrc: fix root filesystem ro/rw remount unixmania at gmail.com
@ 2020-02-24 18:34 ` Yann E. MORIN
2020-03-14 16:28 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2020-02-24 18:34 UTC (permalink / raw)
To: buildroot
Carlos, All,
On 2020-02-24 08:41 -0300, unixmania at gmail.com spake thusly:
> From: Carlos Santos <unixmania@gmail.com>
>
> 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 <unixmania@gmail.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> package/skeleton-init-openrc/skeleton-init-openrc.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/skeleton-init-openrc/skeleton-init-openrc.mk b/package/skeleton-init-openrc/skeleton-init-openrc.mk
> index 656fc531d7..b0538ad03f 100644
> --- a/package/skeleton-init-openrc/skeleton-init-openrc.mk
> +++ b/package/skeleton-init-openrc/skeleton-init-openrc.mk
> @@ -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
>
> --
> 2.18.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/skeleton-init-openrc: fix root filesystem ro/rw remount
2020-02-24 11:41 [Buildroot] [PATCH] package/skeleton-init-openrc: fix root filesystem ro/rw remount unixmania at gmail.com
2020-02-24 18:34 ` Yann E. MORIN
@ 2020-03-14 16:28 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-03-14 16:28 UTC (permalink / raw)
To: buildroot
>>>>> "unixmania" == unixmania <unixmania@gmail.com> writes:
> From: Carlos Santos <unixmania@gmail.com>
> 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 <unixmania@gmail.com>
Committed to 2019.11.x (not in 2019.02.x), thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-14 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24 11:41 [Buildroot] [PATCH] package/skeleton-init-openrc: fix root filesystem ro/rw remount unixmania at gmail.com
2020-02-24 18:34 ` Yann E. MORIN
2020-03-14 16:28 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox