1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-22 19:19:47 +01:00
Commit graph

118 commits

Author SHA1 Message Date
David Oberhollenzer
d9f883f215 Add utility for producing syslog message from the shell
This can can be used by shell scripts to produce syslog messages,
as well as aiding in debugging the usyslogd daemon.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-11 19:45:42 +02:00
David Oberhollenzer
f52c7ea9d0 Add minimalistic syslog daemon
For now this daemon simply dumps all syslog messages into seperate log
files and doesn't do much parsing. Since the messages are readable ASCII
anyway, this should not be to much of a problem and sufficient for
debugging.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-11 19:45:42 +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
1eb8a4c792 Add service file for dnsmasq
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-09 15:32:29 +02:00
David Oberhollenzer
d9e903ce3a Add service file for unbound
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-06 11:13:25 +02:00
David Oberhollenzer
d9c73520e3 Add service files for dhcpcd DHCP client
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-24 13:20:54 +02:00
David Oberhollenzer
8c24e8c2ad Release init-0.3 2018-05-05 18:25:48 +02:00
David Oberhollenzer
a22a212d3a Add service and helper script for static network configuration
After interface renaming is done, perform the following actions:
 - Configure each interface for which we have a configuration file
 - Configuration file contains lines that we pass directly to iproute2
 - Configure static routing in a similar fashion
 - Set the configured interfaces up

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-28 13:52:01 +02:00
David Oberhollenzer
0ded476534 Add optional script for persistent network interface renaming
Add a new service that runs a small helper script that applies a consistent,
deterministic naming pattern to all interfaces, based on their mac address.

A configuration file with wild card pattern matching can be used for
determining names. By default, this is disabled.

Also, this script is Linux specific.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-27 11:28:46 +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
160cd6b6aa Store original file name in service structure
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22 13:41:18 +02:00
David Oberhollenzer
32113521eb Move pygos specific configuration to pygos build repo
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22 13:41:18 +02:00
David Oberhollenzer
9dc2cc5fa4 Add automated release script from mtd-utils
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
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