Skip to content

Commit

Permalink
[baseimage] Delay ntp-config service to start after 5 minutes (sonic-…
Browse files Browse the repository at this point in the history
  • Loading branch information
jleveque authored and lguohan committed Jan 31, 2019
1 parent ce9a3f0 commit 33fe8d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions files/build_templates/ntp-config.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Delays NTP configuration service until SONiC has started

[Timer]
OnBootSec=5min
Unit=ntp-config.service

[Install]
WantedBy=timers.target
2 changes: 2 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ sudo LANG=C cp $SCRIPTS_DIR/syncd.sh $FILESYSTEM_ROOT/usr/local/bin/syncd.sh
# Copy systemd timer configuration
# It implements delayed start of services
sudo cp $BUILD_TEMPLATES/snmp.timer $FILESYSTEM_ROOT/etc/systemd/system/
sudo cp $BUILD_TEMPLATES/ntp-config.timer $FILESYSTEM_ROOT/etc/systemd/system/
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable snmp.timer
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable ntp-config.timer

sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get remove -y python-dev
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get clean -y
Expand Down

0 comments on commit 33fe8d2

Please sign in to comment.