sysmig: migration runner + initial 4 migrations (swap, daemon trims)

- up/down/status interface, history in /var/lib/sysmig/applied
- 001 swap 2GB + swappiness=10, 002-004 trim unneeded daemons (~56MB)
- google-osconfig-agent intentionally kept
- all messages/comments in ASCII English (console font safety)
This commit is contained in:
wan
2026-08-31 15:49:01 +09:00
commit f69cb99b3f
6 changed files with 224 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# 004-purge-haveged - Remove entropy daemon (~8MB)
# Kernel 6.12 collects enough entropy on its own; haveged is redundant.
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
case "${1:-}" in
up) systemctl disable --now haveged.service 2>/dev/null || true
apt-get purge -y haveged >/dev/null
apt-get autoremove --purge -y >/dev/null
echo " haveged stopped + package purged" ;;
down) apt-get update -qq
apt-get install -y haveged >/dev/null
systemctl enable --now haveged.service
echo " haveged reinstalled + restarted" ;;
esac