eINIT 0.40.0: Documentation

Magnus Deininger

This is an attempt at documenting eINIT. We should be done by version 0.40.0, but we're not quite sure whether or not we'll be able to make it till then.

This is currently a WIP ("Work in Progress"), but your feedback is greatly appreciated. If you'd like to point out flaws, shortcomings or ideas, please file an issue on einit.org, or join #einit on freenode. We're eager to hear from you. :)


Table of Contents
1. Introduction
What is eINIT?
Why would I want to use eINIT?
2. User's Guide
Installing eINIT
Installing eINIT manually
Get the sources
Unpack the tarballs
Get the things you need via git
Compile and Install
Stuff you'll need
Compiling and Installing all the sources with scons
Installing eINIT on Gentoo/Linux
Educating your Package Manager to use eINIT's overlay
Portage + Layman
Paludis
Installation
Configuring eINIT
(Semi-Required) Set up your Network
(Usually Required) Examine /etc/einit/modes.xml
(Optional) Edit /etc/einit/fstab.xml
Run 'einit --wtf'!
Configuring your Bootloader to use eINIT
GRUB
Gentoo + Genkernel Users
Sabayon Users
LILO
Controlling eINIT
Manpages
Common Tasks
3. Developer's Guide
Introduction
C Modules
Module Descriptors
Module Functions
configure()
cleanup()
enable()
disable()
scanmodules()
Using Events
Event Handlers
Small Module Templates
Template for a service-providing Module
Template for a passive Module
Template for a Module-Loader
XML/SH Modules
Scheme Modules
Submitting Modules
License and License Issues
A. Terms and Concepts
Modules
Modules that provide Services
Modules that provide Modules ("Module Loaders")
Passive Modules
Shadow Modules
Modules that provide Core Functionality
Variables / Configuration Data
What is the 'native' Configuration Format? It's XML, right?
Why does eINIT use XML by default?
Dependencies
Dependency Overrides
Services
Backup-Modules
Module-IDs v.s. Service Names
"Preferring" Modules for Services
Service Groups
Modes
Mode Switches
Events
Events and Event Subsystems
IPC Events
Event Relays (e.g. via D-Bus)
Registered Functions
B. Credits and Legalities
<eXpat/>
FreeBSD
libixp
run-init
Contributors
Authors/Developers
List of Figures
3-1. C-Module Format
A-1. Modules, Module Loaders and the Core
A-2. 'native' eINIT Configuration Data Format
A-3. eINIT Dependencies
A-4. eINIT Services: The Big Picture
A-5. eINIT Services and Service Preferences
A-6. Modes: nicer Runlevels
A-7. Events
List of Examples
2-1. Unpacking the tarballs
2-2. Cloning the GIT repositories
2-3. Using scons
2-4. make.conf
2-5. using layman
2-6. /etc/portage/package.keywords
2-7. /etc/paludis/repositories/einit.conf
2-8. creating the repositories' directory
2-9. unmasking
2-10. emerging
2-11. paludis-i-ing
2-12. Typical GRUB Boot Record
2-13. Typical GRUB Boot Record, with eINIT
2-14. Typical genkernel GRUB Boot Record, with eINIT
2-15. Typical LILO Boot Record
2-16. Typical LILO Boot Record, with eINIT
3-1. A typical module descriptor
3-2. A configure()-function in C
3-3. A configure()-function that initialises parts of the core-descriptor
3-4. A cleanup()-function in C that gets registered in the configure()-function
3-5. An enable()-function in C that gets registered in the configure()-function
3-6. A disable()-function in C that gets registered in the configure()-function
3-7. A scanmodules()-function in C that gets registered in the configure()-function
3-8. An Event-Handler
3-9. Registering an Event-Handler
3-10. A Blank Service-Providing Module
3-11. A Blank Passive Module, which registers two Event Handlers and one Registered Function
3-12. A Blank Module-Loader Module