mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 10:52:22 +00:00
fix: notification history, Ctrl+D in web terminals, repository and VFIO rule fixes, translation corrections
- Notification settings show the last 20 notifications with the result of each send, the error when one failed and every daily digest run, also on days with nothing to send; the history is read without the flag the API never returned, and the page does not offer to erase it, as Audit & Report reads it. - The Ctrl menu of the three web terminals sends Ctrl+D, which ends a text pasted in the terminal, also from a phone or a tablet. - The repository check lists every Proxmox VE or Enterprise Ceph repository whose suite does not match the installed version, with its channel and file, and says where to disable it; repository addresses are never shown. - Adding an NVIDIA GPU to a VM writes its VFIO udev rule again when it is missing or was edited, and the pre-check counts a missing rule as a pending host change. - New texts in English and Spanish, modelled in the translation steady-state test, and the notifications docs page describes the history section. - Corrected the automatic translations of the new LXC update and power control texts, and the start, shutdown, reboot and stop buttons of VMs and LXCs in German, French, Portuguese and Swedish. - Tests for the history panel, the terminal Ctrl+D, the repository message and the VFIO rule.
This commit is contained in:
@@ -456,6 +456,34 @@ PROXMENUX_NVIDIA_SERVICE_LEGACY_STATE="${PROXMENUX_NVIDIA_SERVICE_LEGACY_STATE:-
|
||||
# remove them when migrating a host that ran the older init-top hook.
|
||||
PROXMENUX_VFIO_BIND_LEGACY_HOOK="${PROXMENUX_VFIO_BIND_LEGACY_HOOK:-${PROXMENUX_ETC_ROOT}/initramfs-tools/scripts/init-top/proxmenux-vfio-bind}"
|
||||
|
||||
# The udev rule the state file asks for.
|
||||
_proxmenux_vfio_bind_render_udev_rule() {
|
||||
{
|
||||
echo "# ProxMenux: per-BDF VFIO driver override"
|
||||
echo "# Auto-generated from $PROXMENUX_VFIO_BIND_STATE"
|
||||
echo "# DO NOT EDIT MANUALLY — regenerated by add_gpu_vm.sh / switch_gpu_mode*.sh"
|
||||
while IFS= read -r bdf; do
|
||||
[[ -z "$bdf" ]] && continue
|
||||
[[ "$bdf" == \#* ]] && continue
|
||||
# KERNEL match expects the "0000:XX:YY.Z" form
|
||||
local full="$bdf"
|
||||
[[ "$full" != 0000:* ]] && full="0000:${full}"
|
||||
echo "SUBSYSTEM==\"pci\", KERNEL==\"${full}\", ATTR{driver_override}=\"vfio-pci\""
|
||||
done < "$PROXMENUX_VFIO_BIND_STATE"
|
||||
}
|
||||
}
|
||||
|
||||
# True when the udev rule on disk is the one the state file asks for, so a
|
||||
# rule removed or edited by hand is written again on the next run.
|
||||
_proxmenux_vfio_bind_udev_rule_current() {
|
||||
if [[ ! -s "$PROXMENUX_VFIO_BIND_STATE" ]]; then
|
||||
[[ ! -e "$PROXMENUX_VFIO_BIND_UDEV_RULE" ]]
|
||||
return
|
||||
fi
|
||||
[[ -f "$PROXMENUX_VFIO_BIND_UDEV_RULE" ]] \
|
||||
&& cmp -s <(_proxmenux_vfio_bind_render_udev_rule) "$PROXMENUX_VFIO_BIND_UDEV_RULE"
|
||||
}
|
||||
|
||||
_proxmenux_vfio_bind_write_udev_rule() {
|
||||
# Always nuke the obsolete init-top hook from earlier attempts (if it
|
||||
# still exists) so a stale copy in initramfs can't run alongside the
|
||||
@@ -470,19 +498,7 @@ _proxmenux_vfio_bind_write_udev_rule() {
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "$PROXMENUX_VFIO_BIND_UDEV_RULE")"
|
||||
{
|
||||
echo "# ProxMenux: per-BDF VFIO driver override"
|
||||
echo "# Auto-generated from $PROXMENUX_VFIO_BIND_STATE"
|
||||
echo "# DO NOT EDIT MANUALLY — regenerated by add_gpu_vm.sh / switch_gpu_mode*.sh"
|
||||
while IFS= read -r bdf; do
|
||||
[[ -z "$bdf" ]] && continue
|
||||
[[ "$bdf" == \#* ]] && continue
|
||||
# KERNEL match expects the "0000:XX:YY.Z" form
|
||||
local full="$bdf"
|
||||
[[ "$full" != 0000:* ]] && full="0000:${full}"
|
||||
echo "SUBSYSTEM==\"pci\", KERNEL==\"${full}\", ATTR{driver_override}=\"vfio-pci\""
|
||||
done < "$PROXMENUX_VFIO_BIND_STATE"
|
||||
} > "$PROXMENUX_VFIO_BIND_UDEV_RULE"
|
||||
_proxmenux_vfio_bind_render_udev_rule > "$PROXMENUX_VFIO_BIND_UDEV_RULE"
|
||||
|
||||
udevadm control --reload-rules >/dev/null 2>&1 || true
|
||||
}
|
||||
@@ -549,7 +565,7 @@ _proxmenux_vfio_bind_add_bdfs() {
|
||||
changed=true
|
||||
fi
|
||||
done
|
||||
if $changed; then
|
||||
if $changed || ! _proxmenux_vfio_bind_udev_rule_current; then
|
||||
_proxmenux_vfio_bind_write_udev_rule
|
||||
_proxmenux_nvidia_vfio_policy_sync || true
|
||||
_proxmenux_mark_host_config_changed
|
||||
|
||||
Reference in New Issue
Block a user