diff --git a/scripts/tools/gpu-intel.func b/scripts/tools/gpu-intel.func index 0b91a48..0730a1f 100644 --- a/scripts/tools/gpu-intel.func +++ b/scripts/tools/gpu-intel.func @@ -64,11 +64,16 @@ function install_intel_tools_in_ct() { if [[ "$install_nonfree" == "yes" ]]; then msg info "Enabling non-free sources in $ctid..." - pct exec "$ctid" -- bash -c "tee /etc/apt/sources.list.d/non-free.list >/dev/null" <<'EOF' + + pct exec "$ctid" -- bash -c ' + grep -q "non-free" /etc/apt/sources.list && exit 0 + + cat < /etc/apt/sources.list.d/non-free.list deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware EOF + ' fi msg info "Installing Intel tools in CT $ctid..."