Commit Graph
691 Commits
Author SHA1 Message Date
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
Joachim Nilsson 05cc6bf5d2 Do not bail on makepath() fail if dir exists
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 03:16:40 +02:00
Joachim Nilsson 4fecb8621d Fix PLUGIN_PATH => $(pkglibdir) in build system
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-04-05 02:38:24 +02:00
Joachim Nilsson 6a49f7ed8c Add missing license, copyright and module description
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-21 15:56:15 +01:00
Joachim Nilsson 8bcc34ce91 Remove Emacs version-control handling
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-21 15:41:51 +01:00
Joachim Nilsson 8da1505454 Minor, use () to denote function in comments
To distinguish between variables and functions in comments Finit use ()
at the end of function names.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-21 15:14:12 +01:00
Joachim Nilsson 34e4d31219 Travis-CI: Set LD_LIBRARY_PATH to /tmp/lib for initctl -h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-19 23:03:41 +01:00
Joachim Nilsson 6489dcc967 Update .gitignore files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-19 23:00:00 +01:00
Joachim Nilsson 2d6769005a TODO: Add Westermo request for initctl show --json
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-19 22:56:05 +01:00
Joachim Nilsson 98cd6dffb1 Fix build and install temporarily
This patch builds Finit dynamically, including both plugins and GIT
submodules for libite and libuev.  This causes libite.so and libuev.so
to be installed in a public path, which is not good if the user has
other versions of the same libraries already installed.

The correct fix is to remove the GIT submodules for now and require
users of Finit to build and install libite and libuev separately.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-19 22:54:07 +01:00
Joachim Nilsson eb86a76a0d Travis-CI: Remove extra call to configure
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-19 22:51:34 +01:00
Joachim Nilsson 4423a2b16e Fix Travis-CI build, move package install
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-18 21:32:23 +01:00
Joachim Nilsson 0467c571df Merge pull request #22 from westermo/wmo/2.4
initctl: Only show service name, not path, with plain show
2016-03-17 22:04:27 +01:00
Joachim Nilsson cef4b5761a initctl: Only show service name, not path, with plain show
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-16 13:06:47 +01:00
Joachim Nilsson 806d05622a Fix libite.la library dependency in build
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-15 08:20:48 +01:00
Joachim Nilsson 57fb4738f1 Create empty m4 directory for the benefit of autogen.sh and Travis-CI
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-15 07:34:20 +01:00
Joachim Nilsson 0bbc69200b Update Travis-CI to use ./autogen.sh before configure & build
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-15 00:13:07 +01:00
Joachim Nilsson 726f0d428d Initial conversion to GNU Configure & Build System
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-03-14 22:35:54 +01:00
Joachim Nilsson 0704947c33 Merge pull request #20 from westermo/wmo/2.4
inetd reload fixes

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-19 15:11:20 +01:00
Tobias Waldekranz 2555fe8e96 inetd: Flush existing filters on reload
Flush any existing filter rules when a configuration file is
updated. Otherwise filters are simply appended to the old
configuration which can cause finit to accept connections on
interfaces that are blocked in the new configuration.
2016-02-19 12:53:39 +01:00
Tobias Waldekranz c41016ef32 Only default to SIGHUP support on daemons
When parsing a service configuration, only default to SIGHUP support
if the service is a daemon. inetd services must be stop/started on
change.
2016-02-19 12:50:24 +01:00
Joachim Nilsson 5d86137142 Fix Coverity warning for unchecked return value from mkdir()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 23:13:47 +01:00
Joachim Nilsson bd58345b8c Fix Coverity warning for unterminated string from read()
The read() does not zero terminate the string, then we call strstr() on
that string ...

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 23:01:24 +01:00
Joachim Nilsson 994b589377 Fix Coverity warning for possible NULL ptr dereference
Add check for return value from strtok()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 22:55:39 +01:00
Joachim Nilsson caff08f58d Fix Coverity warning for unchecked return value from dirname()
- Check return value from dirname()
- Remove static from local compose buffer

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 22:50:08 +01:00
Joachim Nilsson d58c58d972 Test build with both GCC and Clang (LLVM)
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:57:58 +01:00
Joachim Nilsson a97499999e Remove initial make distclean step, not needed
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:54:34 +01:00
Joachim Nilsson 9c7046a25d Fix linking error with new autotools based libraries
We may have reached peak Makefile mastery now ...

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:44:21 +01:00
Joachim Nilsson cd5d55ef51 Call libuev configure script if local libuev is used
Same as for libite, libuev has also changed to autotools, so
call its autogen.sh and configure script in cascade from our
own.  Aslo add safeguards to clean/distclean targets so we
do not attempt to enter the libuev subdirectory if it's not
configured.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:43:04 +01:00
Joachim Nilsson 5eb172ed46 Update to libuEv v1.3.1
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:23:16 +01:00
Joachim Nilsson 3d99940252 Bump version to 3.0-beta1
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:10:47 +01:00
Joachim Nilsson fce420121c Fix unused variable warning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:10:25 +01:00
Joachim Nilsson 6c91c4ec12 Fix unused variable warning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:09:31 +01:00
Joachim Nilsson 2cb5997abe Fix signed/unsigned comparison warning
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:09:20 +01:00
Joachim Nilsson 5afb47bc9b ChangeLog: Add missing links to referenced previous versions
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:08:21 +01:00
Joachim Nilsson d6d92f1df7 Increase indentation in pretty printing slightly for autotools
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:07:17 +01:00
Joachim Nilsson 4899bba06b Call libite configure script if local libite is used
The new libite uses autotools to build, and since we use it as a GIT
submodule we have to call its autogen.sh before we call the configure
script, from within the Finit configure script.  We may have to move
to use autotools even for Finit ...

