Skip to content

Use CDPR in NetworkManager dispatcher script #2

@netconnex

Description

@netconnex

Hi Tim, I'm sorry this is quite specific, but I can't wrap my head around why this is not working.

I want to use the output of your cdpr tool for some actions in a NetworkManager dispatcher script.
I wrote a test script and put it in /etc/NetworkManager/dispatcher.d/
In this script, your cdpr tool is executed with -d eth0 -t 10 and the output saved to a text file for debugging.

When I directly execute this script with sudo, everything works. When NetworkManager automatically executes the script, it seems like cdpr will finish instantly, without waiting for a CDP response:

CDP Output:
Cisco Discovery Protocol Reporter
Version 3.0.4 by Tim Dorssers

Timeout enabled for 10 seconds
Use -h option to see usage

Using device eth0

Sending on 1 interface(s)
Done

Press any key to quit or wait for timeout
Listening on 1 interface(s)

Done

This happens instantly, not waiting for 10 seconds.
Do you have any idea why this might be the case?

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