Fix arm/tumbleweed/test-image-rpi

Fix snapper setup for this integration test
This commit is contained in:
Marcus Schäfer 2025-07-16 10:22:11 +02:00
parent d8c3426060
commit 6b2e8fa144
No known key found for this signature in database
GPG Key ID: A16C1128698C8CAC

View File

@ -49,27 +49,25 @@ done
#=====================================
# Configure snapper
#-------------------------------------
if [ "$kiwi_btrfs_root_is_snapshot" = 'true' ]; then
if [ "${kiwi_btrfs_root_is_snapshot-false}" = 'true' ]; then
echo "creating initial snapper config ..."
# we can't call snapper here as the .snapshots subvolume
# already exists and snapper create-config doens't like
# that.
cp /etc/snapper/config-templates/default /etc/snapper/configs/root
# Change configuration to match SLES12-SP1 values
sed -i -e '/^TIMELINE_CREATE=/s/yes/no/' /etc/snapper/configs/root
sed -i -e '/^NUMBER_LIMIT=/s/50/10/' /etc/snapper/configs/root
cp /usr/share/snapper/config-templates/default /etc/snapper/configs/root
baseUpdateSysConfig /etc/sysconfig/snapper SNAPPER_CONFIGS root
# Adjust parameters
sed -i'' 's/^TIMELINE_CREATE=.*$/TIMELINE_CREATE="no"/g' \
/etc/snapper/configs/root
sed -i'' 's/^NUMBER_LIMIT=.*$/NUMBER_LIMIT="2-10"/g' \
/etc/snapper/configs/root
sed -i'' 's/^NUMBER_LIMIT_IMPORTANT=.*$/NUMBER_LIMIT_IMPORTANT="4-10"/g' \
/etc/snapper/configs/root
fi
#=====================================
# Enable ntpd if installed
# Enable chrony if installed
#-------------------------------------
if [ -f /etc/ntp.conf ]; then
systemctl enable ntpd
for i in 0 1 2 3; do
echo "server $i.opensuse.pool.ntp.org iburst" >> /etc/ntp.conf
done
if [ -f /etc/chrony.conf ]; then
systemctl enable chronyd
fi
#======================================