Skip to content

Conversation

KatsuhiroWatanabe
Copy link
Contributor

@KatsuhiroWatanabe KatsuhiroWatanabe commented Jul 7, 2025

Summary

This PR introduces two enhancements to the OSDCloudStartnet initialization process:

  1. Post-Network Script Execution
    A custom PowerShell script can now be executed after a network connection is established.

    • Supports execution after establishing either Wi-Fi or wired (Ethernet) connections
    • Script location is defined via a new template variable pointing to the OSDCloud\Config\StarNet2 folder
  2. Optional Suppression of Module Auto-Update
    The automatic update of OSD modules can now be disabled by setting { "OSDAutoUpdate": false } in
    OSDCloud\Config\Initialize-OSDCloudStartnet.json.

    • If the setting is omitted, the default behavior (auto-update enabled) is preserved.
    • This prevents customizations in OSD modules from being overwritten by Import-Module -Force, ensuring consistent behavior in customized environments.

Motivation

These changes provide greater control and flexibility during the early stages of OSDCloud initialization, especially in environments where deterministic behavior or offline operation is required.

A typical use case involves hosting pre-validated catalog files of company standard device models on external storage (e.g., Azure Blob) and downloading them during initialization. This approach avoids relying on the generic catalogs bundled with the latest module versions, which—while always up-to-date—may not reflect the specific validation or optimization required for certain hardware models. Suppressing automatic updates helps preserve these curated configurations and ensures consistent deployment behavior.

Notes

  • Backward compatible: no impact on existing templates unless the new features are explicitly used.

EDIT (7/21/2025)

feature/support_offline_Catalog (PR:#284) cherry-picked this PR for integration.

@KatsuhiroWatanabe
Copy link
Contributor Author

I accidentally named this branch feature/InintStartNet2 instead of feature/InitStartNet2. Since it's already in use and to avoid any risky operations like renaming or recreating the PR, I'll proceed with it as is.

@KatsuhiroWatanabe KatsuhiroWatanabe changed the title Add post-network script execution and optional module auto-update sup… Enable post-network script execution and optionally suppress module auto-updates Jul 9, 2025
@KatsuhiroWatanabe KatsuhiroWatanabe changed the title Enable post-network script execution and optionally suppress module auto-updates Enable post-network script execution and optionally suppress module auto-updates (Initialize-OSDCloudStartnet.ps1) Jul 9, 2025
@KatsuhiroWatanabe
Copy link
Contributor Author

KatsuhiroWatanabe commented Jul 21, 2025

Note

feature/support_offline_Catalog (PR:#284) cherry-picked this PR for integration.

@KatsuhiroWatanabe KatsuhiroWatanabe force-pushed the feature/InintStartNet2 branch 2 times, most recently from 64bb32f to 19f6c0c Compare August 4, 2025 03:10
@KatsuhiroWatanabe
Copy link
Contributor Author

Hi @OSDeploy,

I've been continuously rebasing this branch onto the latest master to keep it up to date and mergeable. Please let me know if any further changes are needed.

@KatsuhiroWatanabe
Copy link
Contributor Author

Hi @OSDeploy,

I've been continuously rebasing this branch onto the latest master to keep it up to date and mergeable. Please let me know if any further changes are needed.

@OSDeploy
Copy link
Owner

@KatsuhiroWatanabe can you DM me on LinkedIn or Twitter or email you so I can ask some more details?

David Segura

@KatsuhiroWatanabe
Copy link
Contributor Author

Hi @OSDeploy,
Thank you for your comment on my pull requests (#288 — note: #284 includes #288).
I don’t actively use LinkedIn or Twitter, so I’m reaching out via email instead.

@KatsuhiroWatanabe
Copy link
Contributor Author

Hi @OSDeploy,

I've been continuously rebasing this branch onto the latest master to keep it up to date and mergeable. Please let me know if any further changes are needed.

…pression

Enhanced Initialize-OSDCloudStartNet.ps1 to support execution custom PowerShell scripts after establishing a network connection.

Added support for suppressing automatic updates of the lastest OSD module.
@KatsuhiroWatanabe
Copy link
Contributor Author

I've been continuously rebasing this branch onto the latest master to keep it up to date and mergeable. Please let me know if any further changes are needed.

@KatsuhiroWatanabe KatsuhiroWatanabe deleted the feature/InintStartNet2 branch September 17, 2025 01:36
@KatsuhiroWatanabe
Copy link
Contributor Author

Since this request has been cherry-picked into #284, I am closing this pull request.
According to @OSDeploy, the new feature will not be adopted for OSD, but I will leave PR #284 as a final request for consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants