Commit Graph
55 Commits
Author SHA1 Message Date
Joachim Nilsson e4401f92ad Bump version for v3.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-10-19 09:58:05 +02:00
Joachim Nilsson a2f4b35e4e Fix #77: Remove deprecated startx and user .conf settings
It is strongly recommended to instead use the service stanza to start
XDM/GDM, or use startx after a regular login.

Note: the `user NAME` setting was always reserved for use with startx

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-08-30 15:01:05 +02:00
Joachim Nilsson 52fe525442 Update version requirement for libite, v1.9.2
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-09 16:25:01 +02:00
Joachim Nilsson e791e3dbe9 Make silent bootup the default, use --enable-progress for old style
This patch disables console heading and bootup progress messages by
default. Use --enable-progress to get the old behavior back, or try
the new HOOK_BANNER and HOOK_SVC_UP to run a custom progress.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-09 15:05:32 +02:00
Joachim Nilsson 91480a0f02 configure: Check for termios.h, needed by screen_width()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-04 12:55:10 +02:00
Joachim Nilsson 9c6e046d93 Remove hard-coded paths to system tools available in $PATH
This patch implemements a new feature of libite v1.9.1, whichp(), which
instead of fexist() that requires an absolute path, searches $PATH.

For reference, see issue #69 and PRs #70 and #72.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-03 13:13:55 +02:00
Joachim Nilsson 516dbcc512 Remove --disable-quiet and quiet mode, default to a sane behavior
This patch is a follow-up to 1f1c2e0 which introduced the new semantics
for the very confusing quiet and silent modes.

The initial idea was to loosely follow the kernel cmdline 'quiet' option
and as a working concept this was good.  The resulting code, however,
became unnecessarily complex and the configure options impossible to
explain.

With this patch the quiet mode, and thus the --disable-quiet configure
option, is removed.  Finit now defaults to a sane behavior: services are
shown only at startup.   The --enable-silent option works like it did
before, silencing everything.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-07-02 13:40:54 +02:00
Joachim Nilsson d4001064a0 configure: Fix hard coded FIFO path, found by previous commit
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-06-11 22:52:09 +02:00
Joachim Nilsson fffdad7645 configure: Add neat summary of settings, from lldpd
Hat tip to @vincentbernat

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-06-11 22:19:54 +02:00
Joachim Nilsson 9974d65756 Fix #66: Rotate /var/log/wtmp log max:2, size:100k
This patch adds a simple log-rotate function to the UTMP, WTMP, BTMP,
and lastlog files.  Enabled by default, disable with:

    configure --disable-logrotate

Even though it can rotate /run/utmp it is unlikely this file will grow
that much during a system's uptime.

The hard-coded defaults are to keep up to two (2) previous versions
of the files and rotate on file size >= 100k.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-01-25 19:40:06 +01:00
Joachim Nilsson 3b53dfcaed configure: Simplify description
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-01-16 07:37:34 +01:00
Joachim Nilsson fff68b7b06 Relocate source files to an src/ subdirectory
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-01-16 01:31:02 +01:00
Joachim Nilsson f95cd38ddb Refactor #ifndef INETD_DISABLED --> #ifdef INETD_ENABLED
This patch changes the confusing logic in all #ifndef INETD_DISABLED
statements to instead be #ifdef INETD_ENABLED, which is quite a bit
more readable.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-12-30 13:34:31 +01:00
Joachim Nilsson 83915b42f3 Bump version for 3.0-rc2, second pre-release
All known major issues triaged or fixed.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-12-09 01:03:18 +01:00
Joachim Nilsson 146685c2c2 Fix inverted --enable-quiet option
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-12-03 06:15:46 +01:00
Joachim Nilsson 3cc2df20f9 Update minimum libuev requirement, v1.5.2
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-11-27 20:39:36 +01:00
Joachim Nilsson b674aad802 watchdog: Add simple built-in watchdog daemon
This patch adds a simple but effective watchdog daemon with support for
handover to an external daemon, should one register using the API.

Disabled by default, enable by:

    configure --enable-watchdog

