first commit

This commit is contained in:
Your Name
2026-02-07 20:22:48 +08:00
commit 1b9711d5e4
2270 changed files with 805872 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
[Unit]
Description=Dispatch Password Requests to Console Directory Watch when bootsplash is active
DefaultDependencies=no
Conflicts=shutdown.target
Conflicts=systemd-ask-password-console.path
Conflicts=systemd-ask-password-console.service
After=plymouth-start.service
Before=paths.target shutdown.target cryptsetup.target
ConditionPathExists=!/run/plymouth/pid
ConditionPathExists=/sys/devices/platform/bootsplash.0/enabled
[Path]
DirectoryNotEmpty=/run/systemd/ask-password
MakeDirectory=yes
[Install]
WantedBy=sysinit.target

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Dispatch Password Requests to Console when bootsplash is active
DefaultDependencies=no
Conflicts=shutdown.target
Conflicts=systemd-ask-password-console.path
Conflicts=systemd-ask-password-console.service
After=plymouth-start.service systemd-vconsole-setup.service
Before=shutdown.target
ConditionPathExists=!/run/plymouth/pid
ConditionPathExists=/sys/devices/platform/bootsplash.0/enabled
[Service]
ExecStartPre=-/bin/sh -c '/bin/cat /sys/devices/platform/bootsplash.0/enabled > /run/systemd/ask-password/bootsplash-state ; exec /bin/echo off > /sys/devices/platform/bootsplash.0/enabled'
ExecStart=/usr/bin/systemd-tty-ask-password-agent --query --console
ExecStartPost=-/bin/sh -c 'exec /bin/cat /run/systemd/ask-password/bootsplash-state > /sys/devices/platform/bootsplash.0/enabled ; /bin/rm /run/systemd/ask-password/bootsplash-state'
Type=oneshot

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Hide bootsplash after starting the system
After=graphical.target
DefaultDependencies=no
ConditionPathExists=/sys/devices/platform/bootsplash.0/enabled
[Service]
ExecStartPre=/bin/sh -c 'exec /bin/sleep 15'
ExecStart=/bin/sh -c 'exec /bin/echo off > /sys/devices/platform/bootsplash.0/enabled'
Restart=no
Type=oneshot
[Install]
WantedBy=graphical.target

View File

@@ -0,0 +1,19 @@
[Unit]
Description=Show bootsplash on system halt, power off, reboot, or kexec
Before=systemd-halt.service
Before=systemd-kexec.service
Before=systemd-poweroff.service
Before=systemd-reboot.service
DefaultDependencies=no
ConditionPathExists=/sys/devices/platform/bootsplash.0/enabled
[Service]
ExecStart=/bin/sh -c 'exec /bin/echo on > /sys/devices/platform/bootsplash.0/enabled'
Restart=no
Type=oneshot
[Install]
WantedBy=halt.target
WantedBy=kexec.target
WantedBy=poweroff.target
WantedBy=reboot.target

View File

@@ -0,0 +1,2 @@
[Service]
TTYVTDisallocate=no

View File

@@ -0,0 +1,8 @@
[Unit]
Description=Disable automated desktop login
[Service]
Type=simple
ExecStart=rm -f /etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf
TimeoutStopSec= 10
ExecStop=systemctl disable orangepi-disable-autologin.timer

View File

@@ -0,0 +1,8 @@
[Unit]
Description=Disable automated desktop login
[Timer]
OnActiveSec=2min
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,18 @@
# Orange Pi firstrun configuration service
# This service will run in parallel with other services
[Unit]
Description=Orange Pi first run optional user configuration
Wants=network-online.target
After=network.target network-online.target
ConditionPathExists=/boot/orangepi_first_run.txt
ConditionPathExists=/root/.not_logged_in_yet
[Service]
Type=idle
RemainAfterExit=yes
ExecStart=/usr/lib/orangepi/orangepi-firstrun-config
TimeoutStartSec=2min
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,17 @@
# Orange Pi firstrun service
# Regenerates the SSH keys and performs additional first run tweaks
# This service will run in parallel with other services
[Unit]
Description=Orange Pi first run tasks
Before=getty.target system-getty.slice
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/lib/orangepi/orangepi-firstrun start
TimeoutStartSec=2min
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,19 @@
# Orange Pi hardware monitor service
# Detects and sets various features on boot
# This service may block the boot process for up to 2 minutes
[Unit]
Description=Orange Pi hardware monitoring
Before=basic.target
After=sysinit.target local-fs.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/usr/lib/orangepi/orangepi-hardware-monitor start
ExecStop=/usr/lib/orangepi/orangepi-hardware-monitor stop
RemainAfterExit=yes
TimeoutStartSec=2min
[Install]
WantedBy=basic.target

View File

@@ -0,0 +1,19 @@
# Orange Pi hardware optimization service
# Apply optimisations
# This service may block the boot process for up to 2 minutes
[Unit]
Description=Orange Pi hardware optimization
Before=basic.target
After=sysinit.target local-fs.target orangepi-hardware-monitor.target
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/usr/lib/orangepi/orangepi-hardware-optimization start
ExecStop=/usr/lib/orangepi/orangepi-hardware-optimization stop
RemainAfterExit=yes
TimeoutStartSec=2min
[Install]
WantedBy=basic.target

View File

@@ -0,0 +1,23 @@
# Orange Pi ramlog service
# Stores logs in (compressed) memory
# This service may block the boot process for up to 30 sec
[Unit]
Description=Orange Pi memory supported logging
DefaultDependencies=no
Before=rsyslog.service sysinit.target syslog.target
After=orangepi-zram-config.service
Conflicts=shutdown.target
RequiresMountsFor=/var/log /var/log.hdd
IgnoreOnIsolate=yes
[Service]
Type=oneshot
ExecStart=/usr/lib/orangepi/orangepi-ramlog start
ExecStop=/usr/lib/orangepi/orangepi-ramlog stop
ExecReload=/usr/lib/orangepi/orangepi-ramlog write
RemainAfterExit=yes
TimeoutStartSec=30sec
[Install]
WantedBy=sysinit.target

View File

@@ -0,0 +1,18 @@
# Orange Pi resize filesystem service
# Resizes partition and filesystem on first/second boot
# This service may block the boot process for up to 3 minutes
[Unit]
Description=Orange Pi filesystem resize
Before=basic.target
After=sysinit.target local-fs.target
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/orangepi/orangepi-resize-filesystem start
TimeoutStartSec=6min
[Install]
WantedBy=basic.target

View File

@@ -0,0 +1,20 @@
# Orange Pi ZRAM configuration service
# Create 1 + number of cores compressed block devices
# This service may block the boot process for up to 30 sec
[Unit]
Description=Orange Pi ZRAM config
DefaultDependencies=no
After=local-fs.target
Before=orangepi-ramlog.target
Conflicts=shutdown.target
[Service]
Type=oneshot
ExecStart=/usr/lib/orangepi/orangepi-zram-config start
ExecStop=/usr/lib/orangepi/orangepi-zram-config stop
RemainAfterExit=yes
TimeoutStartSec=30sec
[Install]
WantedBy=sysinit.target

View File

@@ -0,0 +1,2 @@
[Service]
Environment=TERM=linux

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Setup overlayfs automatically once
After=local-fs.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/setup_overlay.sh
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,2 @@
[Unit]
After=orangepi-ramlog.service

View File

@@ -0,0 +1,2 @@
[Service]
TimeoutStopSec=10