mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-06 04:13:48 +00:00
Update install_coral_lxc.sh
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
# Revision : @Blaspt (USB passthrough via udev rule with persistent /dev/coral)
|
||||
# Copyright : (c) 2024 MacRimi
|
||||
# License : (GPL-3.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE)
|
||||
# Version : 1.2
|
||||
# Last Updated: 20/01/2025
|
||||
# Version : 1.3
|
||||
# Last Updated: 28/03/2025
|
||||
# ==========================================================
|
||||
# Description:
|
||||
# This script automates the configuration and installation of
|
||||
@@ -21,6 +21,12 @@
|
||||
# Supports Coral USB and Coral M.2 (PCIe) devices.
|
||||
# Includes USB passthrough enhancement using persistent udev alias (/dev/coral).
|
||||
#
|
||||
# Changelog v1.3:
|
||||
# - Fixed Coral USB passthrough: mount /dev/bus/usb instead of /dev/coral symlink
|
||||
# The udev symlink /dev/coral is not passthrough-safe in LXC; mounting the full
|
||||
# USB bus tree ensures the real device node is accessible inside the container
|
||||
# regardless of which port the Coral USB is connected to.
|
||||
#
|
||||
# Changelog v1.2:
|
||||
# - Fixed symlink detection for /dev/coral (create=dir for symlinks)
|
||||
# - Fixed /dev/apex_0 not being mounted in PVE 9 (device existence not required)
|
||||
@@ -250,8 +256,13 @@ configure_lxc_hardware() {
|
||||
if ! grep -Pq "^lxc.cgroup2.devices.allow: c 189:\\\* rwm" "$CONFIG_FILE"; then
|
||||
echo "lxc.cgroup2.devices.allow: c 189:* rwm # Coral USB" >> "$CONFIG_FILE"
|
||||
fi
|
||||
|
||||
add_mount_if_needed "/dev/coral" "dev/coral" "$CONFIG_FILE"
|
||||
|
||||
# FIX v1.3: Mount /dev/bus/usb instead of the /dev/coral symlink.
|
||||
# The udev symlink /dev/coral cannot be safely passed through to LXC because
|
||||
# it points to a dynamic path (e.g. /dev/bus/usb/001/005) that changes on
|
||||
# reconnect. Mounting the full USB bus tree makes the real device node
|
||||
# available inside the container regardless of port or reconnection.
|
||||
add_mount_if_needed "/dev/bus/usb" "dev/bus/usb" "$CONFIG_FILE"
|
||||
|
||||
if [ -L "/dev/coral" ]; then
|
||||
msg_ok "$(translate 'Coral USB configuration added - device detected')"
|
||||
|
||||
Reference in New Issue
Block a user