Installation

At the moment only simple test services are available, so at the moment this system is not a complete replacement for your current init script set. (You should write the services yourself). For anyone how wants to give it a try, and wants to write some services, here are some tips for installation:

  1. Edit src/pinit.h. The pinit conf directory should be set to where pinit is installed. I recommend running from your home directory. The socket file will be created once startup is done, so the directory should be read/write by then.
    /* Specify where config files can be found */
    #define PINIT_CONF "/home/wouter/source/pinit/conf/"
    #define PINIT_CONF_SERVICES "services/"
    #define PINIT_CONF_MODULES "modules/"
    #define PINIT_CONF_PROFILES "profiles/"
    #define PINIT_CONF_STATES "states/"
    
    /* Specify where the socket should be created */
    #define PINIT_SOCKET "/tmp/pinit"
    #define PINIT_VERSION_MAJOR "0"
    #define PINIT_VERSION_MINOR "1"
    	
  2. Compile the package:
    ./configure
    make
    	
  3. Look at conf/profiles/default to see what services you need. Service specifications are in conf/services.
  4. Add a config entry to your grub/lilo boot configuration. Offcourse you should keep a backup item. It won't boot correctly the first time, i promise.
    linux-2.4.20-pinit:
    	kernel (hd0,1)/boot/kernel-2.4.20 init=/home/wouter/source/pinit/bin/pinit
    	boot
    	
  5. Give it a try, hack services, whatever. The default profile is specific for my system and relies heavily on devfs. When creating daemons, remember that the daemon has to be run in foreground. It should not fork into the background, because pinit can not monitor it in that state. Some daemons have a command line switch to run in foreground. Daemons that do not have this switch should be fixed :-), or started from a command service.
  6. Look at src/modules/ to see the source for modules. Modules need to be installed in conf/modules to be used (use a symlink)
  7. Please provide (useful) feedback

Finally some handy aliases:

	alias shutdown = `pinitctrl shutdown halt`
	alias reboot = `pinitctrl shutdown reboot`

Thank You

Download

pinit 0.1