runcmd:
  - export DEBIAN_FRONTEND=noninteractive
  - grep -qx VERSION_CODENAME=noble /etc/os-release || exit 1
  - mv /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.OLD || true
  - mv /etc/apt/sources.list /etc/apt/sources.list.OLD || true
  - |
    cat > /etc/apt/sources.list << EOF
    deb http://archive.trisquel.org/trisquel/ ecne main
    deb http://archive.trisquel.org/trisquel/ ecne-updates main
    deb http://archive.trisquel.org/trisquel/ ecne-security main
    EOF
  - gpg --keyserver keyserver.ubuntu.com --recv-keys B138CA450C05112F
  - gpg --export B138CA450C05112F | gpg --dearmour > /etc/apt/trusted.gpg.d/trisquel-key.gpg
  - apt update
  - apt dist-upgrade -y
  - apt autoremove -y
  - reboot
