Lots of reorganization. Added stormux package repository. Removed unneeded packages. Switched to systemd management of logging to ram. Use existing tools to resize the image to fill the device, no more growpartfs. No packages installed from AUR any more.

This commit is contained in:
Storm Dragon
2025-08-19 15:18:04 -04:00
parent f80ea1e056
commit 8a7fb83be3
8 changed files with 214 additions and 160 deletions

View File

@@ -0,0 +1,16 @@
[Unit]
Description=Setup RAM logging and restore logs from disk
DefaultDependencies=false
After=local-fs.target
Before=sysinit.target
RequiresMountsFor=/var
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/mkdir -p /var/log.hdd
ExecStartPre=/bin/sh -c 'if [ -d /var/log.hdd ] && [ "$(ls -A /var/log.hdd 2>/dev/null)" ]; then cp -au /var/log.hdd/* /var/log/ 2>/dev/null || true; fi'
ExecStart=/bin/true
[Install]
WantedBy=sysinit.target

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Sync logs to disk before shutdown
DefaultDependencies=false
Before=shutdown.target reboot.target halt.target
Conflicts=shutdown.target reboot.target halt.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/sh -c 'rsync -aXv --delete --exclude="*.hdd" /var/log/ /var/log.hdd/ 2>/dev/null || true'
TimeoutStopSec=30
[Install]
WantedBy=shutdown.target reboot.target halt.target

View File

@@ -0,0 +1,8 @@
[Unit]
Description=Sync logs from RAM to disk
After=local-fs.target
[Service]
Type=oneshot
ExecStartPre=/bin/mkdir -p /var/log.hdd
ExecStart=/bin/sh -c 'rsync -aXv --delete --exclude="*.hdd" /var/log/ /var/log.hdd/ 2>/dev/null || true'

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Sync logs from RAM to disk every hour
Requires=log-to-ram-sync.service
[Timer]
OnBootSec=15min
OnUnitActiveSec=1h
Persistent=true
[Install]
WantedBy=timers.target