fstools: allow to stack another overlay on top of existing one
authorRoman Yeryomin <leroi.lists@gmail.com>
Sat, 19 Dec 2015 21:38:02 +0000 (23:38 +0200)
committerJohn Crispin <blogic@openwrt.org>
Sun, 20 Dec 2015 12:57:17 +0000 (13:57 +0100)
`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@advem.lv>
mount_root.c

index 7b69c7f4612110d4408a1d3b0a84a27ce3fdc455..bf70265d45cc49568562e58ecfe6bd6cf41929be 100644 (file)
@@ -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"))