Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion agents/meshinstall-initd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stop() {
else
echo 'Service not running'
fi
rm -f $"PIDFILE"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦩 🔴 meshinstall-initd.sh PID file removal uses malformed quoting, likely deletes wrong file (missing path traversal protection also unclear)

Changed rm -f $"PIDFILE" to rm -f "$PIDFILE" in the stop() function, fixing the malformed quoting so the actual PID file path stored in the $PIDFILE variable is removed instead of the literal string "PIDFILE".

🤖 Prompt for AI agents
In agents/meshinstall-initd.sh around line 43, review and complete this code-review fix: meshinstall-initd.sh PID file removal uses malformed quoting, likely deletes wrong file (missing path traversal protection also unclear).
What the draft fix changed: Changed `rm -f $"PIDFILE"` to `rm -f "$PIDFILE"` in the `stop()` function, fixing the malformed quoting so the actual PID file path stored in the `$PIDFILE` variable is removed instead of the literal string "PIDFILE".
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 95 high — react 👍/👎 to teach the reviewer

rm -f "$PIDFILE"
fi
}
restart(){
Expand Down Expand Up @@ -82,3 +82,4 @@ case "$1" in
;;
esac
exit 0