mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
SystemServer: Add BootModes and Environment service options
SystemServer will now look at the boot mode, as specified on the kernel command line, and only launch the services configured for that boot mode.
This commit is contained in:
parent
df128821b2
commit
856e4853f4
4 changed files with 53 additions and 28 deletions
|
@ -36,6 +36,7 @@ class Service final : public Core::Object {
|
|||
C_OBJECT(Service)
|
||||
|
||||
public:
|
||||
bool is_enabled() const;
|
||||
void activate();
|
||||
void did_exit(int exit_code);
|
||||
|
||||
|
@ -68,6 +69,12 @@ private:
|
|||
uid_t m_uid { 0 };
|
||||
gid_t m_gid { 0 };
|
||||
Vector<gid_t> m_extra_gids;
|
||||
// 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;
|
||||
// Environment variables to pass to the service.
|
||||
Vector<String> m_environment;
|
||||
|
||||
// PID of the running instance of this service.
|
||||
pid_t m_pid { -1 };
|
||||
|
@ -81,9 +88,6 @@ private:
|
|||
// times where it has exited unsuccessfully and too quickly.
|
||||
int m_restart_attempts { 0 };
|
||||
|
||||
// The working directory in which to spawn the service
|
||||
String m_working_directory;
|
||||
|
||||
void resolve_user();
|
||||
void setup_socket();
|
||||
void setup_notifier();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue