1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:27:36 +00:00

SystemServer: Rename 'BootModes' config option to 'SystemModes'

This commit is contained in:
Ben Wiederhake 2021-10-23 19:15:01 +02:00 committed by Andreas Kling
parent 8d13f6ddce
commit 3d855a801b
5 changed files with 24 additions and 24 deletions

View file

@ -314,7 +314,7 @@ Service::Service(const Core::ConfigFile& config, const StringView& name)
m_working_directory = config.read_entry(name, "WorkingDirectory");
m_environment = config.read_entry(name, "Environment").split(' ');
m_boot_modes = config.read_entry(name, "BootModes", "graphical").split(',');
m_system_modes = config.read_entry(name, "SystemModes", "graphical").split(',');
m_multi_instance = config.read_bool_entry(name, "MultiInstance");
m_accept_socket_connections = config.read_bool_entry(name, "AcceptSocketConnections");
@ -366,14 +366,14 @@ void Service::save_to(JsonObject& json)
extra_args.append(arg);
json.set("extra_arguments", move(extra_args));
JsonArray boot_modes;
for (String& mode : m_boot_modes)
boot_modes.append(mode);
json.set("boot_modes", boot_modes);
JsonArray system_modes;
for (String& mode : m_system_modes)
system_modes.append(mode);
json.set("system_modes", system_modes);
JsonArray environment;
for (String& env : m_environment)
boot_modes.append(env);
system_modes.append(env);
json.set("environment", environment);
JsonArray sockets;
@ -406,5 +406,5 @@ void Service::save_to(JsonObject& json)
bool Service::is_enabled() const
{
extern String g_system_mode;
return m_boot_modes.contains_slow(g_system_mode);
return m_system_modes.contains_slow(g_system_mode);
}

View file

@ -61,8 +61,8 @@ private:
String m_user;
// The working directory in which to spawn the service.
String m_working_directory;
// Boot modes to run this service in. By default, this is the graphical mode.
Vector<String> m_boot_modes;
// System modes in which to run this service. By default, this is the graphical mode.
Vector<String> m_system_modes;
// Whether several instances of this service can run at once.
bool m_multi_instance { false };
// Environment variables to pass to the service.