The watchdog forks to the background, opening /dev/watchdog setting a
three second timeout, and kicking every second.  At shutdown/reboot the
daemon will receive SIGPWR from Finit to exit and cause a WDT reboot.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-10-24 00:06:04 +02:00
Joachim Nilsson ee901b018c Finit bringup: add optional fallback shell
This patch adds an `--enable-fallback-shell` option to confiugre.
When enabled Finit will start `/bin/sh` on the console, but only
if there are no active TTYs running in the current runlevel.

With this it will be easier to do board bringup with Finit, but it also
enables using the fallback shell in a rescue mode (runlevel) where no
TTYs are allowed to run.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-18 10:27:03 +02:00
Joachim Nilsson 698b87dd35 Clean out remnants of old (now unused) fallback shell
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-17 21:09:45 +02:00
Joachim Nilsson dd566acfd2 Update ChangeLog and bump version for v3.0-rc1
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-14 00:04:00 +02:00
Joachim Nilsson 7b215e4fd4 Update dependencies for libuEv and libite (-lite)
This patch makes Finit require libuEv v1.4.2, a minor bugfix update, and
libite (-lite) v1.8.2, which is quite a bit more than just a few bug
fixes.  The most relevant fixes are the removal of implicit logging for
touch(), makedir(), makefifo(), and erase() inline functions.  The
release also removed implicit logging to stderr on error, as well as a
a few build fixes for running on musl libc.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-05 00:24:55 +02:00
Joachim Nilsson c3adf3bf51 Bump version to v3.0-beta2 no more feature expected
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-04 20:48:49 +02:00
Joachim Nilsson 3ca28e765d Fix #38: Add --enable-emergency-shell fallback debug mode
This patch adds a very special debug mode to Finit.  With this feature
enabled the actual duties of PID 1 is forked off early to a child.  If
that child ever dies, usually due to a SIGSEGV, this wakes up the real
PID 1 which lauches a debug shell on the console.

Remember to disable 'quiet' and enable '--debug' on the kernel command
line to get all the debug logs -- which these days goes into the kernel
log in /dev/kmsg -- simply `cat /dev/kmsg` and use Ctrl-C to get the
shell prompt back.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-04 20:27:12 +02:00
Joachim Nilsson 47f3e2ca04 Clarify what --disable-quiet actually does
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-09-04 18:40:58 +02:00
Joachim Nilsson 54467d4467 configure: Minor whitespace changes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-08-22 12:39:51 +02:00
Joachim Nilsson 3853061f09 Remove --enable-embedded configure option
Instead of ugly #ifdefs we now probe for mdev or udevd at runtime.  Take
care to check for udev-finalize and location of udevd, it differs a lot
between distros.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-08-15 00:25:07 +02:00
Joachim Nilsson c38b452ac4 Add set/get/endfsent() support for musl libc
This patch adds support for the following /etc/fstab API's on systems
that do not have them, e.g. musl libc on Alpine Linux.

- setfsent()
- getfsent(), and
- endfsent()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-08-02 00:50:23 +02:00
Joachim Nilsson 4ede2a93b2 Change initctl FIFO from /dev/ to /var/run/
FIFOs, PID files, and other non-devices belong in /var/run (or /run
these days), not /dev -- as per FHS.  Compat with Debian SysV init.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-28 23:48:38 +02:00
Joachim Nilsson d15633781b TTY: Major overhaul, move to built-in getty
The TTY handling in Finit has always been a bit of a patch work.  This
commit is an attempt at a first cleanup and simplification.

Included is a brand new built-in getty which should work fine on both
virtual and serial consoles.  It is however completely untested on the
latter serial consoles.

Still TODO: add support for /etc/securetty, add support for actually
setting TERM when calling /bin/login.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-28 23:48:38 +02:00
Joachim Nilsson f191266a33 Add --with-random-seed to enable urandom plugin
By default the urandom plugin will use /var/lib/misc/random-seed across
reboots to seed /dev/urandom at boot.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-21 00:41:23 +02:00
Joachim Nilsson 329af172de Fix default GREET
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-20 19:58:21 +02:00
Joachim Nilsson d4fdf50636 Add optional support for RFC867, Daytime Protocol
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2016-07-18 12:06:59 +02:00
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 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 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 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 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 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 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 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 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 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 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