Commit Graph
100 Commits
Author SHA1 Message Date
Joachim Nilsson 4f7366640b Add optional support for RFC864, Character Generator Protocol
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-18 11:48:04 +02:00
Joachim Nilsson 90497af7bb Add optional support for RFC863, Discard Protocol
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-18 09:55:19 +02:00
Joachim Nilsson eb57457522 Document /etc/rc.local support
- Document /etc/rc.local support
- Update documentation around runparts(8)

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-15 13:53:10 +02:00
Joachim Nilsson f0cda83d24 Clean up AC_ARG_WITH and use config.h also for default paths
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-15 13:17:09 +02:00
Joachim Nilsson fbacae7071 Minor cleanup
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-15 13:17:09 +02:00
Joachim Nilsson 48e2cbd183 Add convenient SysV init /etc/rc.local compat
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-15 13:17:09 +02:00
Joachim Nilsson 8f9ea0ae57 Fix stupid spelling error
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-15 08:41:06 +02:00
Joachim Nilsson 1c0776b818 Tie in service and condition documents with README
This is a first effort at cleaning up and consolidating all information
about the new service state machine and how conditions control this
state machine.

Also, clarified and added sections for all documents regarding how
services and conditions relate.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-14 16:08:44 +02:00
Joachim Nilsson 6ff9cb2ff3 Rename condition net/gw --> net/route/default in netlink plugin
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-14 15:41:47 +02:00
Joachim Nilsson fbef03a4c6 Update Inetd features and service dependencies
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-14 10:03:19 +02:00
Joachim Nilsson 66f22a0a5f Add syntax highlighting helpers for Emacs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-14 09:52:22 +02:00
Joachim Nilsson 171ae7dc85 Add support for disabling the Netlink plugin
Some vendors provide their own Netlink plugin to Finit.  This patch
makes it possible to disable the default netlink plugin from being
built.  However, even before this patch it was possible to overload
the plugin.  This just discards it from being built.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-13 13:23:07 +02:00
Joachim Nilsson ebfa8f061c Fix default handling in M4 macro AC_PLUGIN()
The AC_PLUGIN() could not properly handle if a plugin is to be enabled
by default.  This patch adds support for outputting the correct help
text.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-13 13:20:56 +02:00
Joachim Nilsson 2baa4f8ea9 Followup to 38203ab, remove queue.h from Makefile as well
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-13 13:07:28 +02:00
Joachim Nilsson 38203ab9e8 Migrate to libite version (newer) of BSD queue.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-12 15:34:52 +02:00
Joachim Nilsson 88a4ebf9e7 Use <> instead of "" for external header includes
Libraries and system headers should be included with <> instead of "".
This makes a great difference for the automatic dependency tracking.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-12 15:32:36 +02:00
Joachim Nilsson 51f61939da Do not build insecure inetd time (rdate) plugin by default
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-12 13:36:47 +02:00
Joachim Nilsson 7262a25c85 Merge pull request #34 from troglobit/echo
Basic inetd echo server support and bugfix

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-12 12:38:14 +02:00
Joachim Nilsson 8b9309ee41 Fix regression in starting internal inetd services
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-12 12:24:28 +02:00
Joachim Nilsson affc6a97b9 Add support for inetd RFC862 echo server
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-12 09:58:25 +02:00
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 267eeb9692 Fix --enable-static build, only C library shared
This patch fixes regressions in --enable-static introduced with the
conversion to the GNU configure and build system.

The default link flag to libtool is set to -static-libtool-libs, meaning
not a fully static build -- the C library will still be used as an .so
which is usually what people want -- whereas libite (-lite) and libuEv
are linked statically.

$ ldd /sbin/finit /sbin/initctl
/sbin/finit:
	linux-vdso.so.1 =>  (0x00007ffffde62000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6979ad8000)
	/lib64/ld-linux-x86-64.so.2 (0x000055d893e96000)
