Skip to content

Commit

Permalink
xen-tools/init-initrd: Enable clock synchronization by default
Browse files Browse the repository at this point in the history
Enable clock synchronization through PTP_KVM for containers by default,
i.e., always run chrony daemon except when explicitly disabled by the
EVE_ENABLE_CHRONY=0 variable.

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
  • Loading branch information
rene committed Oct 4, 2024
1 parent e7bb230 commit da6a87e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/xen-tools/initrd/init-initrd
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ gw=`cat /proc/cmdline | grep -o '\bgw=[^ ]*' | cut -d = -f 2`
route=`cat /proc/cmdline | grep -o '\broute=[^ ]*' | cut -d = -f 2`
pvcalls=`cat /proc/cmdline | grep 'pvcalls=1'`
dhcp=`cat /proc/cmdline | grep 'dhcp=1'`
# shellcheck disable=SC2002,SC2006
chrony=`cat /proc/cmdline | grep 'chrony=1'`
if test "$pvcalls"
then
mkdir -p /mnt/rootfs/etc
Expand Down Expand Up @@ -158,8 +156,9 @@ fi
echo "Run acpid daemon"
acpid -l /proc/self/fd/1

# Start chrony daemon for clock synchronization through PTP_KVM device
if test "$chrony" -o "$EVE_ENABLE_CHRONY" = "1"; then
# Start chrony daemon for clock synchronization through PTP_KVM device,
# this option is enabled by default
if [ ! "$EVE_ENABLE_CHRONY" = "0" ]; then
# PTP_KVM is only available with KVM
if test -c /dev/ptp0; then
echo "Starting chrony daemon..." > /dev/kmsg
Expand Down

0 comments on commit da6a87e

Please sign in to comment.