`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 <[email protected]>
---
 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"))
-- 
2.5.0
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to