Commit Graph
52 Commits
Author SHA1 Message Date
Joachim Nilsson ec041b3c02 Update configure and build section
Prune standard configure flags and focus on the most important, whatever
they may be.  Mention --disable-inetd and describe how --enable-static
works.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 12:38:45 +02:00
Joachim Nilsson 58e00fe52e Fix #17: Mention kernel CONFIG_UEVENT_HELPER_PATH and /etc/fstab
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 11:15:33 +02:00
Joachim Nilsson a40301ef86 Bring Building section more up to date
Now that we have a proper GNU configure script there is no such thing as
lightweight, and the respected environment variables are listed at the
end of `./configure --help`

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 11:14:03 +02:00
Joachim Nilsson 9a539c636a Merge pull request #30 from westermo/wmo/2.4
Resource limit manipulation (setrlimit)

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-05-01 11:14:08 +02:00
Tobias Waldekranz 6d84fd010e Resource limit manipulation (setrlimit)
Add support for changing the initial hard and soft resource limits for
finit and any processes it launches.

See /etc/finit.conf section in README.md for more information.
2016-04-28 09:36:22 +02:00
Joachim Nilsson 096a3eff51 Mention new log keyword to services et al
Patrick Stewart added the optional `log` keyword to service, run, task
and inetd stanzas in 889bce1.  It redirects stdout/stderr to syslog
using the logger tool.  This addition to the README is mainly just a
place holder so it's not forgotten before the upcoming README refactor.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 23:56:02 +02:00
Joachim Nilsson f7f222c924 Minor formatting and sectioning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:45:28 +02:00
Joachim Nilsson e50e12417e README.md: Attempt to update to new build system
First attempt to update and simplify the build instructions and example.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:37:34 +02:00
Joachim Nilsson 1398536194 README.md: Update initctl help text
Add missing `initctl cond show` help.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 23:48:28 +02:00
Joachim Nilsson 95135ca0a7 README.md: Slightly friendlier warning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 23:42:25 +02:00
Joachim Nilsson ec31930638 README.md: Mark optional plugins as optional
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 23:39:00 +02:00
Joachim Nilsson 7b8944730d README: This is Finit3, development version
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-09 20:42:44 +02:00
Joachim Nilsson 8f415aeaf6 Add HOOK_SVC_START to detect started processes
This patch adds support for the runtime `HOOK_SVC_START`.

Customer request.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 03:45:23 +02:00
Joachim Nilsson 3f3220e806 Add HOOK_SVC_LOST to detect lost processes
This patch adds support for the runtime `HOOK_SVC_LOST` and the (very
noisy) *example* plugin `lost.so`.

Customer request.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 03:33:58 +02:00
Joachim Nilsson fa3a97366c Update Debugging section, all interesting stuff is in configure now
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-12-01 22:30:08 +01:00
Joachim Nilsson 5b3e3da7ff Attempt to clarify how BusyBox getty works wrt. the TTY device path
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-12-01 22:24:21 +01:00
Joachim Nilsson 263e23a0df initctl: Support for stop/start services by name:id
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-11-26 21:22:05 +01:00
Joachim Nilsson e7db6c6ac6 Update README with latest changes to initctl help
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-11-22 22:18:40 +01:00
Joachim Nilsson f12535dc19 Clarify that the GW event to listen for in service declarations is GW:UP
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-11-22 22:18:15 +01:00
Joachim Nilsson 924bf041bc On reload/restart we must wait for services to stop first
This patch adds support for declaring *why* a service is being stopped
or reloaded.  This is later used when all stopped services have been
collected by the `service_monitor()` to issue start or postponed SIGHUP.

As an added benefit we can now also see why a service is not running.
If it has been paused by a user, halted when moving to another runlevel,
waiting for a condition (event), or similar.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-11-22 10:11:27 +01:00
Joachim Nilsson 44579cc089 README: Clarify how arguments to ./configure --with-plugins= work
This should help clarify any misunderstandings detailed in issue #13.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-10-22 15:19:01 +02:00
Joachim Nilsson a1c8ada320 Play around a bit with project title heading.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-09-29 22:39:19 +02:00
Joachim Nilsson ffa32c6674 README: Clearify how multiple events can be emitted by initctl.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-09-15 09:05:10 +02:00
Joachim Nilsson fcaf5d7b76 README.md: Commit to spec for v2.0 release.
The event API, including Netlink events to services, looks OK now
to build the remaining two features on:

- Netlink plugin for GW and IFUP IFDN events
- Generic event support for services

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-09-11 09:51:10 +02:00
Joachim Nilsson 9a81bbccbb Update section on new emit <EVENT> support.
This part of the README must be completely overhauled before the
release, so much of the contents is basically just TODO or design
ideas atm.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-09-08 08:18:49 +02:00
Joachim Nilsson 98ba5955c8 README: Document initial ideas for future event support
Writing TODO's in the README makes it a promise ...

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-08-22 13:56:36 +02:00
Joachim Nilsson 54ace1a6cf README: Further updates and corrections to inetd syntax.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-06-17 13:36:36 +02:00
Joachim Nilsson ee6d524bc8 Update ChangeLog and README for release.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-06-15 22:43:03 +02:00
Joachim Nilsson 03573b41ca Add support for a deny filter syntax to inetd services
This patch changes the syntax for custom inetd services and adds support
for deny filters.  The new syntax is:

    inetd service/proto[@iface,!iface,...] </path/to/cmd | internal[.service]>

This means the second column now defines what@from and the third to/what
process.  For internal services on a custom port the internal.service
syntax must be specified, so Finit can properly bind the inetd service
to the correct plugin.  Here follows a few examples:

    inetd time/udp                    wait [2345] internal                -- UNIX rdate service
    inetd time/tcp                  nowait [2345] internal                -- UNIX rdate service
    inetd 3737/tcp                  nowait [2345] internal.time           -- UNIX rdate service
    inetd telnet/tcp@*,!eth1,!eth0, nowait [2345] /sbin/telnetd -i -F     -- Telnet service
    inetd 2323/tcp@eth1,eth2,eth0   nowait [2345] /sbin/telnetd -i -F     -- Telnet service
    inetd 222/tcp@eth0              nowait [2345] /sbin/dropbear -i -R -F -- SSH service
    inetd ssh/tcp@*,!eth0           nowait [2345] /sbin/dropbear -i -R -F -- SSH service

Access to telnet on port `2323` is only possible from interfaces `eth0`,
`eth1` and `eth2`.  The standard telnet port (`23`) is available from
all other interfaces, but also `eth2`.  The `*` notation used in the ssh
stanza means *any* interface, however, here `eth0` is not allowed.

NOTE: This patch breaks syntax compatibility with Finit v1.12!

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-06-15 14:15:39 +02:00
Joachim Nilsson 1d58f4abbe initctl: New symlink to finit binary, document functions in README.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-06-08 18:06:55 +02:00
Joachim Nilsson 720324b256 Change syntax for multiple instances: #ID --> :ID
Turns out that #ID syntax for multiple instances, introduced in cb07556,
was very cumbersome to reference from the shell command line in the new
Finit client.  This patch changes the syntax from #ID to :ID, which also
means that listing services/jobs in the shell will look like JOB:ID.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-06-08 01:07:41 +02:00
Joachim Nilsson 8e9a5ee678 Update README on Inetd services and cleanup TODO.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-06-06 11:30:38 +02:00
Joachim Nilsson f5584ecc3c Add two new hook points: HOOK_SVC_RECONF and HOOK_RUNLEVEL_CHANGE.
These two new hooks run when SIGHUP is received and when changing
system runlevel.  The hooks are called when all services have been
stopped, just before starting up new/modified services.  Making it
the perfect hook for reconfiguring the system/hardware before new
services or modified services are started up again.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-05-31 22:07:46 +02:00
Joachim Nilsson cb075560ed Add support for multiple instances of the same command
This patch adds support for starting and supervising multiple
services (run, task, or service) using an extra #ID number.

service #1 [2345] /sbin/httpd -f -h /http -p 80   -- Web server
service #2 [2345] /sbin/httpd -f -h /http -p 8080 -- Old web server

Also included in this patch is a fix for endless respawn of faulty
services.  For instance, a buggy daemon that crashes repeatedly will now
be stopped after 10 respawns.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-05-31 01:58:20 +02:00
Joachim Nilsson 687f52b0b5 Add support for adding/removing services from /etc/finit.d at runtime.
This patch adds support for adding and removing services from Finit at
runtime.  Configuration file stanzas for service, run and task may now
be written to files in /etc/finit.d/*.conf, using the exact same syntax
as before in /etc/finit.conf.  When a file is added, removed or modified
the user may simply SIGHUP Finit (PID 1) to activate the changes.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-05-31 01:55:39 +02:00
Joachim Nilsson c3fcfe7e4e README: Update with info on new configure script.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-03-10 11:20:39 +01:00
Joachim Nilsson 32587d341c Overhaul build system and add support for disabling inetd support.
This patch adds support for a configure script and with it
support for disabling inetd support.  See the output from

    ./configure --help

* Add configure script
* Sprinkle #ifdef fairy dust on svc.c when inetd support is disabled
* Use GCC built-in autodep calculator (-MMD -MP)
* Fix name space issue with include files, use relative paths
* Disable username/group name to uid/gid functions in static builds
* Bug out (error) if a user tries to build the bootmisc plugin static

Possibly fixes GitHub issue #5 and issue #6.

NOTE: The static build has not received any testing at all!

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-03-10 10:25:46 +01:00
Joachim Nilsson 9cb6c88f34 Spellchecks, cleanup and simplify intro.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-02-27 10:02:08 +01:00
Joachim Nilsson 1de5777f7e README: Update with new inetd support.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-02-27 00:14:14 +01:00
Joachim Nilsson 888128e56b README: Slight cleanup to make it more readable w/o Markdown.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-02-25 10:13:12 +01:00
Joachim Nilsson cab339c857 Simplify build example.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-24 16:07:55 +01:00
Joachim Nilsson dcb42602c9 Cleanup README for release.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-24 16:04:54 +01:00
Joachim Nilsson a3d76c58a4 Expand on how plugins can interact with system bootstrap.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-21 19:34:01 +01:00
Joachim Nilsson e0e0581d10 Trim slogan ...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-21 13:29:35 +01:00
Joachim Nilsson ef75d5ec31 Cleanup Introduction and add Bootstrap section.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-21 13:25:24 +01:00
Joachim Nilsson c2ea2c1193 Reindent to more 'pure' Markdown.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-19 21:12:14 +01:00
Joachim Nilsson 076f77a31b Update TODO: more on inetd and at support.
Also a minor fix to the README.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2015-01-06 20:54:52 +01:00
Joachim Nilsson f621117eb9 README: Update section on plugins with info on hooks and I/O plugins.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-11-26 18:48:25 +01:00
Joachim Nilsson 3a2cf30f47 README: Minor touch up.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-11-26 16:41:04 +01:00
Joachim Nilsson 7dbc02f879 Standardize on two-space indented * for bullet lists in Markdown
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2014-11-26 16:13:53 +01:00