3 * Load services from several different directories, with an order of precedence,
4 to allow for packaged service descriptions and user-modified service
6 * Make default control socket location build-time configurable
10 * Support S6-style startup notification (write to fd)
11 * Man pages for all programs (done for dinit, not for dinitctl/shutdown/etc).
12 * Write wtmp entry on startup (see simpleinit)
13 * "triggered" service type: external process notifies Dinit when the service
15 * on shutdown, after repeated intervals with no activity, display information
16 about services we are waiting on (or, do this when prompted via ^C or C-A-D).
17 * A (perhaps limited) way(s) to modify a service description after it is loaded -
18 eg add/remove dependencies, change properties.
19 * Think about detecting runs-on-console dependency conflicts (i.e. if A runs-on-console and
20 B depends on A and runs-on-consle then B can never start).
21 * Documentation must be complete (see section below).
22 * Package-manager-friendly way to enable/disable services.
23 Perhaps a service can specify a dependency file (with dependency type) where
24 the file contains a list of service names, or if it is a directory, each
25 filename within corresponds to a service that is a dependency.
26 * Be able to boot and shutdown Linux and FreeBSD.
30 * On linux when running with PID != 1, write PID to /proc/sys/kernel/cad_pid so
31 that we still receive SIGINT from ctrl+alt+del (must be done after /proc is
32 mounted, possibly could be left to a service script)
33 * Perhaps need a way to prevent script services from re-starting.
34 (eg there's no need to mount filesystems twice; there might be various other
35 system initialisations that can't or shouldn't really be "undone" and so do
36 not need to be re-done).
37 * Internationalisation
38 * A service can prevent shutdown/reboot by failing to stop. Maybe make
39 multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
40 immediate shutdown (or launch a simple control interface).
41 * When we take down a service or tty session, it would be ideal if we could kill
42 the whole process tree, not just the leader process (need cgroups or pid
43 namespace or other mechanism).
44 * Allow logging tasks to memory (growing or circular buffer) and later
45 switching to disk logging (allows for filesystem mounted readonly on boot).
46 But perhaps this really the responsibility of another daemon.
47 * Allow running services with different resource limits, chroot, cgroups,
48 namespaces (pid/fs/uid), etc
50 Even later / Maybe never:
51 -------------------------
52 * Support recognising /etc/init.d services automatically (as script services, with
53 no dependency management - or upstart compatible dependency management)
54 Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
55 * Place some reasonable, soft limit on the number of services to be started
56 simultaneously, to prevent thrashing. Services that are taking a long time
57 to start don't count to the limit. Maybe use CPU/IO usage as a controlling
59 * Cron-like tasks (if started, they run a sub-task periodically. Stopping the
60 task will wait until the sub-task is complete).
61 * Allow to run services attached to virtual tty, allow connection to that tty (ala "screen").
62 * SystemD-like handling of filesystem mounts (see autofs documentation in kernel)
63 i.e. a mount point gets an autofs attached, and lazily gets mounted when accessed
64 (or is mounted in parallel). Probably put the functionality in a separate daemon.
69 * Design philosophy/rationale document
70 * Coding style guidelines
72 * What's the best TERM setting? gogetty gives me "linux" but I think other variants may be
73 better (eg "linux-c").
75 * Figure out the ConsoleKit/logind / PolicyKit mess & how dinit needs to fit into it.
76 * Consolekit/logind tracks "sessions". Provides a mechanism to mark a session starting,
77 associates processes with sessions, provides calls to terminate sessions etc (why?!!)
78 Can use environment variable or cgroups to track processes in a session.
79 A PAM module exists to create/destroy sessions.
80 * Consolekit/logind also allows for requesting shutdown, reboot, and inhibiting reboot
82 * "seats" are a set of input/output hardware (mouse/keyboard/monitor) on which a session
83 can be run. You can have multiple sessions on a seat - one is in the foreground
84 (eg linux virtual ttys implement multiple sessions on a single seat).
85 Sessions can run without a seat (eg ssh session).