From d0d7a3dcbd14f1b15e1cbcab56ba7bd38860e975 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 22 Nov 2025 22:34:26 +0000 Subject: [PATCH] Fix mp mount detection pattern for pulse-sensor-proxy The grep pattern was looking for 'pulse-sensor-proxy' as a standalone string, but the actual mount line contains paths like: mp0: /run/pulse-sensor-proxy,mp=/mnt/pulse-proxy,replicate=0 This caused the removal logic to never execute, leaving the old mp mount in place and preventing the migration to lxc.mount.entry format. Changed pattern to match either path component: - /pulse-sensor-proxy (source path) - /mnt/pulse-proxy (mount point) Also removed space after colon in pattern to match actual format. This completes the fix for temperature proxy setup on LXC containers. --- install.sh | 6 +++--- scripts/install-sensor-proxy.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index daaa0e2e6..663a87aab 100755 --- a/install.sh +++ b/install.sh @@ -466,12 +466,12 @@ configure_proxy_socket_mount() { # Extract line number where snapshots start (first line starting with [) local snapshot_start=$(grep -n '^\[' "$temp_config" | head -1 | cut -d: -f1) - if grep -Eq '^mp[0-9]+: .*pulse-sensor-proxy' "$temp_config" 2>/dev/null; then + if grep -Eq '^mp[0-9]+:.*pulse-sensor-proxy|^mp[0-9]+:.*mnt/pulse-proxy' "$temp_config" 2>/dev/null; then print_info "Removing mp entries for pulse-sensor-proxy to keep snapshots and migrations working" if [ -n "$snapshot_start" ]; then - sed -i "1,$((snapshot_start-1)) { /^mp[0-9]\+: .*pulse-sensor-proxy/d }" "$temp_config" + sed -i "1,$((snapshot_start-1)) { /^mp[0-9]\+:.*pulse-sensor-proxy/d; /^mp[0-9]\+:.*mnt\/pulse-proxy/d }" "$temp_config" else - sed -i '/^mp[0-9]\+: .*pulse-sensor-proxy/d' "$temp_config" + sed -i '/^mp[0-9]\+:.*pulse-sensor-proxy/d; /^mp[0-9]\+:.*mnt\/pulse-proxy/d' "$temp_config" fi updated=true fi diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index 015cd96e5..ee7268612 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -3166,13 +3166,13 @@ if [[ "$STANDALONE" == false ]]; then # Extract line number where snapshots start (first line starting with [) SNAPSHOT_START=$(grep -n '^\[' "$TEMP_CONFIG" | head -1 | cut -d: -f1) - if grep -Eq '^mp[0-9]+: .*pulse-sensor-proxy' "$TEMP_CONFIG" 2>/dev/null; then + if grep -Eq '^mp[0-9]+:.*pulse-sensor-proxy|^mp[0-9]+:.*mnt/pulse-proxy' "$TEMP_CONFIG" 2>/dev/null; then print_info "Removing mp mounts for pulse-sensor-proxy to keep snapshots and migrations working" if [ -n "$SNAPSHOT_START" ]; then # Only modify main section (before snapshots) - sed -i "1,$((SNAPSHOT_START-1)) { /^mp[0-9]\+: .*pulse-sensor-proxy/d }" "$TEMP_CONFIG" + sed -i "1,$((SNAPSHOT_START-1)) { /^mp[0-9]\+:.*pulse-sensor-proxy/d; /^mp[0-9]\+:.*mnt\/pulse-proxy/d }" "$TEMP_CONFIG" else - sed -i '/^mp[0-9]\+: .*pulse-sensor-proxy/d' "$TEMP_CONFIG" + sed -i '/^mp[0-9]\+:.*pulse-sensor-proxy/d; /^mp[0-9]\+:.*mnt\/pulse-proxy/d' "$TEMP_CONFIG" fi MOUNT_UPDATED=true fi