Loading init/README.md +5 −1 Original line number Diff line number Diff line Loading @@ -280,6 +280,9 @@ Commands currently running, without disabling them. They can be restarted later using `class_start`. `class_restart <serviceclass>` > Restarts all services of the specified class. `copy <src> <dst>` > Copies a file. Similar to write, but useful for binary/large amounts of data. Loading Loading @@ -359,7 +362,8 @@ Commands "sys.powerctl" system property, used to implement rebooting. `restart <service>` > Like stop, but doesn't disable the service. > Stops and restarts a running service, does nothing if the service is currently restarting, otherwise, it just starts the service. `restorecon <path> [ <path>\* ]` > Restore the file named by _path_ to the security context specified Loading init/builtins.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,12 @@ static int do_class_reset(const std::vector<std::string>& args) { return 0; } static int do_class_restart(const std::vector<std::string>& args) { ServiceManager::GetInstance(). ForEachServiceInClass(args[1], [] (Service* s) { s->Restart(); }); return 0; } static int do_domainname(const std::vector<std::string>& args) { return write_file("/proc/sys/kernel/domainname", args[1].c_str()) ? 0 : 1; } Loading Loading @@ -897,6 +903,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { {"chmod", {2, 2, do_chmod}}, {"chown", {2, 3, do_chown}}, {"class_reset", {1, 1, do_class_reset}}, {"class_restart", {1, 1, do_class_restart}}, {"class_start", {1, 1, do_class_start}}, {"class_stop", {1, 1, do_class_stop}}, {"copy", {2, 2, do_copy}}, Loading Loading
init/README.md +5 −1 Original line number Diff line number Diff line Loading @@ -280,6 +280,9 @@ Commands currently running, without disabling them. They can be restarted later using `class_start`. `class_restart <serviceclass>` > Restarts all services of the specified class. `copy <src> <dst>` > Copies a file. Similar to write, but useful for binary/large amounts of data. Loading Loading @@ -359,7 +362,8 @@ Commands "sys.powerctl" system property, used to implement rebooting. `restart <service>` > Like stop, but doesn't disable the service. > Stops and restarts a running service, does nothing if the service is currently restarting, otherwise, it just starts the service. `restorecon <path> [ <path>\* ]` > Restore the file named by _path_ to the security context specified Loading
init/builtins.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,12 @@ static int do_class_reset(const std::vector<std::string>& args) { return 0; } static int do_class_restart(const std::vector<std::string>& args) { ServiceManager::GetInstance(). ForEachServiceInClass(args[1], [] (Service* s) { s->Restart(); }); return 0; } static int do_domainname(const std::vector<std::string>& args) { return write_file("/proc/sys/kernel/domainname", args[1].c_str()) ? 0 : 1; } Loading Loading @@ -897,6 +903,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { {"chmod", {2, 2, do_chmod}}, {"chown", {2, 3, do_chown}}, {"class_reset", {1, 1, do_class_reset}}, {"class_restart", {1, 1, do_class_restart}}, {"class_start", {1, 1, do_class_start}}, {"class_stop", {1, 1, do_class_stop}}, {"copy", {2, 2, do_copy}}, Loading