Initial commit: DarkForge Linux — Phases 0-12
Complete from-scratch Linux distribution targeting AMD Ryzen 9 9950X3D + NVIDIA RTX 5090 on ASUS ROG CROSSHAIR X870E HERO. Deliverables: - dpack: custom package manager in Rust (3,800 lines) - TOML package parser, dependency resolver, build sandbox - CRUX Pkgfile and Gentoo ebuild converters - Shared library conflict detection - 124 package definitions across 4 repos (core/extra/desktop/gaming) - 34 toolchain bootstrap scripts (LFS 13.0 adapted for Zen 5) - Linux 6.19.8 kernel config (hardware-specific, fully commented) - SysVinit init system with rc.d service scripts - Live ISO builder (UEFI-only, squashfs+xorriso) - Interactive installer (GPT partitioning, EFISTUB boot) - Integration test checklist (docs/TESTING.md) No systemd. No bootloader. No display manager. Kernel boots via EFISTUB → auto-login → dwl Wayland compositor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
40
configs/rc.d/rc.shutdown
Executable file
40
configs/rc.d/rc.shutdown
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — System Shutdown
|
||||
# ============================================================================
|
||||
# /etc/rc.d/rc.shutdown — stops daemons and cleans up before halt/reboot.
|
||||
# ============================================================================
|
||||
|
||||
. /etc/rc.conf
|
||||
|
||||
echo ":: Shutting down..."
|
||||
|
||||
# --- Stop daemons in reverse order ------------------------------------------
|
||||
REVERSED=()
|
||||
for daemon in "${DAEMONS[@]}"; do
|
||||
REVERSED=("${daemon}" "${REVERSED[@]}")
|
||||
done
|
||||
|
||||
for daemon in "${REVERSED[@]}"; do
|
||||
if [ -x "/etc/rc.d/${daemon}" ]; then
|
||||
"/etc/rc.d/${daemon}" stop
|
||||
fi
|
||||
done
|
||||
|
||||
# --- Save random seed -------------------------------------------------------
|
||||
dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 2>/dev/null
|
||||
|
||||
# --- Write wtmp shutdown entry ----------------------------------------------
|
||||
halt -w
|
||||
|
||||
# --- Deactivate swap --------------------------------------------------------
|
||||
swapoff -a
|
||||
|
||||
# --- Unmount filesystems ----------------------------------------------------
|
||||
echo ":: Unmounting filesystems..."
|
||||
umount -a -r 2>/dev/null
|
||||
|
||||
# --- Remount root read-only -------------------------------------------------
|
||||
mount -o remount,ro /
|
||||
|
||||
echo ":: Shutdown complete"
|
||||
Reference in New Issue
Block a user