mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 14:00:29 +00:00
Use unique temp file prefix to avoid permission conflicts
- Change mktemp to use /tmp/pulse-config.XXXXXXXXXX template - Prevents conflicts with stale temp files from previous runs - Fixes 'Permission denied' errors when script re-runs
This commit is contained in:
@@ -68,9 +68,9 @@ update_allowed_nodes() {
|
||||
shift
|
||||
local nodes=("$@")
|
||||
|
||||
# Create temp file
|
||||
# Create temp file with unique prefix to avoid conflicts
|
||||
local tmp_config
|
||||
tmp_config=$(mktemp)
|
||||
tmp_config=$(mktemp /tmp/pulse-config.XXXXXXXXXX)
|
||||
|
||||
# Ensure temp file is cleaned up on exit (success or failure)
|
||||
trap "rm -f '$tmp_config'" RETURN
|
||||
|
||||
Reference in New Issue
Block a user