fix bug
This commit is contained in:
parent
79f92db110
commit
96602f913a
@ -55,14 +55,14 @@ function passthrough_intel_to_lxc() {
|
|||||||
|
|
||||||
function install_intel_tools_in_ct() {
|
function install_intel_tools_in_ct() {
|
||||||
local ctid="$1"
|
local ctid="$1"
|
||||||
|
local install_nonfree="$2"
|
||||||
|
|
||||||
if is_alpine_ct "$ctid"; then
|
if is_alpine_ct "$ctid"; then
|
||||||
msg warn "Skipping Intel tool install for Alpine CT $ctid"
|
msg warn "Skipping Intel tool install for Alpine CT $ctid"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm
|
if [[ "$install_nonfree" == "yes" ]]; then
|
||||||
if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then
|
|
||||||
msg info "Enabling non-free sources in $ctid..."
|
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 "tee /etc/apt/sources.list.d/non-free.list >/dev/null" <<'EOF'
|
||||||
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||||
|
@ -103,6 +103,14 @@ function main() {
|
|||||||
|
|
||||||
local updated_cts=()
|
local updated_cts=()
|
||||||
|
|
||||||
|
local intel_nonfree="no"
|
||||||
|
if [[ " ${SELECTED_FEATURES[*]} " =~ " intel " ]]; then
|
||||||
|
read -rp "Install non-free intel-media-va-driver (Debian only)? [y/N]: " confirm
|
||||||
|
if [[ "${confirm,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
intel_nonfree="yes"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for ctid in $SELECTED_CTIDS; do
|
for ctid in $SELECTED_CTIDS; do
|
||||||
local conf="/etc/pve/lxc/${ctid}.conf"
|
local conf="/etc/pve/lxc/${ctid}.conf"
|
||||||
local updated=0
|
local updated=0
|
||||||
@ -115,7 +123,7 @@ function main() {
|
|||||||
;;
|
;;
|
||||||
intel)
|
intel)
|
||||||
msg info "Intel passthrough setup for CT $ctid"
|
msg info "Intel passthrough setup for CT $ctid"
|
||||||
passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" && updated=1
|
passthrough_intel_to_lxc "$ctid" && install_intel_tools_in_ct "$ctid" "$intel_nonfree" && updated=1
|
||||||
;;
|
;;
|
||||||
nvidia)
|
nvidia)
|
||||||
msg info "Validating NVIDIA setup..."
|
msg info "Validating NVIDIA setup..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user