1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-16 16:57:09 +01:00
Commit graph

53 commits

Author SHA1 Message Date
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
6e839a4ad5 Bump version number
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14 23:01:52 +02:00
David Oberhollenzer
4af420f9d7 Add documentation stuff to EXTRA_DIST
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14 23:01:04 +02:00
David Oberhollenzer
2ad281aac2 Mention environment variables
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14 22:47:15 +02:00
David Oberhollenzer
cd946f0b9c Add basic documentation stub
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14 21:39:40 +02:00
David Oberhollenzer
0b3f53cd9f Let autoconf figure out how to set the language standard
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 13:23:49 +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
82cd18107f Add more compiler warning flags
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 10:29:15 +02:00
David Oberhollenzer
6cf0a254cd Build system and directory structure cleanup
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 10:28:40 +02:00
David Oberhollenzer
e148e873e0 Add configure switch to disable pygos specific config defaults
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 09:50:07 +02:00
David Oberhollenzer
24043cc4ee Add service command that dumps the command lines of a service file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12 09:31:55 +02:00
David Oberhollenzer
38ad6f1b2f Allow aggregating command lines in blocks
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 23:01:35 +02:00
David Oberhollenzer
20e08db1a5 Minor cleanup
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 20:12: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
71d98c150f Don't split dependencies into argument vector, keep list of strings
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 16:08:25 +02:00
David Oberhollenzer
4ee0ea9754 Split bulk of split_argv out into helper function
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 15:57:01 +02:00
David Oberhollenzer
dca72a4c77 Do not allow embedding null-bytes into a string
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 15:05:59 +02:00
David Oberhollenzer
67d000cdc3 Cleanup: redeuce number of allocations in rdsvc
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 15:05:16 +02:00
David Oberhollenzer
77725291ef Make line buffer static, move error reporting to rdline
- Expose rdline_t struct and move a lot of extra processing
   to rdline code
 - Make line buffer statically allocated
 - Simplify rdsvc code

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-11 14:25:15 +02:00
David Oberhollenzer
a42022c650 Cleanup: remove unnecessary allocations
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-08 18:04:01 +02:00
David Oberhollenzer
6b788edfa4 Cleanup: rename/split splitkv.c
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-08 16:12:24 +02:00
David Oberhollenzer
7d8ceb810f Cleanup: split rdsvc into multiple functions
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-08 14:05:39 +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
d0764e77b2 Add pygos specific overlay fs setup
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-07 01:33:58 +02:00
David Oberhollenzer
4f4a377d7a Add VFS setup scripts
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-07 01:33:58 +02:00
David Oberhollenzer
212d3022e7 Fix: sometimes, char is unsigned by default
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-05 20:25:36 +02:00
David Oberhollenzer
00daf470d1 Split rdline into multiple, easier to read functions
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 23:37:20 +02:00
David Oberhollenzer
65d2abc3f0 Add comments to library headers
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 18:54:59 +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
aa1356cb19 Print out respawn limit in service list command
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 14:08:12 +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
ca7b7c15c5 Merge argument substitution into rdline
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 11:55:59 +02:00
David Oberhollenzer
352a9060b6 Add statefull preprocessing to rdline
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-04 00:03:28 +02:00
David Oberhollenzer
dc5afbc771 Deduce service name from file name
Remove redundant name keyword from service files

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-26 01:08:42 +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
8fc5b24bdd Enable sane set of default services
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 13:28:07 +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
0a28074071 Add System V init like killall5 helper program
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 13:11:33 +02:00
David Oberhollenzer
442ef5cedf Service command list fixup
Decode the target, no the type (and print the correct error message).

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 13:11:33 +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
a108beaaf7 Make sure the service directory gets installed
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 03:09:24 +02:00
David Oberhollenzer
5f27cb4804 Cleanup "service list" command
- Use newly introduced helper functions
 - Add command line switch to print services for specific target

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 03:00:10 +02:00
David Oberhollenzer
b9d829bc9a Cleanup command error handling in "service"
- Add helper for checking number of arguments
 - Add helper for printing "please read help" message

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 01:59:38 +01:00
David Oberhollenzer
f97add9041 Add file with service enum conversion functions
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 01:55:08 +01:00
David Oberhollenzer
9257f12e68 Build system fixes
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 01:01:11 +01:00
David Oberhollenzer
8216cedecb Add README file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-03-25 01:00:00 +01:00