Also, make sure to only call clean/distclean on libite if the local
version is selected at configure time.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 21:06:46 +01:00
Joachim Nilsson 97a160dd1d Update to libite v1.4.3
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 20:26:40 +01:00
Joachim Nilsson 901bdc68ba Merge pull request #19 from westermo/wmo/2.4
Service state machine and refactored event/condition handling

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-02-05 16:44:51 +01:00
Tobias Waldekranz c6055031b8 Avoid unnecessary restarts of services that do not support SIGHUP
When a service's condition transitions to `flux`, put it in the
waiting state, even if it does not support SIGHUP. That way, if the
condition returns to `on` we can simply SIGCONT it. If it goes to
`off` it will still be stop/started as before.
2016-02-05 13:45:06 +01:00
Tobias Waldekranz e8d699c194 Mark inetd services as clean on dynamic reload
When reloading dynamic services, inetd services deleted marker was not
being cleaned. This caused finit to stop and start all inetd services
at every other reload.
2016-01-28 14:52:49 +01:00
Tobias Waldekranz 80273555c5 Do all service transitions in a helper function
This eases development, since it makes it easy to set a breakpoint on
a specific state transition.
2016-01-28 13:44:27 +01:00
Tobias Waldekranz 6ece4b8fa3 inetd: Re-integrate the inetd subsystem into the new service model
This patch introduces a new service type called SVC_TYPE_INETD_CONN,
which represents a running inetd connection. These are handled in much
the same way as tasks. I.e. they are considered one-time jobs, with
the difference that they are removed upon completion.
2016-01-15 10:07:15 +01:00
Tobias Waldekranz 0beb566e45 git: Ignore Emacs backup files 2016-01-13 16:02:46 +01:00
Tobias Waldekranz c641a1374e Do not ignore updated services when cleaning up removed ones
When cleaning up removed services, the assumption was made that if a
service was not 'removed', it was 'clean'. In reality, it could also
be 'updated', which was then overwritten, causing services not being
restarted. Don't do that.

As a future precaution, make the dirty field const, only allowing
updates from accessor methods.
2016-01-13 15:14:27 +01:00