[OpenWrt-Devel] [PATCH] fstools: allow to stack another overlay on top of existing one

Roman Yeryomin leroi.lists at gmail.com
Sat Dec 19 16:38:02 EST 2015

`mount_root ram' will pivot existing root to ram even if it was
overlayfs already. Useful when playing with new configurations
as it allows to preserve existing/stable configuration.

Signed-off-by: Roman Yeryomin <roman at advem.lv>
 mount_root.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mount_root.c b/mount_root.c
index 7b69c7f..bf70265 100644
--- a/mount_root.c
+++ b/mount_root.c
@@ -117,6 +117,8 @@ int main(int argc, char **argv)
 	if (argc < 2)
 		return start(argc, argv);
+	if (!strcmp(argv[1], "ram"))
+		return ramoverlay();
 	if (!strcmp(argv[1], "stop"))
 		return stop(argc, argv);
 	if (!strcmp(argv[1], "done"))
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list