diff --git a/init/builtins.cpp b/init/builtins.cpp index f3f04c2ad..ee83224a2 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -345,6 +345,11 @@ static int do_mkdir(const std::vector& args) { return 0; } +/* umount */ +static int do_umount(const std::vector& args) { + return umount(args[1].c_str()); +} + static struct { const char *name; unsigned flag; @@ -958,6 +963,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { {"mkdir", {1, 4, do_mkdir}}, {"mount_all", {1, kMax, do_mount_all}}, {"mount", {3, kMax, do_mount}}, + {"umount", {1, 1, do_umount}}, {"powerctl", {1, 1, do_powerctl}}, {"restart", {1, 1, do_restart}}, {"restorecon", {1, kMax, do_restorecon}}, diff --git a/init/readme.txt b/init/readme.txt index ef85ccf1f..4481e24ef 100644 --- a/init/readme.txt +++ b/init/readme.txt @@ -355,6 +355,9 @@ trigger Trigger an event. Used to queue an action from another action. +umount + Unmount the filesystem mounted at that path. + verity_load_state Internal implementation detail used to load dm-verity state.