forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
anaconda-conf.ks.in
51 lines (37 loc) · 1.2 KB
/
anaconda-conf.ks.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#version=DEVEL
#test name: anaconda-conf
# Verify that the Anaconda configuration can be changed.
# Use defaults.
%ksappend repos/default.ks
%ksappend common/common_no_payload.ks
%ksappend payload/default_packages.ks
%pre --erroronfail
# Verify that the updates image is correctly applied.
if [[ ! -f /etc/anaconda/conf.d/99-testing.conf ]]; then
echo "ERROR: configuration snippet doesn't exist!"
shutdown --now
exit 1
fi
%end
%post --nochroot
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"
if [ "${platform}" == "rhel8" ] || [ "${platform}" == "rhel9" ]; then
LOG_MSG="Writing a temporary configuration loaded from"
else
LOG_MSG="Configuration loaded from:"
fi
cat /tmp/anaconda.log \
| grep "${LOG_MSG}" \
| grep "/etc/anaconda/conf.d/99-testing.conf"
if [[ $? != 0 ]]; then
echo "*** the configuration file wasn't loaded:" >> /mnt/sysroot/root/RESULT
fi
cat /tmp/syslog \
| grep "Storage check started with constraints" \
| grep "'req_partition_sizes': {'/boot': Size (1024 MiB)}"
if [[ $? != 0 ]]; then
echo "*** the configuration isn't correct:" >> /mnt/sysroot/root/RESULT
fi
%end
%ksappend validation/success_if_result_empty_standalone.ks