Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement nut-scanner -m auto* modes on WIN32 #2521

Merged
merged 10 commits into from
Jul 10, 2024

Conversation

jimklimov
Copy link
Member

@jimklimov jimklimov commented Jul 9, 2024

Found two ways to skin the cat. Apparently on older systems (~Vista and before) some structures may be different, something someone would address if encountered.

Checked both APIs in WSL builds, but had problems actually connecting to a NUT data server on another system (when calling NUT programs from WSL and having Windows intercept them to execute). The upsc.exe also had such problems; so maybe firewall.

Same binaries executed straight from Windows did walk the data server and discover its devices:

C:\Temp\nut_install\bin>./nut-scanner.exe -m auto
Scanning NUT bus (old libupsclient connect method).
Scanning NUT simulation devices.
Failed to open //etc, skip NUT simulation scan
[nutdev-nut1]
        driver = "dummy-ups"
        port = "[email protected]"
[nutdev-nut2]
        driver = "dummy-ups"
        port = "[email protected]"

Closes: #2516

@jimklimov jimklimov added Windows nut-scanner Windows-not-on-par-with-POSIX Aspect of Windows builds known to be dysfunctional compared to POSIX builds; fix needed to be on par portability We want NUT to build and run everywhere possible labels Jul 9, 2024
@jimklimov jimklimov added this to the 2.8.3 milestone Jul 9, 2024
@jimklimov jimklimov requested review from aquette and arnaudquette-eaton and removed request for aquette July 9, 2024 19:38
@jimklimov jimklimov merged commit 005844a into networkupstools:master Jul 10, 2024
27 of 31 checks passed
@jimklimov jimklimov deleted the issue-2516 branch July 10, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nut-scanner portability We want NUT to build and run everywhere possible Windows Windows-not-on-par-with-POSIX Aspect of Windows builds known to be dysfunctional compared to POSIX builds; fix needed to be on par
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Need to implement nut-scanner -m auto* modes on WIN32
1 participant