147 lines
4.5 KiB
Bash
Executable file
147 lines
4.5 KiB
Bash
Executable file
#!/bin/bash
|
|
# Debian Atomic Infrastructure Verification Script
|
|
# This script verifies that all required files are installed correctly
|
|
|
|
echo "🔍 Verifying Debian Atomic Infrastructure Installation"
|
|
echo "====================================================="
|
|
|
|
# Check OSTree systemd services
|
|
echo "📋 Checking OSTree systemd services..."
|
|
ostree_services=(
|
|
"ostree-prepare-root.service"
|
|
"ostree-remount.service"
|
|
"ostree-state-overlay@.service"
|
|
"ostree-finalize-staged.service"
|
|
"ostree-finalize-staged-hold.service"
|
|
"ostree-boot-complete.service"
|
|
)
|
|
|
|
for service in "${ostree_services[@]}"; do
|
|
if [ -f "/usr/lib/systemd/system/$service" ]; then
|
|
echo " ✅ $service"
|
|
else
|
|
echo " ❌ $service - MISSING"
|
|
fi
|
|
done
|
|
|
|
# Check bootc services
|
|
echo "📋 Checking bootc services..."
|
|
bootc_services=(
|
|
"bootc-fetch-apply-updates.service"
|
|
"bootc-fetch-apply-updates.timer"
|
|
"bootc-generic-growpart.service"
|
|
"bootc-destructive-cleanup.service"
|
|
"bootc-publish-rhsm-facts.service"
|
|
"bootc-status-updated.target"
|
|
"bootc-status-updated-onboot.target"
|
|
"bootc-root-setup.service"
|
|
)
|
|
|
|
for service in "${bootc_services[@]}"; do
|
|
if [ -f "/usr/lib/systemd/system/$service" ]; then
|
|
echo " ✅ $service"
|
|
else
|
|
echo " ❌ $service - MISSING"
|
|
fi
|
|
done
|
|
|
|
# Check APT-OSTree services
|
|
echo "📋 Checking APT-OSTree services..."
|
|
apt_ostree_services=(
|
|
"apt-ostreed.service"
|
|
"apt-ostree-bootstatus.service"
|
|
"apt-ostree-countme.service"
|
|
"apt-ostree-countme.timer"
|
|
"apt-ostree-fix-shadow-mode.service"
|
|
"apt-ostreed-automatic.service"
|
|
"apt-ostreed-automatic.timer"
|
|
)
|
|
|
|
for service in "${apt_ostree_services[@]}"; do
|
|
if [ -f "/usr/lib/systemd/system/$service" ]; then
|
|
echo " ✅ $service"
|
|
else
|
|
echo " ❌ $service - MISSING"
|
|
fi
|
|
done
|
|
|
|
# Check configuration files
|
|
echo "📋 Checking configuration files..."
|
|
config_files=(
|
|
"/usr/lib/ostree/prepare-root.conf"
|
|
"/usr/lib/tmpfiles.d/ostree-tmpfiles.conf"
|
|
"/usr/lib/tmpfiles.d/apt-ostree-0-integration.conf"
|
|
"/usr/lib/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal.conf"
|
|
"/usr/lib/tmpfiles.d/apt-ostree-0-integration-opt-usrlocal-compat.conf"
|
|
"/usr/lib/kernel/install.conf"
|
|
"/etc/apt-ostreed.conf"
|
|
"/usr/share/dbus-1/system.d/org.debian.aptostree1.conf"
|
|
"/usr/lib/dracut.conf.d/10-bootc-base.conf"
|
|
)
|
|
|
|
for file in "${config_files[@]}"; do
|
|
if [ -f "$file" ]; then
|
|
echo " ✅ $file"
|
|
else
|
|
echo " ❌ $file - MISSING"
|
|
fi
|
|
done
|
|
|
|
# Check kernel installation hooks
|
|
echo "📋 Checking kernel installation hooks..."
|
|
if [ -f "/usr/lib/kernel/install.d/05-aptostree.install" ]; then
|
|
echo " ✅ 05-aptostree.install"
|
|
if [ -x "/usr/lib/kernel/install.d/05-aptostree.install" ]; then
|
|
echo " ✅ 05-aptostree.install (executable)"
|
|
else
|
|
echo " ❌ 05-aptostree.install (not executable)"
|
|
fi
|
|
else
|
|
echo " ❌ 05-aptostree.install - MISSING"
|
|
fi
|
|
|
|
# Check dracut module
|
|
echo "📋 Checking dracut module..."
|
|
if [ -f "/usr/lib/dracut/modules.d/98ostree/module-setup.sh" ]; then
|
|
echo " ✅ 98ostree/module-setup.sh"
|
|
if [ -x "/usr/lib/dracut/modules.d/98ostree/module-setup.sh" ]; then
|
|
echo " ✅ 98ostree/module-setup.sh (executable)"
|
|
else
|
|
echo " ❌ 98ostree/module-setup.sh (not executable)"
|
|
fi
|
|
else
|
|
echo " ❌ 98ostree/module-setup.sh - MISSING"
|
|
fi
|
|
|
|
# Check systemd daemon reload
|
|
echo "📋 Checking systemd daemon status..."
|
|
if systemctl daemon-reload >/dev/null 2>&1; then
|
|
echo " ✅ systemd daemon reload successful"
|
|
else
|
|
echo " ❌ systemd daemon reload failed"
|
|
fi
|
|
|
|
# Count total services
|
|
echo "📊 Summary:"
|
|
ostree_count=$(ls /usr/lib/systemd/system/ostree-*.service 2>/dev/null | wc -l)
|
|
bootc_count=$(ls /usr/lib/systemd/system/bootc-*.service 2>/dev/null | wc -l)
|
|
apt_ostree_count=$(ls /usr/lib/systemd/system/apt-ostree*.service 2>/dev/null | wc -l)
|
|
total_services=$((ostree_count + bootc_count + apt_ostree_count))
|
|
|
|
echo " - OSTree services: $ostree_count"
|
|
echo " - Bootc services: $bootc_count"
|
|
echo " - APT-OSTree services: $apt_ostree_count"
|
|
echo " - Total services: $total_services"
|
|
|
|
if [ $total_services -ge 18 ]; then
|
|
echo " ✅ Installation looks complete!"
|
|
else
|
|
echo " ❌ Installation appears incomplete (expected ~18+ services)"
|
|
fi
|
|
|
|
echo ""
|
|
echo "🎯 Next steps:"
|
|
echo " 1. Test with apt-ostree compose tree"
|
|
echo " 2. Test with apt-ostree compose container-encapsulate"
|
|
echo " 3. Test with bootc-image-builder"
|
|
echo " 4. Boot test the resulting image"
|