Startd

This is version 0.1.2 (release 3) of Startd.

The most recent version can be downloaded here.

Overview

Startd is an init daemon, loosely based on SysVInit. It starts the system, shuts it down, and allows services to be manually started, stopped and restarted, amongst other functions. Shell scripts are still used for one off or unusual cases, including basic system setup.

Services are configured using start files, which are stored in two system directories (/lib/starts and /etc/starts, by default, similar to Udev). Start files are simply Standard Config files, and can also be used with the start command (directly or as scripts), which duplicates most of the functionality of Startd, from the command line. This functionality includes redirection of standard I/O (either ignored or into a logfile), running services as different users and groups, setting the working directory, chrooting, copying files into the chroot, use of Linux capabilities, scheduling, and setting environment variables. Command line arguments are either specified directly, or stored in Standard Config format and translated into a number of common formats.

Upon bootup, an initial service is started, which doesn’t execute any program itself, but starts other services that it “needs”. In an ideal system, this is all that should be required. ;) After the system is running, commands can be sent to startd as required. One binary is used for both the daemon and administration, with the admin instance communicating with the daemon through a local socket.

Startd was written as an improvement upon SysVInit, and was based on the start command, which was originally intended to implement OS/2 program objects (similar to GNOME desktop files). However, in recent years Startd has also become a potential remedy for the social engineering of Systemd.

Start and Startd were written from scratch, starting on 2001-08-29 and 2008-08-06 respectively, in GNU C, using Emacs and Vi, and the command line (ie. old school).

Advantages over SysVInit

Advantages over Systemd

Commands

Installation

See the INSTALL file for generic install instructions - this package uses the Autoconf compilation and installation system.

Nb. you need to install the Standard Config package first.

Once the main startd binary is installed (probably in /sbin/), it will be called “startd_new”, to avoid deleting any current version being used. A symbolic link from “startd” or “startd_new” to “init” is necessary for it to be started by the kernel, without using init=/sbin/startd on the kernel command line.

In order to allow non-root users to shut down the system, using the shutdown command, run chmod 4755 /sbin/shutdown as root (if installed in /sbin/).

There are sample init scripts and start files in init-scripts/ and starts/, as well as a kernel patch to start startd directly. Nb. the iptables script is missing (use your own).

Philosophy

An init daemon is the most important element of userspace, and so must be simple, secure, reliable and predictable. It should be written in standard C, and rely on a minimal number of libraries. It should be easy to use, both on a day to day basis and when configuring a new service.

An init daemon must be open-source, and should be a good example for other programmers to follow. This means that it’s goals must be clear, and not open-ended. Open-source isn’t just a matter of open publication and debate - the individual freedom of programmers also depends on the modularity and conservative structure of their operating system. Programmers must be able to work without undue fear of obsolescence and need to learn new commands and interfaces.

An init system should automate all basic tasks, including bootup, shutdown and manual administration of services. It should use simple shell scripts for one off or unusual tasks, since they are merely an automated version of the command line. An init system that rejects such a traditional approach is rejecting the elegant simplicity of the command line itself.

There should be no need for centralised system logging, since every service should have its own log file, and the date should be taken by the program that generated the log entry, for maximum accuracy. Ideally, a number of different standard daemons should be used to automate various computing tasks, like mounting and unmounting devices, logging in and out, changing system settings, etc. The design of these daemons, as a basic part of a unified GUI, is a very challenging task, that cannot be avoided. Such a task can only be undertaken by a large community of programmers with different ideas and experience, in consultation with ordinary users.

There is always a temptation for an init daemon to do more, in order to simplify the system from the point of view of the inexperienced user. However, this can only make the system harder for experienced users, and compromise its overall integrity. With computer technology becoming essential to democracy and individual liberty, a corporate style, monolithic init system must be rejected as a matter of principle, regardless of any other benefits it might have.

License

The daemon and associated utilities are licensed under the GNU General Public Licence (GPL).

The major version of the GPL used is only 2, in rejection of version 3’s social engineering. Forks of Startd may use GPL version 2, version 3, or later versions.

Bug reports and patches

Found a bug? Please send the details to bugs@cinfinity.info. Mention the program being used, package (with version and/or release number) it came from, command line and config file options, and ideally the backtrace provided by gdb (with the bt command). Please don’t send core files (unless requested).

Any ideas for improvements can be sent to marks@cinfinity.info.

If you want to make a contribution, you can send patches to patches@cinfinity.info. I can’t guarantee I’ll accept them though, since Startd is designed to be minimalist, so for anything substantial, you should probably ask first. Patches should be in unified diff format, created with diff -u <original file> <modified file>. Nb. I don’t use git or any other source code version control system, since I believe that every package should have a single author, and that large projects should ideally be broken down into a number of independent libraries.

Author

My name is Mark Skinner. I’m a self taught computer programmer, living in Melbourne, Australia. I have a degree in engineering (specifically computer control systems), but have never used it.

I write all my source code using a simple text editor, on a variation of Linux from Scratch, and compile and test it via the command line. My Xwindow GUI consists of a text editor, web browser and a number of rxvts. I have never used GNOME, KDE or any other kind of “desktop environment”.

Apart from boot disks, I have only used Linux systems with SysVInit or Startd.