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

136 commits

Author SHA1 Message Date
David Oberhollenzer
7ee95668ca Release init-0.8 2018-11-05 20:19:25 +01:00
David Oberhollenzer
4bcfd98764 Cleanup header dependencies
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-05 20:18:48 +01:00
David Oberhollenzer
a8f3360e93 Split default init scripts into seperate package
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-05 16:01:57 +01:00
David Oberhollenzer
5923ad488a Move cron library code to crond
Nothing else uses it.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 15:37:15 +01:00
David Oberhollenzer
b864c727c8 Remove unused telinit code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 15:33:00 +01:00
David Oberhollenzer
c0e8c7e245 cleanup: let rdline_init open the file
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 15:02:11 +01:00
David Oberhollenzer
074fe20a47 Add fopenat utility function
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 14:45:46 +01:00
David Oberhollenzer
34f542b7cc Seperate init specific code from utility code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 14:30:16 +01:00
David Oberhollenzer
1ffc240b3f cleanup normalize_line state machine
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-04 14:20:23 +01:00
David Oberhollenzer
acd09007a1 Remove usyslogd/klogd and syslog utility program
This is split out to a seperate package.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-03 19:26:00 +01:00
David Oberhollenzer
d4ce928fc0 Release init-0.7.1 2018-11-03 19:26:00 +01:00
David Oberhollenzer
b3773d09ea Only parse arguments if index actually is numeric
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-03 19:26:00 +01:00
David Oberhollenzer
24e98f1e5b Fix parameter substitution escape of '%'
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-20 17:41:22 +02:00
David Oberhollenzer
ef51a8e06f Silence nginx service
Make sure it *only* prints to its log files and doesn't spam all
over the TTY if it cannot find the favicon that $BROWSER requested.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-20 16:36:12 +02:00
David Oberhollenzer
53bc182e09 Fix argv_exec allocation size of argument vector
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-16 23:06:58 +02:00
David Oberhollenzer
24c90b7700 Configuration parser cleanup
- Do a getline() & process in rdline instead of doing a read per character
   and feeding it through a state machine.
 - Move splitkv to rdcfg.c, the only place where it is used

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-10 16:45:11 +02:00
David Oberhollenzer
7b647eefef Release init-0.7 2018-10-07 02:10:17 +02:00
David Oberhollenzer
209121cdeb Add nginx service
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-10-07 02:10:17 +02:00
David Oberhollenzer
e171f88865 Remove pid fron cron serives, reap children in signal handler
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-21 18:08:48 +02:00
David Oberhollenzer
a191a7cc18 Fix gitignore service exclusion
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-21 14:40:52 +02:00
David Oberhollenzer
66dde441bc Add helper script to update the time from NTP
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-21 12:41:42 +02:00
David Oberhollenzer
33aa4cedff Update documentation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-19 12:22:14 +02:00
David Oberhollenzer
a4dddb7777 Add cron job for swclocksave
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-19 12:22:14 +02:00
David Oberhollenzer
b9ba11b4db Add service commands to manage gcrond services
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-19 12:22:14 +02:00
David Oberhollenzer
f38163772c Add simple cron implementation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-19 12:22:14 +02:00
David Oberhollenzer
5cd5f48f76 Add helper library for cron configuration
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-17 14:53:19 +02:00
David Oberhollenzer
481744a2ba Move splitkv function to libcfg
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-16 01:12:06 +02:00
David Oberhollenzer
5b78d4d695 Add an optional service for switching the console font
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-12 18:44:29 +02:00
David Oberhollenzer
ce7c79a639 Release init-0.6 2018-09-01 17:46:14 +02:00
David Oberhollenzer
f67d32cba1 Silence some services that like to write to the console
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01 17:39:22 +02:00
David Oberhollenzer
42fba964c9 Centralize/unify version string printing
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01 17:22:24 +02:00
David Oberhollenzer
3b8764b9d2 usyslogd: fix getopt arguments
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01 16:40:14 +02:00
David Oberhollenzer
dc30dd7530 Add tiny klogd implementation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01 13:03:18 +02:00
David Oberhollenzer
b0b6c68e38 Only enable signals in signalfd that initd actually handles
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01 00:00:40 +02:00
David Oberhollenzer
bb16d1f1bf Add service files for OpenSSH server
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-31 22:39:58 +02:00
David Oberhollenzer
f39aba8aa3 Add man page for service command
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-31 17:54:23 +02:00
David Oberhollenzer
34aff498ed Add man page for syslog command
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-31 10:14:06 +02:00
David Oberhollenzer
b5c6e9d392 Add man page stub for shutdown
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-28 20:55:27 +02:00
David Oberhollenzer
0ed964c8a5 Cleanup and update documentation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-28 14:25:28 +02:00
David Oberhollenzer
066efaa33e initd: automatically do a shutdown/reboot when the target is completed
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00
David Oberhollenzer
2d54b32d24 Cleanup shutdown command, make reboot a symlink to shutdown
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00
David Oberhollenzer
ec6264bad5 initd: accept sigterm and simply initiate shutdown target
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24 21:17:31 +02:00
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
532f5e6819 Normalize syslog message line endings
Most syslog messages have a line feed at the end, but some don't. This patch
removes trailing spaces from all syslog messages that have one and always adds
a line feed in the logging back end.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-23 09:07:10 +02:00
David Oberhollenzer
73404a09d4 usyslogd: minor header restructuring/file structure cleanup
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20 12:31:51 +02:00
David Oberhollenzer
325f919847 usyslogd: chroot into log dir and drop privileges
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20 07:44:15 +02:00
David Oberhollenzer
61bc850984 usyslogd: merge log files for the same service
If a service provides an identifier string, write all messages for that
service itno a file named after that identifier instread of splitting it
up by facility ID in a sub directory.

This is supposed to cleanup and simplify the clutter created in /var/log.

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20 07:44:15 +02:00
David Oberhollenzer
f51dca0878 usyslogd: report error if file operation fails
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-19 10:14:19 +02:00
David Oberhollenzer
5509e77a1c Release init-0.5 2018-08-16 22:52:27 +02:00