David Oberhollenzer
25afc0b3d0
Remove ctrl+alt+del target, simply initiate reboot target
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00
David Oberhollenzer
ec74e5bbee
initd: restructure and merge service supervision code
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00
David Oberhollenzer
ed23d075ca
Make mksock() more generic, move to util library
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-09 15:32:29 +02:00
David Oberhollenzer
bf63f78b66
Split configuration parser and utility library
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-09 15:32:29 +02:00
David Oberhollenzer
59731dd69b
Add helper program for running services
...
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-22 13:41:18 +02:00
David Oberhollenzer
720220a3c3
Add flags to selectively skip fields in service files
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22 13:41:18 +02:00
David Oberhollenzer
2cb64e48fc
Move initd signal setup to platform specific file
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-15 13:24:13 +02:00
David Oberhollenzer
a3437967a2
Rely on PATH variable for running init programs
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 12:51:33 +02:00
David Oberhollenzer
55d4a328c9
Read environment for init from config file
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 12:05:15 +02:00
David Oberhollenzer
6642b2b2bf
Don't pre-allocate argument vector for command lines
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 19:45:26 +02:00
David Oberhollenzer
b81668e045
Minor cleanup
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-07 16:19:38 +02:00
David Oberhollenzer
43274e3910
Remove setup_tty function
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-07 01:33:58 +02:00
David Oberhollenzer
ffb655126a
Create init socket after reaching boot target
...
Filesystem might not be available before then.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-07 01:33:58 +02:00
David Oberhollenzer
04a23330e4
Merge preprocessing of command lines
...
- 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-04-04 14:58:01 +02:00
David Oberhollenzer
56e6004336
Simplifiy service file syntax
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 14:08:12 +02:00
David Oberhollenzer
160ef94e8b
Add service respawn limit
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-26 00:40:28 +02:00
David Oberhollenzer
09115f9a97
Print status when starting a service marked as respawn
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 22:07:33 +02:00
David Oberhollenzer
021f091082
Use services to implement shutdown/reboot sequence
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 13:28:07 +02:00
David Oberhollenzer
a71c92b33d
Unify naming of service to shorthand svc
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 12:14:06 +02:00
David Oberhollenzer
1b3b98135e
Add license headers and comments to source
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 22:50:28 +01:00
David Oberhollenzer
9a88f7da45
Initial commit
...
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-24 17:04:20 +01:00