aboutsummaryrefslogtreecommitdiff
path: root/initd/init.h
AgeCommit message (Collapse)Author
2020-04-24cleanup: merge runsvc back into initdDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-03-31cleanup: delete remains of libutilDavid Oberhollenzer
- exec_t belongs to service.h, the main place where it is used/needed - code for executing exec_t is moved to runsvc for the same reason - what is left are NORETURN and ARRAY_SIZE - the former can be replaced with direct attribute usage since the only relevant compilers all support the attribute. - the later is only used in 3 places and can be trivially replaced with direct usage of sizeof(). Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-03-31cleanup: initd: simplify and merge linux specific code into main.cDavid Oberhollenzer
Targetting anything else than Linux isn't really relevant. All other systems ($BSD and other Unices) are a closed ecosystem where kernel & userspace are developed together. They don't need something like a third party init system, so compatibillity can be largely ignored. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29cleanup: move init specific stuff of init socket to initdDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29Add service configuration reloadingDavid Oberhollenzer
This commit add the ability to initd to reload the service configuration while running. The new configuration is merged with the existing one as follows: For each target: - If the existing service list is not NULL, we have not started that target yet. Simply replace it with the new list. - If it is NULL, the services have already been started. - First, remove all entries for services in that target that no loner exist (except from the 'running' list). - Second, add new services that we don't have yet. Treat them as recently diseased and let the user start them manualy. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-28Add start/stop commands to init socketDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-27Add filter argument to status requestDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-18initd: implement handling of socket requestsDavid Oberhollenzer
Actually process requests and send an answer to status inquiries. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-18Add init socket to initdDavid Oberhollenzer
Create a socket if boot target is done. Close and reopen socket if SIGUSR1 is received. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2018-11-23Relicense what is left of the init system under OpenBSD style ISC licenseDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04Remove unused telinit codeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24initd: restructure and merge service supervision codeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-09Make mksock() more generic, move to util libraryDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22Add helper program for running servicesDavid Oberhollenzer
We no longer need to keep entire scripts in init program (i.e. saving space) and reduce the code and complexity of the init program. The runsvc tool can later be extended to do more complex child setup, such as configuring namespaces or seccomp without adding complexity or memory footprint to init. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-15Move initd signal setup to platform specific fileDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12Read environment for init from config fileDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-07Remove setup_tty functionDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04Merge preprocessing of command linesDavid Oberhollenzer
- Common function for splitting string into argument vector - Preprocess & split command lines while parsing the service file - Specify "before" and "after" dependencies in a single line Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25Print status when starting a service marked as respawnDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25Use services to implement shutdown/reboot sequenceDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24Add license headers and comments to sourceDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24Initial commitDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>