summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-24Cleanup shutdown command, make reboot a symlink to shutdownDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24initd: accept sigterm and simply initiate shutdown targetDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-24Remove ctrl+alt+del target, simply initiate reboot targetDavid 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-08-23Normalize syslog message line endingsDavid Oberhollenzer
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-20usyslogd: minor header restructuring/file structure cleanupDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20usyslogd: chroot into log dir and drop privilegesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20usyslogd: merge log files for the same serviceDavid Oberhollenzer
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-19usyslogd: report error if file operation failsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16Release init-0.5v0.5David Oberhollenzer
2018-08-16usyslogd: at least create files/sockets relative to prefix pathDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: more control over log rotate behaviour, command line processingDavid Oberhollenzer
- Add more fine grained control over how log rotation is supposed to behave - Add command line option processing to usyslogd - Expose log rotation control via command line switches - Add default values to usyslogd service for pygos use case Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: keep track of log file sizeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16Implement simple log rotationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: create abstraction for log stream managementDavid Oberhollenzer
This commit seperates the formating and printing of log messages to files more cleanly from the message pump that retrieves the log messages. At a later point, other backends could be added more easiyl (e.g. forward the log message to some server). Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-13usyslogd: cleanup log file filename handlingDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-23Add nftables serviceDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-23Clean up service list short listing formatDavid Oberhollenzer
We already print the services in dependency order, for each target individually. There is no need to print the depencies and the target for each service. In addtion, printing name and description in one line shortens the resulting list. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-22Add swclock service for systems without a hardware RTCDavid Oberhollenzer
Some systems don't have a hardware real time clock and don't know the time after bootin. An obvious soulution for this is to use time from an ntp server. Unfortunately that requires domain name resolution, which resolvers like unbound won't do for us, if the DNSSEC certificates aren't valid, which they aren't if we start out with a time around 1970-1-1. The "software clock" service tries to provide a workaround by restoring a reasonably valid time from a backup file during boot, which we update when shuting down. If we wan't a more correct time, we have to update it from NTP in between. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-22Add output truncation flagDavid Oberhollenzer
This commit adds a "truncate" flag that can be added to a service description between the "tty" keyword and the path string. If the flag is set, the output file is truncated to 0 after opening. This probably requires some remodeling in the future as the tty keyword no longer deals with just tty devices. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-20Add service file for hostapdDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-18Cleanup service dependenciesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-18Add a module auto loading serviceDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-07-17Add ifdown serviceDavid Oberhollenzer
Add a service file and helper script to shut down all network interfaces during shutdown or reboot. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17Release init-0.4v0.4David Oberhollenzer
2018-06-17usyslogd: store logs in subdirectory based on service identifierDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17usyslogd: do logfile lookup by facility numberDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-11[usyslogd] split off syslog parsingDavid Oberhollenzer
- Add proto.{h,c} for parsing of syslog message - Also parse time stamp in addition to priority Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-11Add utility for producing syslog message from the shellDavid Oberhollenzer
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-11Add minimalistic syslog daemonDavid Oberhollenzer
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-09Make mksock() more generic, move to util libraryDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-09Split configuration parser and utility libraryDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-09Add service file for dnsmasqDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-06Add service file for unboundDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-24Add service files for dhcpcd DHCP clientDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-05-05Release init-0.3v0.3David Oberhollenzer
2018-04-28Add service and helper script for static network configurationDavid Oberhollenzer
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-27Add optional script for persistent network interface renamingDavid Oberhollenzer
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-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-22Add flags to selectively skip fields in service filesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22Store original file name in service structureDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22Move pygos specific configuration to pygos build repoDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-22Add automated release script from mtd-utilsDavid Oberhollenzer
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-14Bump version numberv0.2David Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14Add documentation stuff to EXTRA_DISTDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14Mention environment variablesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-14Add basic documentation stubDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12Let autoconf figure out how to set the language standardDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-04-12Rely on PATH variable for running init programsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>