Skip to content

netpulse-agent: env parser fails on inline trailing comments #885

Description

@gnacho

Ref #851

The netpulse-agent env file parser (/etc/netpulse-agent.env) does not support inline trailing comments. A line like:

NETPULSE_SCAN_INTERVAL=0     # min entre scans de vecinos; "0" = sin scans periódicos

is parsed as value 0 # min entre scans..., so the agent logs WARN "NETPULSE_SCAN_INTERVAL inválido, usando 30m". Removing the trailing comment makes it parse correctly (0 -> scan_interval=-1s).

The install script that generates the .env file already writes such inline comments, so parser and generator must agree on dotenv-style semantics: comments start at an unescaped, unquoted #; double and single quotes protect # inside values.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions