Commit Graph
735 Commits
Author SHA1 Message Date
Joachim Nilsson f44ac5a023 Remove bogus autoconf version requirement
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-17 00:20:26 +02:00
Joachim Nilsson 84c75c4416 Rename internal pkg-config reference to libuEv
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-17 00:18:11 +02:00
Joachim Nilsson ee8a69f5ed Let plugins know search path for lite.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-16 22:05:31 +02:00
Joachim Nilsson acf6cb6900 Show configure log to see where hell breaks loose
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-16 21:58:53 +02:00
Joachim Nilsson f51183d5f2 Strip install libs, do not use DESTDIR for Finit
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-16 21:55:39 +02:00
Joachim Nilsson ff5814e4d4 Use pkg-config provided paths for uEv and lite
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-16 21:45:21 +02:00
Joachim Nilsson 831d0c5520 Use /tmp as install --prefix for libs, not DESTDIR
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-16 21:21:48 +02:00
Joachim Nilsson d9cc21b3c8 Travis-CI: Attempt to build w/o root privs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-16 21:12:45 +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 889bce1768 Merge pull request #26 from RFCreations/master
Some fixes, and add logging

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 23:46:01 +02:00
Patrick Stewart 0ba8df5c2d Change stdin member of svc to stdin_fd
'stdin' is a macro in stdio.h, so it shouldn't be used as a member name. GLIBC happens to have "#define stdin stdin", but other libcs don't.
2016-04-13 22:09:05 +01:00
Patrick Stewart ec2505191b Add service logging
Adds an extra 'log' parameter to services that routes STDOUT and STDERR to syslog.
Uses a PTY rather than a pipe, as this prevents log messages hanging around in a buffer indefinitely.
2016-04-13 22:09:05 +01:00
Patrick Stewart 3de9e4e5db Fix potential race condition/hang for SVC_TYPE_RUN services
In service_start() the SIGCHLD handler is reenabled before calling complete(), so the service could be reaped by the SIGCHLD handler leaving service_start() waiting forever
Also remove code that duplicates sig_unblock()
2016-04-13 22:09:05 +01:00
Patrick Stewart 1177c734ce Use finit API to get runlevel instead of utmp
utmp is not available with musl libc
2016-04-13 22:07:39 +01: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 dd8715f3dc configure.ac: Cleanup, remove commented out old ideas
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:43:40 +02:00
Joachim Nilsson 3e93ed2ead TODO: Add support for throttling connections
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:40:57 +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 9e70a12273 configure.ac: Remove datarootdir
Unused after removal of GIT submodules.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:36:41 +02:00
Joachim Nilsson b313e623df Remove double slash '//bin' from default prefix path
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:22:27 +02:00
Joachim Nilsson 376d7a0fbb m4/plugin.m4: Minor cleanup
Use pure M4 syntax, not mixed with -P syntax.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-13 07:17:02 +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 ed8b21db36 plugins/Makfile.am: Make optional plugins optional
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 23:36:35 +02:00
Joachim Nilsson b1cd3a2332 Make a few less used plugins optional
The alsa-utils, dbus, lost (PID), resolvconf, and x11-common plugins are
rarely used in the main use-case for Finit (embedded head-less systems).
This patch disables them by default and makes them possible to enable by
configure --enable-$PLUGIN switches.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 23:34:27 +02:00
Joachim Nilsson 5675d068f8 m4/plugin.m4: Simplify, fix and cleanup M4 code
Slightly more readable code and fix issue with --enable-$PLUGIN not
biting properly in the generated Makefile.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 23:32:52 +02:00
Joachim Nilsson 4baf2611f6 Foundation for selecting plugins in configure
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-12 20:30:29 +02:00
Joachim Nilsson 13d4821abe Disable fast-install by default
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-11 07:29:01 +02:00
Joachim Nilsson 1f1c2e0466 Replace verbose and kernel quiet modes with silent and quiet
This patch replaces the verbose and kernel-quiet runtime options with
a (hopefully) more useful quiet and silent modes of operation.

By default Finit progressively shows all services it starts at boot, but
when boot has completed and services are started/restarted Finit prints
nothing.  If `--disable-quiet` is given all started/restared/stoppping
messages are shown even after boot.

However, if `--enable-silent` is given Finit is completely silent even
at boot, no progress is shown, until the first service is started, which
on most systems is login.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-11 00:50:37 +02:00
Joachim Nilsson c4af8b7cbd configure: Shorten and clarify descriptions
This patch makes a few configure options shorter, but still more clear.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-11 00:49:24 +02:00
Joachim Nilsson 426d915c08 configure: Remove --with-aix-soname=aix|svr4|both
Remove confusing `--with-aix-soname` option to configure.  Replace with
hard-coded `aix-soname=both` => shared + static archives are build as to
be expected.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-11 00:46:31 +02:00
Joachim Nilsson 86be6812b9 configure: Remove GIT submodule check
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-11 00:45:37 +02:00
Joachim Nilsson 4efdc4fe19 Merge pull request #25 from westermo/wmo/2.4
Westermo fixes to Finit3
2016-04-10 20:08:25 +02:00
Joachim Nilsson da76cf4f75 Check return value from strtok(), may be NULL
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-10 19:58:46 +02:00
Joachim Nilsson a2177a8063 Fix GCC warning for signed vs unsigned comparison
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-10 19:58:13 +02:00
Joachim Nilsson cfa155deae Minor cleanup
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-10 19:57:48 +02:00
Joachim Nilsson e7832e2ca7 FTBFS followup issue #24
Add missing return keyword to inline function svc_is_starting()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-10 19:56:13 +02:00
Joachim Nilsson d7d45b65d0 Merge pull request #24 from westermo/wmo/2.4
Assert svc condition only when PID file has been created/updated

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-10 19:50:16 +02:00
Joachim Nilsson 4ae5c54f45 Assert svc condition only when PID file has been created/updated
This patch prevents too early start of services depending on other
services.  E.g, if service B depends on A then we must wait for A to
signal that it is ready before we allow B to start -- in a Finit based
system A does this by creating, or touching (updating mtime), its PID
file.  Services (like A) that support SIGHUP should call utime(), or
utimensat(), on the PID file at the end of their SIGHUP handler.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-10 19:14:48 +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 87ca6574b8 Travis-CI: Build & install libuEv and libite first
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-09 20:37:09 +02:00
Joachim Nilsson 35844f2d1d Update finit_LDADD for external libuEv and libite
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-09 20:35:38 +02:00
Joachim Nilsson 2e2d87ee78 Update include path for libuEv and libite
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-09 20:33:07 +02:00
Joachim Nilsson ba11d218bc Remove local GIT submodules for libuEv and libite
From now on the user is required to have libuEv and libite installed
before building and installing finit. This is for maintenance reasons.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-09 20:29:26 +02:00
Joachim Nilsson 707c42db63 Update TODO, remember our origins!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 20:18:31 +02:00
Joachim Nilsson 4cfe4781a3 Remove old (now unused) compat symlinks
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 20:17:38 +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 e54c7eef65 Fix dlopening of plugins
Finit must export symbols, but plugins do not since they are modules.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 03:20:10 +02:00