/sbin/initctl:
	linux-vdso.so.1 =>  (0x00007ffed0dd6000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feb3a29c000)
	/lib64/ld-linux-x86-64.so.2 (0x00005556ebd2b000)

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 12:14:21 +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 3a86db7d9f Fix typo in --enable-rw-rootfs configure option
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 10:30:31 +02:00
Joachim Nilsson 927956bf78 Set correct initial bootstrap runlevel 'S'
This patch corrects a long standing issue with Finit.  System initial
bootstrap runlevel must be set to 'S' (0), not the configured fallback
runlevel 'RUNLEVEL', which likely is '2'.

Also, minor cleanup, reduce code duplication.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 10:24:15 +02:00
Joachim Nilsson 05938a88ce Fix #33: Set up directory required by D-Bus plugin
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-09 10:04:34 +02:00
Joachim Nilsson 4a8a92af2e Minor audit of new top-level state machine
Also, give Jonas copyright for his contribution to Finit.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-07 18:32:31 +02:00
Joachim Nilsson 79b95daf3a The pidfile plugin requires /var/run, so depend on bootmisc
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-06 19:44:21 +02:00
Joachim Nilsson ea21bfc4c9 Relocate global sm variable to reduce include file deps
The new state machine handling is not necessary to export to external
plugins, so this patch reduces the exposure of the global variable sm

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 23:10:47 +02:00
Joachim Nilsson e9da876a10 Actually fix fallback shell memory leak
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 22:08:12 +02:00
Joachim Nilsson ef7f0b100b Check return value from fcntl() on inetd server socket
Setting O_NONBLOCK on an inetd server socket may fail, we
must check for this or the event loop may stall and block
Finit completely.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 21:53:42 +02:00
Joachim Nilsson 33ccff7733 Audit ad2bafb: cleanup of stale pid files
Make sure to check return value of remove(), it may actually signal
something useful.  Log useful errors.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 21:46:25 +02:00
Joachim Nilsson 00e5a8f5d9 Audit ec25051: service logging support
- Must check return value from open(), found by Coverity Scan
- Minor refactor (and cleanup) to reduce code complexity

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 21:38:46 +02:00
Joachim Nilsson f74a73be20 Audit commit 1177c73: musl libc compat changes
Must initialize init_request buffer to zero before communicating with
Finit.  Found by Coverity Scan.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 21:21:24 +02:00
Joachim Nilsson 34d8848b5c Fix leak if fallback shell cannot be registered
If we cannot register a fallback TTY we leak a few bytes RAM.
Found by Coverity Scan.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 21:15:16 +02:00
Joachim Nilsson 662f364d09 Check return value from uev_io_init() at runtime
Possible resource leak due to unchecked return value from uev_io_init()
found by Coverity Scan.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 21:03:36 +02:00
Joachim Nilsson e53acd1cdd Fix minor type warning in debug message
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 20:14:43 +02:00
Joachim Nilsson d96d1a3023 Audit rlimit support, handle possible NULL pointer
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 20:10:37 +02:00
Joachim Nilsson f249210c04 Update Travis-CI build script for Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 19:52:33 +02:00
Joachim Nilsson 969ecffc05 Merge branch 'westermo-finit-sm'
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 19:49:33 +02:00
Joachim Nilsson cc15d3f77b Merge branch 'finit-sm' of https://github.com/westermo/finit into westermo-finit-sm
Hand merged conflicts in the following files:
	Makefile
	finit.h
	service.c

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-06-04 19:48:08 +02:00
Joachim Nilsson d48da81026 Merge pull request #31 from thezbyg/master
Fix SIGSEGV due to writes to const char array.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-05-17 20:28:35 +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
Joachim Nilsson ca830b9a09 Compat install-dev hook
Finit <3 did not use GNU configure and build system.  This patch adds an
install-dev rule that is used by some to install required headers for
external plugin developers.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-30 16:53:43 +02:00
Joachim Nilsson f2b0951d78 Install headers for external plugin devs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-30 16:39:51 +02:00
Joachim Nilsson 110ee220e7 Merge pull request #29 from westermo/wmo/2.4
Allow debugging of inetd service's arguments
2016-04-26 11:04:47 +02:00
Joachim Nilsson f29dff691f Allow debugging of inetd service's arguments
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-26 11:02:32 +02:00
Joachim Nilsson a1e6febc4f Merge pull request #28 from westermo/wmo/2.4
Westermo fixes for services changing type at runtime

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-26 09:38:41 +02:00
Joachim Nilsson df1fbbc996 Handle type change from inetd to service
When a service changes type from inetd to a regular daemon we must make
sure to first deregister the currently running inetd service properly.

