1 * shutdown command presently hangs if terminal output blocked (scroll lock
2 via ^S). Should use a buffer as dinit does, and pipe output from subcommands
5 * Document utilities (particularly dinitctl) in the README
10 * Documentation including sample service definitions
12 * Better error handling, logging of errors (largely done, still some patches
13 of code where it may be missing - check TODO's in code).
14 * Write wtmp entry on startup (see simpleinit)
15 * Allow running services as a different UID
16 * Must be able to specify kill timeout (after which kill -9!)
17 * Must rate-limit restart of services. Trying to start at a greater rate
18 should trigger failed-to-start notification.
19 * "triggered" service type: external process notifies Dinit when the service
21 * Ability to reload stopped services (reload service description)
26 * On linux when running with PID != 1, write PID to /proc/sys/kernel/cad_pid so
27 that we still receive SIGINT from ctrl+alt+del (must be done after /proc is
28 mounted, possibly could be left to a service script)
29 * Perhaps need a way to prevent script services from re-starting.
30 (eg there's no need to mount filesystems twice; there might be various other
31 system initialisations that can't or shouldn't really be "undone" and so do
32 not need to be re-done).
33 * Internationalisation
34 * More logging options. Can currently log to syslog only (well, with the
35 syslog protocol, to /dev/log). Possibly should be able to log directly
36 to a file, or input stream of another process.
37 * A service can prevent shutdown/reboot by failing to stop. Maybe make
38 multiple CTRL-ALT-DEL presses (or ^C since that's more portable) commence
39 immediate shutdown (or launch a simple control interface).
40 * Interruptible scripted services - where it's ok to terminate the start
41 script with a signal (and return the service to the STOPPED state). So a long-
42 running filesystem check, for instance, need not hold up shutdown.
43 * When we take down a service or tty session, it would be ideal if we could kill
44 the whole process tree, not just the leader process.
45 * Investigate using cn_proc netlink connector (cn_proc.h) to receive process
46 termination events even when running with PID != 1 (Linux only).
47 Also, there is the possibility of having a small, simple PID-1 init which
48 sends terminated process IDs over a pipe to Dinit. Finally, it may be possible
49 to run dinit (and subprocesses) in a new PID namespace (again linux-only).
50 * Allow logging tasks to memory (growing or circular buffer) and later
51 switching to disk logging (allows for filesystem mounted readonly on boot).
52 But perhaps this really the responsibility of another daemon.
53 * Allow running services with different resource limits, chroot, cgroups,
54 namespaces (pid/fs/uid), etc
55 * Make default control socket location build-time configurable
56 * Allow specifying a timeout for killing services; if they don't die within
57 the timeout (after a TERM) then hit them with a KILL.
58 * A (perhaps limited) way(s) to modify a service description after it is loaded -
59 eg add/remove dependencies, change properties.
61 Even later / Maybe never:
62 * Support recognising /etc/init.d services automatically (as script services, with
63 no dependency management - or upstart compatible dependency management)
64 Also BSD's rc.d style scripts (PROVIDE, REQUIRE).
65 * Place some reasonable, soft limit on the number of services to be started
66 simultaneously, to prevent thrashing. Services that are taking a long time
67 to start don't count to the limit. Maybe use CPU/IO usage as a controlling
69 * Cron-like tasks (if started, they run a sub-task periodically. Stopping the
70 task will wait until the sub-task is complete).
71 * Allow to run services attached to virtual tty, allow connection to that tty (ala "screen").
72 * SystemD-like handling of filesystem mounts (see autofs documentation in kernel)
73 i.e. a mount point gets an autofs attached, and lazily gets mounted when accessed
74 (or is mounted in parallel). Probably put the functionality in a separate daemon.
78 * Design philosophy/rationale document
79 * Coding style guidelines
81 * What's the best TERM setting? gogetty gives me "linux" but I think other variants may be
82 better (eg "linux-c").
84 * Figure out the ConsoleKit/logind / PolicyKit mess & how dinit needs to fit into it.
85 * Consolekit/logind tracks "sessions". Provides a mechanism to mark a session starting,
86 associates processes with sessions, provides calls to terminate sessions etc (why?!!)
87 Can use environment variable or cgroups to track processes in a session.
88 A PAM module exists to create/destroy sessions.
89 * Consolekit/logind also allows for requesting shutdown, reboot, and inhibiting reboot
91 * "seats" are a set of input/output hardware (mouse/keyboard/monitor) on which a session
92 can be run. You can have multiple sessions on a seat - one is in the foreground
93 (eg linux virtual ttys implement multiple sessions on a single seat).
94 Sessions can run without a seat (eg ssh session).