Skip to content

Commit f167e67

Browse files
jlevequeyxieca
authored andcommitted
[baseimage] Delay ntp-config service to start after 5 minutes (#2494)
1 parent cdbbb7e commit f167e67

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Unit]
2+
Description=Delays NTP configuration service until SONiC has started
3+
4+
[Timer]
5+
OnBootSec=5min
6+
Unit=ntp-config.service
7+
8+
[Install]
9+
WantedBy=timers.target

files/build_templates/sonic_debian_extension.j2

+2
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ sudo LANG=C cp $SCRIPTS_DIR/syncd.sh $FILESYSTEM_ROOT/usr/local/bin/syncd.sh
302302
# Copy systemd timer configuration
303303
# It implements delayed start of services
304304
sudo cp $BUILD_TEMPLATES/snmp.timer $FILESYSTEM_ROOT/etc/systemd/system/
305+
sudo cp $BUILD_TEMPLATES/ntp-config.timer $FILESYSTEM_ROOT/etc/systemd/system/
305306
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable snmp.timer
307+
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable ntp-config.timer
306308

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

0 commit comments

Comments
 (0)