README (3049B) download
1To compile this, you need to have libowfat (http://www.fefe.de/libowfat/)!
2
3Each service gets its own directory under /etc/minit (change this in the
4source, it's a #define right at the start of minit.h).
5
6Each service directory can contain the following files/symlinks:
7
8 depends
9
10 a plain text file containing a service name per line.
11 Example: /etc/minit/sshd/depends could contain "network".
12 Each of these services will be started before this service is
13 started. If you need to wait for static initializations to
14 complete, use the sync flag.
15
16 run
17
18 a symbolic link to the program name. No hard link, because argv[0]
19 for the programs is created by extracting the part after the last
20 slash in the contents of the symbolic link.
21 Example: "/usr/bin/sshd" would be run with argv[0]="sshd".
22
23 params
24
25 a plain text file containing command line parameters for the
26 service, one parameter per line. No shell expansion is done. If
27 you need shell expansion, have run point to a shell script instead
28 of the real daemon. Note: Have the shell script exec the daemon
29 instead of simply running it to save system ressources.
30
31 respawn
32
33 touch this file to make minit respawn the process when it dies.
34 This should be touched for getty and network servers.
35
36 sync
37
38 touch this file to make minit wait until the service ends. sync is
39 mutually exclusive with respawn. This is meant for static
40 initializations like "ifconfig".
41
42 log
43
44 if this directory exists, it is taken as service and minit creates
45 a pipe between stdout of this service and stdin of the log service.
46 If the log service can not be started, this service will block if it
47 writes to stdout. File descriptors will be reused, i.e. if the log
48 process dies and is restarted, no log entries will be lost and there
49 will be no SIGPIPE.
50
51 nice
52
53 a plain text file containing the value to add to the nice level via the
54 nice systemcall.
55
56 in
57
58 this file is used for stdin.
59
60 out
61
62 this file is used for stdout and stderr.
63 e.g. a symlink to /dev/null
64
65
66Please see http://cr.yp.to/daemontools/multilog.html for a very good
67logging tool.
68
69minit will try to run the command line arguments as services. The
70kernel passes its arguments to init. That means you can for example
71have a service /etc/minit/sos-shell that starts a /bin/sh and then use
72LILO to boot "bzImage sos-shell". minit will then run that service.
73If none of the services worked (or none were given), minit will spawn
74the service "default". The normal way to configure minit is to have
75default be an empty service and just list all the services you want
76minit to start at boot time in default/depends.
77
78Other special services (besides "default") are "ctrlaltdel" and "kbreq".
79ctrlaltdel will be run when the console user presses ctrl-alt-del and is
80meant to reboot the computer. kbreq is the keyboard request, which
81can be mapped using loadkeys. On my box, it is on Alt+Arrow-Up. I use
82it to shut down the computer.