shit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Default boot target. dinit starts this service as PID 1; it pulls in the
|
||||
# rest of the system. waits-for (rather than depends-on) keeps the machine
|
||||
# coming up even if an individual service fails.
|
||||
type = internal
|
||||
waits-for = early-fs
|
||||
waits-for = udevd
|
||||
waits-for = udev-trigger
|
||||
waits-for = seatd
|
||||
waits-for = tty1
|
||||
@@ -0,0 +1,4 @@
|
||||
# Mount the early virtual filesystems needed before anything else runs.
|
||||
type = scripted
|
||||
command = /etc/dinit.d/scripts/early-fs.sh
|
||||
restart = false
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
# Bring up the kernel virtual filesystems and runtime dirs before other
|
||||
# services start. Safe to re-run: each mount is guarded by mountpoint checks.
|
||||
set -eu
|
||||
export PATH=/usr/bin:/usr/sbin:/bin:/sbin
|
||||
|
||||
mountpoint -q /proc || mount -t proc proc /proc
|
||||
mountpoint -q /sys || mount -t sysfs sysfs /sys
|
||||
mountpoint -q /dev || mount -t devtmpfs devtmpfs /dev
|
||||
mkdir -p /dev/pts /dev/shm
|
||||
mountpoint -q /dev/pts || mount -t devpts devpts /dev/pts
|
||||
mountpoint -q /dev/shm || mount -t tmpfs tmpfs /dev/shm
|
||||
# NOTE: /run is intentionally NOT remounted here. dinit (PID 1) binds its
|
||||
# control socket under /run before this script runs; on the all-RAM initramfs
|
||||
# boot /run is already writable, and a fresh tmpfs mount would hide that socket.
|
||||
# (A disk-rooted system should instead mount /run before starting dinit.)
|
||||
mkdir -p /run/user /run/udev
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Coldplug devices that already existed before udevd started: replay "add"
|
||||
# uevents for subsystems then devices, and wait for processing to finish so
|
||||
# DRM/input nodes (and their autoloaded modules) are present before Weston.
|
||||
set -eu
|
||||
export PATH=/usr/bin:/usr/sbin:/bin:/sbin
|
||||
|
||||
udevadm trigger --action=add --type=subsystems
|
||||
udevadm trigger --action=add --type=devices
|
||||
udevadm settle || true
|
||||
|
||||
# Safety net for QEMU/virtio: ensure the virtio-gpu DRM driver is loaded even if
|
||||
# coldplug autoload missed it. (Input/evdev is built into the kernel.)
|
||||
modprobe virtio_gpu 2>/dev/null || true
|
||||
@@ -0,0 +1,6 @@
|
||||
# Seat management daemon. Weston (via libseat) asks seatd to open DRM/input
|
||||
# devices, so no logind is needed. The "seat" group may use the seatd socket.
|
||||
type = process
|
||||
command = /usr/bin/seatd -g seat
|
||||
restart = true
|
||||
depends-on = early-fs
|
||||
@@ -0,0 +1,7 @@
|
||||
# Autologin getty on tty1. login runs the user's profile, which launches Weston
|
||||
# (see /etc/profile.d/weston.sh shipped by base-files).
|
||||
type = process
|
||||
command = /usr/bin/agetty --autologin user --noclear --login-program /usr/bin/login tty1 linux
|
||||
restart = true
|
||||
depends-on = seatd
|
||||
depends-on = udev-trigger
|
||||
@@ -0,0 +1,5 @@
|
||||
# Coldplug: replay add events so udev autoloads DRM/input modules, then settle.
|
||||
type = scripted
|
||||
command = /etc/dinit.d/scripts/udev-trigger.sh
|
||||
restart = false
|
||||
depends-on = udevd
|
||||
@@ -0,0 +1,5 @@
|
||||
# eudev device manager daemon (udevd). Loads/uevents DRM/input drivers.
|
||||
type = process
|
||||
command = /usr/bin/udevd
|
||||
restart = true
|
||||
depends-on = early-fs
|
||||
Reference in New Issue
Block a user