void-linux / void-linux/void-packages
interception-tools: udevmon run script quotes `CONF_FILE` incorrectly, service fails to start
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 3.4k
- Forks
- 2.8k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 299
Description
The run script interception-tools/files/udevmon/run is written to optionally read a sibling file called conf.
That file can set CONF_FILE=/path/to/udevmon.yaml (and other variables) so users don’t have to edit the script itself.
After sourcing ./conf, the script is supposed to pass the path to udevmon with -c <CONFIG>.
But this script contains a quoting bug:
https://github.com/void-linux/void-packages/blob/2b3f91e7d85011f2e27b31ec728cc98660e87ab0/srcpkgs/interception-tools/files/udevmon/run#L8
Because the single-quotes are included inside $OPTS, udevmon receives an argument whose value literally contains quotes.
udevmon then looks for a file named '/path/to/udevmon.yaml' (quotes included) and fails:
ignoring '/path/to/udevmon.yaml', reason: bad file: '/path/to/udevmon.yaml'
couldn't read any configuration: No such file or directory
Minimal fix
- OPTS="${OPTS} -c '${CONF_FILE}'"
+ OPTS="${OPTS} -c ${CONF_FILE}"
Removing the embedded quotes lets the service start normally.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at interception-tools/files/udevmon/run and inspect how CONF_FILE from the sibling conf file is added to OPTS after sourcing. Verify that the resulting argument is passed to udevmon without quote characters, then confirm the service starts and reads the configured udevmon.yaml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100