2009-09-05 02:08:05 +00:00
|
|
|
cinit is a fast, small and simple init with support for profiles
|
|
|
|
|
2009-09-29 18:57:46 +00:00
|
|
|
## Introduction
|
|
|
|
|
|
|
|
cinit is a fast init system with dependency features and
|
|
|
|
profile support. It was orientated on the design of
|
|
|
|
Richard Goochs
|
|
|
|
[need concept](http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/)
|
|
|
|
and Felix von Leitners
|
|
|
|
[minit](http://www.fefe.de/minit/).
|
|
|
|
Minit does not support real dependencies (you don't know whether the
|
|
|
|
service you depend on really started) and the need concept is somehow
|
|
|
|
slow (as seen in gentoo).
|
|
|
|
In addition, minit needs libowfat and dietlibc, which may not be found
|
|
|
|
on every Unix system.
|
|
|
|
|
|
|
|
### Cinit main features
|
|
|
|
|
|
|
|
* portability: it should run on every Unix
|
|
|
|
* true dependencies (soft and hard!)
|
|
|
|
* parallel execution
|
|
|
|
* highly customisable (see conf/*)
|
|
|
|
* profile support (specify what services to start depending on the profile)
|
|
|
|
|
|
|
|
|
|
|
|
### Why should I use cinit?
|
2009-09-05 02:08:05 +00:00
|
|
|
|
2010-06-24 12:46:57 +00:00
|
|
|
* To significantly speedup the startup process
|
2009-09-05 02:08:05 +00:00
|
|
|
* To use highest level of parallelisation at startup
|
|
|
|
* To benefit from real dependencies (so called ***needs*** and ***wants***)
|
|
|
|
* To easily create profiles that can be chosen at startup (even **before** init is started!)
|
|
|
|
|
2009-09-29 18:57:46 +00:00
|
|
|
### How does cinit work?
|
2009-09-05 02:08:05 +00:00
|
|
|
|
|
|
|
Cinit creates a dependency tree at startup and executes the services.
|
|
|
|
A service can have two type of dependencies:
|
|
|
|
|
|
|
|
* ***wants*** describe soft dependencies (i.e. it's not fatal if the wanted service fails to start)
|
|
|
|
* ***needs*** describe hard dependencies (if the needed service fails, the depending won't be started)
|
|
|
|
|
|
|
|
Let's have a look at an example:
|
|
|
|
|
|
|
|
|
|
|
|
A
|
|
|
|
(wants)
|
|
|
|
/ \
|
|
|
|
|------> B \ C
|
|
|
|
| / \ / \
|
|
|
|
^ (needs) (needs) (wants)
|
|
|
|
| D E F
|
|
|
|
| |
|
|
|
|
|------<------(needs)----|
|
|
|
|
|
|
|
|
|
|
|
|
Or in words:
|
|
|
|
|
|
|
|
* B and C do not have dependencies
|
|
|
|
* They will be started at the beginning
|
|
|
|
* A wants B and C
|
2009-09-05 02:58:31 +00:00
|
|
|
* A waits until B and C are executed and started afterwards,
|
|
|
|
independently of the success of B and C
|
|
|
|
* A will also be started, if B and C fail to start.
|
2009-09-05 02:08:05 +00:00
|
|
|
* D needs B
|
|
|
|
* D will only be started, if B is successfully started
|
|
|
|
* E needs B and C
|
|
|
|
* E will only be started, if both B and C are successfully started
|
|
|
|
* F wants C and needs B
|
|
|
|
* F will only be started, if B is successfully started
|
|
|
|
* F waits until C is started and is started afterwards
|
|
|
|
|
|
|
|
## Getting cinit
|
|
|
|
|
|
|
|
### Development versions
|
|
|
|
You can get the latest (development) version via git:
|
|
|
|
|
|
|
|
git clone git://git.schottelius.org/cLinux/cinit.git
|
|
|
|
|
|
|
|
Additionally, the following other git ressources are available:
|
|
|
|
|
|
|
|
* [Gitweb](http://git.schottelius.org/?p=cLinux/cinit.git;a=summary).
|
|
|
|
* [Mirror at github](http://github.com/telmich/cinit)
|
2009-09-23 15:05:50 +00:00
|
|
|
* [Mirror at gitorious](http://gitorious.org/cinit)
|
2009-09-05 02:08:05 +00:00
|
|
|
|
2009-09-21 19:54:30 +00:00
|
|
|
|
|
|
|
### Archives
|
|
|
|
|
2009-11-30 06:27:49 +00:00
|
|
|
* [[cinit-0.3pre19.tar.bz2|archives/cinit-0.3pre19.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre19/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre19/doc/changes/0.3pre19]]
|
2009-11-05 20:53:23 +00:00
|
|
|
* [[cinit-0.3pre18.tar.bz2|archives/cinit-0.3pre18.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre18/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre18/doc/changes/0.3pre18]]
|
2009-10-05 17:14:52 +00:00
|
|
|
* [[cinit-0.3pre17.tar.bz2|archives/cinit-0.3pre17.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre17/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre17/doc/changes/0.3pre17]]
|
2009-09-29 19:36:27 +00:00
|
|
|
* [[cinit-0.3pre16.tar.bz2|archives/cinit-0.3pre16.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre16/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre16/doc/changes/0.3pre16]]
|
2009-09-23 06:18:45 +00:00
|
|
|
* [[cinit-0.3pre15.tar.bz2|archives/cinit-0.3pre15.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre15/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre15/doc/changes/0.3pre15]]
|
2009-09-21 19:54:30 +00:00
|
|
|
* [[cinit-0.3pre14.tar.bz2|archives/cinit-0.3pre14.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre14/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre14/CHANGES]]
|
2009-09-21 20:00:25 +00:00
|
|
|
* [[cinit-0.3pre13.tar.bz2|archives/cinit-0.3pre13.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre13/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre13/CHANGES]]
|
|
|
|
* [[cinit-0.3pre12.tar.bz2|archives/cinit-0.3pre12.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre12/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre12/CHANGES]]
|
|
|
|
* [[cinit-0.3pre11.tar.bz2|archives/cinit-0.3pre11.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre11/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre11/CHANGES]]
|
|
|
|
* [[cinit-0.3pre10.tar.bz2|archives/cinit-0.3pre10.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre10/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre10/CHANGES]]
|
2009-09-21 19:54:30 +00:00
|
|
|
* [[cinit-0.3pre9.tar.bz2|archives/cinit-0.3pre9.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre9/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre9/CHANGES]]
|
2009-09-21 20:00:25 +00:00
|
|
|
* [[cinit-0.3pre8.tar.bz2|archives/cinit-0.3pre8.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre8/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre8/CHANGES]]
|
|
|
|
* [[cinit-0.3pre7.tar.bz2|archives/cinit-0.3pre7.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre7/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre7/CHANGES]]
|
|
|
|
* [[cinit-0.3pre6.tar.bz2|archives/cinit-0.3pre6.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre6/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre6/CHANGES]]
|
|
|
|
* [[cinit-0.3pre5.tar.bz2|archives/cinit-0.3pre5.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre5/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre5/CHANGES]]
|
|
|
|
* [[cinit-0.3pre4.tar.bz2|archives/cinit-0.3pre4.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre4/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre4/CHANGES]]
|
|
|
|
* [[cinit-0.3pre3.tar.bz2|archives/cinit-0.3pre3.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre3/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre3/CHANGES]]
|
|
|
|
* [[cinit-0.3pre2.tar.bz2|archives/cinit-0.3pre2.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre2/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre2/CHANGES]]
|
|
|
|
* [[cinit-0.3pre1.tar.bz2|archives/cinit-0.3pre1.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.3pre1/))
|
|
|
|
[[changes|browse_source/cinit-0.3pre1/CHANGES]]
|
|
|
|
* [[cinit-0.2.1.tar.bz2|archives/cinit-0.2.1.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.2.1/))
|
|
|
|
[[changes|browse_source/cinit-0.2.1/CHANGES]]
|
|
|
|
* [[cinit-0.2.tar.bz2|archives/cinit-0.2.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.2/))
|
|
|
|
[[changes|browse_source/cinit-0.2/CHANGES]]
|
|
|
|
* [[cinit-0.1.tar.bz2|archives/cinit-0.1.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.1/))
|
|
|
|
[[changes|browse_source/cinit-0.1/CHANGES]]
|
|
|
|
* [[cinit-0.0.8.tar.bz2|archives/cinit-0.0.8.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.0.8/))
|
|
|
|
[[changes|browse_source/cinit-0.0.8/CHANGES]]
|
|
|
|
* [[cinit-0.0.7.tar.bz2|archives/cinit-0.0.7.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.0.7/))
|
|
|
|
[[changes|browse_source/cinit-0.0.7/CHANGES]]
|
|
|
|
* [[cinit-0.0.6.tar.bz2|archives/cinit-0.0.6.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.0.6/))
|
|
|
|
[[changes|browse_source/cinit-0.0.6/CHANGES]]
|
|
|
|
* [[cinit-0.0.5.tar.bz2|archives/cinit-0.0.5.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.0.5/))
|
|
|
|
[[changes|browse_source/cinit-0.0.5/CHANGES]]
|
|
|
|
* [[cinit-0.0.4.tar.bz2|archives/cinit-0.0.4.tar.bz2]]
|
|
|
|
([browse source](browse_source/cinit-0.0.4/))
|
|
|
|
[[changes|browse_source/cinit-0.0.4/CHANGES]]
|
2009-09-21 19:54:30 +00:00
|
|
|
|
2009-09-29 18:57:46 +00:00
|
|
|
## Documentation
|
2009-09-22 20:14:10 +00:00
|
|
|
The documentation is currently spread all over the ***doc/*** directory
|
|
|
|
within the tarball and is being cleaned up. Additionally there
|
|
|
|
are two presentations available:
|
|
|
|
|
2009-09-22 09:49:13 +00:00
|
|
|
* [[2005-10-22: (German) speech at Technophil|software/cinit/speeches/2005-10-22]]
|
|
|
|
* [[2005-08-06: (German) online speech|software/cinit/speeches/2005-08-06]]
|
2009-09-22 09:40:00 +00:00
|
|
|
|
2009-09-29 18:57:46 +00:00
|
|
|
### Pre-Configuring
|
|
|
|
If you want to fine tune cinit parameters, add different path names,
|
|
|
|
change the DESTDIR, ... have a look at conf/*.
|
|
|
|
|
|
|
|
|
|
|
|
### Installing cinit
|
|
|
|
You can install cinit parallel to any other init-system, it won't
|
|
|
|
kill other init's config nor /sbin/init, if it exists:
|
|
|
|
|
|
|
|
# make all install
|
|
|
|
|
|
|
|
This will create /sbin/cinit.
|
|
|
|
If /sbin/init does not exist, it will be linked to /sbin/cinit.
|
|
|
|
|
|
|
|
### Configuring cinit
|
|
|
|
You'll have to configure cinit in /etc/cinit and add services,
|
|
|
|
before you can use it.
|
|
|
|
|
|
|
|
Please read doc/configuring.cinit for details.
|
|
|
|
Please read doc/FAO if there are still questions open.
|
|
|
|
|
|
|
|
There are some testing examples below doc/examples/, to be used
|
|
|
|
as a starting point.
|
|
|
|
|
|
|
|
There are currently no tools to merge your existing init-system
|
|
|
|
to cinit (like sysvinit-merge, bsd-merge or minit-merge) available,
|
|
|
|
but they are in the making (see various bugs in ditz).
|
|
|
|
|
|
|
|
### Configuring the OS / Kernel
|
|
|
|
|
|
|
|
After configuring cinit you need to tell your kernel to boot cinit instead
|
|
|
|
of your current init system. How to do that depends on your system:
|
|
|
|
|
|
|
|
* Linux/LILO and Linux/yaboot (ppc):
|
|
|
|
* append="init=/sbin/cinit"
|
|
|
|
* grub1 and grub2:
|
|
|
|
* kernel <normal kernel specification> init=/sbin/cinit
|
|
|
|
|
|
|
|
## Support
|
2009-09-22 09:40:00 +00:00
|
|
|
|
|
|
|
### IRC
|
|
|
|
You can join the development ***IRC channel***
|
2011-04-19 22:06:22 +00:00
|
|
|
[#cstar on irc.freenode.org](irc://irc.freenode.org/#cstar).
|
2009-09-05 02:08:05 +00:00
|
|
|
|
2009-09-29 18:57:46 +00:00
|
|
|
### Mailing list
|
|
|
|
Bug reports, questions, patches, etc. should be send to the
|
|
|
|
[cinit mailing list](http://l.schottelius.org/mailman/listinfo/cinit).
|
|
|
|
|
2009-09-07 07:42:45 +00:00
|
|
|
## Related websites
|
|
|
|
|
2009-09-29 18:57:46 +00:00
|
|
|
* [cinit](http://www.nico.schottelius.org/software/cinit/)
|
|
|
|
* [cinit mailing list](http://l.schottelius.org/mailman/listinfo/cinit)
|
2009-09-07 07:42:45 +00:00
|
|
|
* BSD init systems (same codebase):
|
2009-09-29 18:57:46 +00:00
|
|
|
* [FreeBSDs init](http://www.freebsd.org/cgi/cvsweb.cgi/src/sbin/init/)
|
|
|
|
* [NetBSDs init](http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/init/)
|
|
|
|
* [OpenBSDs init](http://www.openbsd.org/cgi-bin/cvsweb/src/sbin/init/)
|
|
|
|
* [initng](http://www.initng.org/)
|
|
|
|
* [minit](http://www.fefe.de/minit/)
|
|
|
|
* [runit](http://smarden.org/runit/)
|
|
|
|
* [need/simpleinit](http://www.atnf.csiro.au/~rgooch/linux/boot-scripts/)
|
|
|
|
* [sys-v-init](ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/)
|
|
|
|
* [upstart](http://www.netsplit.com/blog/work/canonical/upstart.html)
|
2009-09-22 20:19:45 +00:00
|
|
|
|
2009-09-07 07:42:45 +00:00
|
|
|
|
2009-09-05 02:08:05 +00:00
|
|
|
[[!tag unix]]
|