1
0
Fork
You've already forked initscripts
0
BusyBox based initscripts (runit)
  • Clojure 61.1%
  • Shell 24.6%
  • Makefile 14.3%
2026年06月21日 22:29:27 +08:00
inittab added files 2025年09月29日 23:45:46 +08:00
LICENSE Initial commit 2025年09月29日 17:26:01 +02:00
Makefile updates 2026年06月21日 22:29:27 +08:00
rc.boot updates 2026年06月21日 22:29:27 +08:00
rc.boot.local added files 2025年09月29日 23:45:46 +08:00
rc.modules added files 2025年09月29日 23:45:46 +08:00
rc.shutdown updates 2026年06月21日 22:29:27 +08:00
rc.shutdown.local added files 2025年09月29日 23:45:46 +08:00
README.md updates 2026年06月21日 22:29:27 +08:00

initscripts

Minimal init scripts for a Linux system using busybox init and runit for service supervision.

Install

make install

Use DESTDIR to stage into a rootfs tree without touching the host system:

make install DESTDIR=/path/to/rootfs

Likewise for uninstall:

make uninstall [DESTDIR=/path/to/rootfs]

How it works

Busybox init reads /etc/inittab, which defines four actions:

Action Trigger
::sysinit:/etc/rc.boot Runs once at boot
::respawn:/usr/bin/runsvdir /var/service Keeps the runit supervisor alive
::ctrlaltdel:/sbin/reboot Ctrl+Alt+Del handler
::shutdown:/etc/rc.shutdown Runs once at shutdown

rc.boot mounts virtual filesystems, sets up device management (udevd or mdev fallback), loads kernel modules, checks and mounts filesystems, sets the hostname, seeds the RNG, applies sysctl settings, and more.

rc.shutdown stops runit services, saves the random seed, syncs the hardware clock, terminates all processes, disables swap, brings down network interfaces, and unmounts filesystems.

Customization

Three files are provided as empty hooks for site-specific configuration:

  • rc.modules — kernel module names to load at boot (one per line, # comments and blank lines ignored).
  • rc.boot.local — sourced at the end of rc.boot for custom boot logic.
  • rc.shutdown.local — sourced at the start of rc.shutdown for custom shutdown logic.

Kernel command line

rc.boot recognizes two kernel cmdline parameters:

  • fastboot — skip the filesystem check.
  • forcefsck — force a full filesystem check (fsck -f).

License

MIT