#!/bin/bash

echo "=== LXC → mounts utilisés ==="
echo

for conf in /etc/pve/lxc/*.conf; do
  CTID=$(basename "$conf" .conf)
  HOSTNAME=$(grep -E '^hostname:' "$conf" | awk '{print $2}')

  echo "🧱 CT $CTID (${HOSTNAME:-sans_nom})"

  grep -E '^(mp[0-9]+:|lxc.mount.entry)' "$conf" | \
    sed 's/^/  ↳ /'

  echo
done
