Skip to content

Add script to configure partner NTP server in chrony#600

Draft
Copilot wants to merge 7 commits intodevelopfrom
copilot/update-partner-url-in-config
Draft

Add script to configure partner NTP server in chrony#600
Copilot wants to merge 7 commits intodevelopfrom
copilot/update-partner-url-in-config

Conversation

Copy link

Copilot AI commented Feb 24, 2026

Implements automated update of /etc/rdk_chrony.conf with partner NTP server URL in chrony format.

Implementation

  • Script: update-chrony-config.sh reads partner URL from /etc/partner_url.conf or PARTNER_NTP_URL env var, validates input, writes chrony server directive
  • Recipe: chrony-config.bb installs script to /usr/sbin/ and config template to /etc/
  • Format: Generates server <url> iburst minpoll 10 maxpoll 12 per chrony spec

Security

Input validation prevents injection attacks:

  • POSIX-compliant newline detection via case pattern matching
  • Hostname/IP format validation (no consecutive dots, proper structure)
  • Port range enforcement (1-65535)
  • Printf-based output (no interpolation risks)

Usage

# Via config file
echo "PARTNER_NTP_URL=ntp.partner.example.com" > /etc/partner_url.conf
/usr/sbin/update-chrony-config.sh

# Via environment variable  
PARTNER_NTP_URL=ntp.partner.example.com /usr/sbin/update-chrony-config.sh

Add chrony-config to image recipe to include in build.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 6 commits February 24, 2026 10:05
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Co-authored-by: sindhu-krishnan <102755514+sindhu-krishnan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update partner URL in rdk_chrony.conf Add script to configure partner NTP server in chrony Feb 24, 2026
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