mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 22:43:05 +00:00
Merge pull request #4168 from Champ-Goblem/patch/fix-chronyd-failure-on-boot
rootfs: Fix chronyd.service failing on boot
This commit is contained in:
commit
e11fcf7d3c
@ -540,8 +540,13 @@ EOF
|
||||
|
||||
if [ -f "$chrony_systemd_service" ]; then
|
||||
# Remove user option, user could not exist in the rootfs
|
||||
# Set the /var/lib/chrony for ReadWritePaths to be ignored if
|
||||
# its nonexistent, this broke the service on boot previously
|
||||
# due to the directory not being present "(code=exited, status=226/NAMESPACE)"
|
||||
sed -i -e 's/^\(ExecStart=.*\)-u [[:alnum:]]*/\1/g' \
|
||||
-e '/^\[Unit\]/a ConditionPathExists=\/dev\/ptp0' ${chrony_systemd_service}
|
||||
-e '/^\[Unit\]/a ConditionPathExists=\/dev\/ptp0' \
|
||||
-e 's/^ReadWritePaths=\(.\+\) \/var\/lib\/chrony \(.\+\)$/ReadWritePaths=\1 -\/var\/lib\/chrony \2/m' \
|
||||
${chrony_systemd_service}
|
||||
fi
|
||||
|
||||
AGENT_DIR="${ROOTFS_DIR}/usr/bin"
|
||||
|
Loading…
Reference in New Issue
Block a user