3 * "chain-to" can result in an unbreakable loop if the chain is circular. Chained services should not be
4 started during shutdown to prevent this (also avoids a race condition where the chained service is left
5 running when everything else has shutdown).
6 * Check that desired_state is getting set correctly. (Currently we don't decide whether a service
7 will restart until it stops...)
8 * Add dinit command line option to run as pid 1 but not as system manager (i.e., in a container).
9 Currently dinit can be used as pid 1 in a container but it may try to shut down the system when
10 it terminates. (This results in a harmless warning, but is not ideal).
14 * for non-system init, fail if the control socket exists, with option to override this and re-
15 create the socket instead (as system init does).
16 * report process launch failure reason (stage & errno) via dinitctl.
17 * Show "activated" state in "dinitctl list" output
18 * Service description sanity checks:
19 - Service type not specified
20 - maybe default to 'internal' if command not specified
21 - if command specified but type not, report an error
23 - errors should also be reported by dinitcheck
25 For version 1.0 (i.e. longer-term plans):
26 -----------------------------------------
27 * Service description parse errors should report line number
28 * dinitcheck should perform lint checks - do named files exist? etc
29 * Limit memory use by control connections. Currently clients can queue commands without limit.
30 * Consider using mlockall (if system process).
31 * Dinitctl command to get full status of a service.
32 * "triggered" service type: external process notifies Dinit when the service
34 - key thing is we want some way to eg mount filesystem once the disk comes up,
35 configure network when device comes up, etc, potentially relying an an external
37 * on shutdown, after repeated intervals with no activity, display information
38 about services we are waiting on (or, do this when prompted via ^C or C-A-D).
39 * Documentation must be complete (see section below).
40 * Proper support for socket activation?
41 * Chaining of service process input/output?
42 * Be able to boot and shutdown Linux and FreeBSD (or OpenBSD).
46 * On linux when running with PID != 1, write PID to /proc/sys/kernel/cad_pid so
47 that we still receive SIGINT from ctrl+alt+del (must be done after /proc is
48 mounted, possibly could be left to a service script)
49 * Perhaps need a way to prevent script services from re-starting.
50 (eg there's no need to mount filesystems twice; there might be various other
51 system initialisations that can't or shouldn't really be "undone" and so do
52 not need to be re-done).
53 * Internationalisation
54 * A service can prevent shutdown/reboot by failing to stop. Maybe make
55 multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
56 immediate shutdown (or launch a simple control interface).
57 * When we take down a service or tty session, it would be ideal if we could kill
58 the whole process tree, not just the leader process (need cgroups or pid
59 namespace or other mechanism).
60 * Allow logging tasks to memory (growing or circular buffer) and later
61 switching to disk logging (allows for filesystem mounted readonly on boot).
62 But perhaps this really the responsibility of another daemon.
63 * Allow running services with different resource limits, chroot, cgroups,
64 namespaces (pid/fs/uid), etc
65 * Support chaining service output to another process (logger) input; if the
66 service dies the file descriptor of its stdout isn't closed and is reassigned
67 when the service is restarted, so that minimal output is lost.
68 - even more, it would be nice if a single logger process could be responsible
69 for receiving output from multiple services. This would require some kind of
70 protocol for passing new output descriptors to the logger (for when a
73 Even later / Maybe never:
74 -------------------------
75 * Support recognising /etc/init.d services automatically (as script services, with
76 no dependency management - or upstart compatible dependency management)
77 Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
78 * Place some reasonable, soft limit on the number of services to be started
79 simultaneously, to prevent thrashing. Services that are taking a long time
80 to start don't count to the limit. Maybe use CPU/IO usage as a controlling
82 * Cron-like tasks (if started, they run a sub-task periodically. Stopping the
83 task will wait until the sub-task is complete).
84 * Allow to run services attached to virtual tty, allow connection to that tty (ala "screen").
85 * SystemD-like handling of filesystem mounts (see autofs documentation in kernel)
86 i.e. a mount point gets an autofs attached, and lazily gets mounted when accessed
87 (or is mounted in parallel). Probably put the functionality in a separate daemon.
92 * Design philosophy/rationale document
93 * More system integration documentation?