Example: a system boots up with httpd.conf as an inetd service, so Finit
   opens a socket 0.0.0.0:80 pending connections to start `httpd -i`.
   After a while a user changes httpd.conf to be a regular service and
   calls `initctl reload`.  Without this patch the socket will remain
   open and prevent httpd from opening and binding to the same port.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-26 09:30:00 +02:00
Joachim Nilsson 448a9e1198 Stop inetd watcher and close socket when inetd service is removed
This patch fixes a problem with lingering inet sockets when inetd
services are removed.  When removing an inetd service we must stop
the watcher and close the socket.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-26 09:27:30 +02:00
Joachim Nilsson 80624d3ff8 Revert "Do not just mark deleted SVC free, clear memory"
We cannot clear the svc_t memory because other applications may have
connected to the same shared memory.  An application may be inspecting
the current list of services (initctl) and pulling the rug from under
them could cause some really unpredicatble results.

This reverts commit 06d1e90bac.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-26 09:23:59 +02:00
Joachim Nilsson 4b0f78c1b5 Merge pull request #27 from westermo/wmo/2.4
Westermo fixes for UDP inetd services and more

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 12:06:43 +02:00
Joachim Nilsson 5ea3cc0090 Reduce max backlog in listen(): 20 --> 10
Both the original MIT Athena inetd and the GNU inetutils inetd only keep
a backlog of 10 connections in listen() for TCP sockets.  This patch
adjusts the Finit hard coded default accordingly.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 12:01:10 +02:00
Joachim Nilsson 7f5f8ba09d Minor grammar: "Connection" --> "connection"
When starting an inetd service in verbose mode we print a progress
message to the console appended with "Connection".  This patch simply
changes that to append with "connection" in lower case.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 12:01:10 +02:00
Joachim Nilsson efd265c9c8 Fix "broken pipe" problem for UDP inetd services
This patch fixes several issues related to the problem of launching
UDP inetd services:

- Make sure to disable O_NONBLOCK on the socket before passing it to
  the inetd service, that's what is expected.  This goes for both UDP
  and TCP (accepted) connections -- there is no guarantee even for TCP
  sockets that they do *not* inherit the parent socket's flags.
- Mark the UDP inetd parent's SVC as busy and stop its watcher before
  starting the child task to service the connection.  The watcher must
  be stopped or multiple child tasks may be spawned!
- Only copy the most relevant parts to the UDP task.  In particular
  must *not* copy the libuEv watcher data to the task!
- With the child task done and the parent inetd service unblocked we
  must restore O_NONBLOCK to the socket before restarting the watcher

When a UDP inetd service connection is handled we create a child task
to service the request, meanwhile we block the parent service.  There
was a problem with blocking the parent since we called inetd_stop(),
which both did a shutdown() and close() of the socket ... this patch
introduces separate handling of blocked (busy) inetd services in the
inetd_stop() function and also make sure to handle restarting the
parent watcher in inetd_start() when the child task is done.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 12:01:10 +02:00
Joachim Nilsson 7e91cb4afc Minor log message improvements
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 12:01:10 +02:00
Joachim Nilsson 9a03adce5a Do not assume new fd is 0, dup2() with fd instead
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 10:54:31 +02:00
Joachim Nilsson 06d1e90bac Do not just mark deleted SVC free, clear memory
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 10:53:20 +02:00
Joachim Nilsson 439d9df122 Set CLOEXEC flag to prevent leaking descriptors
Both the new initctl API and the new pidfile watcher plugin failed to
set CLOEXEC on their sockets.  This caused forked-off and exec()'d
children to inherit all these descriptors.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-24 10:52:39 +02:00
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
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