-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathimage-deployment-2.ks.in
56 lines (41 loc) · 1.4 KB
/
image-deployment-2.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
52
53
54
55
56
#version=DEVEL
# Test that we can disable modules and installation tasks
# that are not suitable for the image deployment. Use the
# package installation in this test, because it is easier
# to test for now.
# Use defaults for network, bootloader and storage.
%ksappend network/default.ks
%ksappend bootloader/default.ks
%ksappend storage/default.ks
# Install RPM packages.
%ksappend repos/default.ks
%ksappend payload/default_packages.ks
# Run the installation in the cmdline mode.
cmdline
shutdown
%post --nochroot
# Get the activated Anaconda DBus modules.
less /tmp/syslog | grep "Starting org.fedoraproject.Anaconda.Modules" | \
cut -d" " -f4 | sort > /tmp/generated.out
# Generate the expected output.
cat > /tmp/expected.out <<EOF
org.fedoraproject.Anaconda.Modules.Network.
org.fedoraproject.Anaconda.Modules.Payloads.
org.fedoraproject.Anaconda.Modules.Storage.
EOF
# Check the output
diff /tmp/expected.out /tmp/generated.out
if [[ $? != 0 ]]; then
echo "*** unexpected modules were activated:" >> /mnt/sysroot/root/RESULT
cat /tmp/generated.out >> /mnt/sysroot/root/RESULT
fi
%end
%post --nochroot
# Get the network installation tasks.
cat /tmp/anaconda.log | grep "installation: Task started:" \
| grep -i -e "firewall" -e "network"
if [[ $? == 0 ]]; then
echo "*** unexpected installation tasks" >> /mnt/sysroot/root/RESULT
fi
%end
%ksappend validation/success_if_result_empty_standalone.ks