A simple pure-Go Linux init system.
Přejít na soubor
2017-11-19 11:21:06 +01:00
conf Add rsyslogd service 2017-11-19 11:21:06 +01:00
conftest Add rsyslogd service 2017-11-19 11:21:06 +01:00
lutractl Ignore targets in lutractl status command 2017-11-19 10:53:02 +01:00
lutrainit Move the fix of rights for socket and fix his exec 2017-11-19 10:40:35 +01:00
shared/ipc Ignore targets in lutractl status command 2017-11-19 10:53:02 +01:00
.dockerignore Add sample LXC and docker configs 2017-11-12 11:29:26 +01:00
.drone.yml Add drone config 2017-11-12 14:38:01 +01:00
.gitignore Todo: nothing 2017-11-14 22:12:06 +01:00
common.mk Split makefiles 2017-11-12 11:57:31 +01:00
Dockerfile Add sample LXC and docker configs 2017-11-12 11:29:26 +01:00
LICENSE License update 2017-11-12 14:51:27 +01:00
lxc-config Add sample LXC and docker configs 2017-11-12 11:29:26 +01:00
MAIN_CONFIG.md Update of configurations and documentations 2017-06-24 15:23:53 +02:00
Makefile It magically works 2017-11-17 21:38:28 +01:00
README.md Make markdown linter happy 2017-11-17 21:41:31 +01:00
SERVICES.md Remove some unused older references to Needs and Provides 2017-11-17 07:58:46 +01:00

lutrainit

Main repository at https://dev.sigpipe.me/dashie/lutrainit

lutrainit is an init system for Linux written in Go.

lutrainit will do the following:

  1. Set the hostname
  • Remount the root filesystem[1]
  • Mount all other non-network filesystems and activate swap partitions
  • Start processes with config files in /etc/lutrainit/lutra.d/ after their dependencies ("Requires") are started. See conf/ for a samples config.
  • Start some TTY or anything other user-specified.
  • Kill running processes, unmount filesystems, and poweroff the system once that last login session ends.

(The way step 4 is handled isn't very elegant and will likely fail if you have too many slow startup processes.)

You can also create a file /etc/lutrainit/lutra.conf for some basic configuration.

If there are any lines of the form autologin: username it will automatically log in as that username. (If there's multiple autologin directives, it will create the appropriate number of ttys.) If any line contains persist: true, then when a tty exits, it'll respawn the tty instead of powering down the system once all the ttys are gone.

See the conf/ folder for what you can put in /etc/lutrainit/ including services files in /etc/lutrainit/lutra.d/.

lutractl

A tool exists and communicate with the init daemon using RPC on socket /run/ottersock, it can then show init version, statistics about goroutines, memory, etc.

Installation/Usage

sudo cp lutrainit/lutrainit /sbin
sudo cp lutractl/lutractl /sbin

then add init=/sbin/lutrainit to your grub configuration. (Or alternatively, make /sbin/init a symlink to lutrainit.)

[1] This shouldn't be required, since mount -a should take care of it in step 3 according to mount(8), but as far as I can tell it doesn't.