From 2a025356d4b753217145e2764c1fc6e4304c192c Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 26 Sep 2012 13:20:18 +0200 Subject: [PATCH] Bump version, update README and add TODO and dist: target to Makefile Preparing for 1.0 release. Signed-off-by: Joachim Nilsson --- Makefile | 11 +++++-- README | 99 ++++++++++++++++++++++++++++++++++---------------------- TODO | 5 +++ 3 files changed, 75 insertions(+), 40 deletions(-) create mode 100644 TODO diff --git a/Makefile b/Makefile index 1313cf9e..b282f9b7 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,11 @@ ROOTDIR ?= $(shell pwd) # Plugin directory, fall back to this directory if unset in environment PLUGIN_DIR ?= /lib/finit/plugins -VERSION = 1.0-pre -PKG = finit-$(VERSION) +#VERSION ?= $(shell git tag -l | tail -1) +VERSION ?= 1.0 EXEC = finit +PKG = $(EXEC)-$(VERSION) +ARCHIVE = $(PKG).tar.xz OBJS = finit.o conf.o helpers.o signal.o svc.o plugin.o OBJS += strlcpy.o SRCS = $(OBJS:.o=.c) @@ -86,6 +88,11 @@ distclean: clean -@$(RM) $(JUNK) unittest *.o $(MAKE) -C plugins $@ +dist: + @echo "Building xz tarball of $(PKG) in parent dir..." + git archive --format=tar --prefix=$(PKG)/ $(VERSION) | xz >../$(ARCHIVE) + @(cd ..; md5sum $(ARCHIVE) | tee $(ARCHIVE).md5) + # Include automatically generated rules, such as: # uncgi.o: .../some/dir/uncgi.c /usr/include/stdio.h # but don't bother during clean! diff --git a/README b/README index 9bbbc9c2..ce855fdf 100644 --- a/README +++ b/README @@ -1,53 +1,60 @@ -Finit -- A reimplementation of the EeePC SysV init replacement "fastinit" -========================================================================= +============================================================================== + Finit — A fast plugin-based /sbin/init replacement with service monitoring +============================================================================== -Finit is a reimplementation of the EeePC "fastinit" program based on its -system calls with gaps filled with frog DNA. +Welcome to finit! -Finit's original purpose was to build upon the general workings of the -EeePC fastinit and improve/optimize it for Xandros or alternative -distributions running on the Eeepc. However, focus has now shifted to -small embedded Linux systems and headless miniature servers with a need -for extremely fast boot. +This is a heavily extended version of the original /sbin/init replacement +finit_. The original was a reimplementation of the EeePC "fastinit" daemon +based on its system calls with gaps filled with frog DNA. -Nevertheless, finit comes in three flavors: +Focus of this extended version is towards small embedded Linux systems and +headless miniature servers with a need for extremely fast boot. In such +environments configurations rarely change and setup is rather static and +straight forward. -o finit-org is a replica of the Asus fastinit, -o finit-mod is an improved drop-in replacement for fastinit, and -o finit is a generic replacement for other systems. +In the world of finit we write C "scripts" to boot our system, this is what +gives the system its raw performance and the user full control. -Finit-mod and finit (previously finit-alt) were much improved with -patches from Metalshark. - -See the GitHub project's Wiki at https://github.com/troglobit/finit, or -the original author's home page at http://helllabs.org/finit/ for more -information. +If you chose finit you know what you want, a fast boot with no hassle. -Usage scenarios +Features +-------- + +Finit supports the following features: + +- Service monitoring, restarting a service when it exits +- Plugins, see example plugins/ directory. Plugins provide: + - Optional service callbacks, should the service run/restart/stop? + - Hooks, hook into the boot at predefined points to extend finit + - I/O, listen to external events and control finit behaviour/services + +Most extensions and functionality not purely related to what an /sbin/init +needs to start a system from the original finit_ has been reactored into +plugins with either hooks or I/O demands. + + +/etc/finit.conf --------------- -1. Provide an extremely fine tuned and fast boot on embedded systems or - Linux distributions for the EeePC or other netbooks. (finit) - -2. Replace the original Eeepc 702 fastinit (finit-mod) - -3. Provide a reverse engineered document of the original EeePC fastinit - implementation. (finit-org) - -Finit is distribution-specific. Currently it generates a finit-mdv -executable for Mandriva 2008/2008.1 systems. Smurfy ported it to -eeeXubuntu, and parts of his port have been merged to finit. +Contrary to most script based init alternatives (SysV init_, upstart_, OpenRC_ +and the likes) finit reads its configuration from /etc/finit.conf, see the +source code for available options, or the examples/ for a Debian 6.0 example +configuration. -Finit features --------------- +/etc/finit.d +------------ -Finit reads configuration information from /etc/finit.conf. See the -source code for available options. +At the end of the boot, when networking and all services are up, finit calls +its built-in run-parts(8) on the /etc/finit.d/ directory, akin to how the +/ec/rc.local file works in most other inits, only finit runs a directory of +scripts. This replaces the earlier /usr/sbin/services.sh support of the +original finit_. -Rebooting and halting +Rebooting and Halting --------------------- Finit handles SIGUSR1 and SIGUSR2 for reboot and halt, and listens to @@ -58,6 +65,22 @@ work. Debugging --------- -Add finit_debug to the kernel parameter line to enable trace messages -and to run a shell after the X server. +Add finit_debug, or --debug, to the kernel command line to enable trace +messages. A console getty is always started, see the file finit.h for +more useful comile-time tweaks. + +Contact +------- + +Finit is maintained collaborativly at htps://github.com/troglobit/finit — +please file a bug report, clone it, or send pull requests for bug fixes and +proposed extensions, or become a co-maintainer by contacting the main author. + +Regards + /Joachim Nilsson + +:: _finit: http://helllabs.org/finit/ +:: _init: http://savannah.nongnu.org/projects/sysvinit +:: _upstart: http://upstart.ubuntu.com/ +:: _openrc: http://www.gentoo.org/proj/en/base/openrc/ diff --git a/TODO b/TODO new file mode 100644 index 00000000..7b5d5093 --- /dev/null +++ b/TODO @@ -0,0 +1,5 @@ +* FHS changes, see http://askubuntu.com/questions/57297/why-has-var-run-been-migrated-to-run +* Look at Erik Troan's nash linuxrc parser for more inspiration +* Look at how to support a standard SysV init runlevel mechanism +* Arguments to finit, like to SysV init "init q" to reload finit.conf at runtime, etc. +* Implement initctl stop|start|reload and service stop|start|reload on top