forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindtomac-bridge-httpks.ks.in
71 lines (55 loc) · 2.12 KB
/
bindtomac-bridge-httpks.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#test name bindtomac-bridge
%ksappend repos/default.ks
# --onboot=no doesn't make much sense as a use case but we want to test that it works in this test
network --device=bridge0 --bridgeslaves=@KSTEST_NETDEV1@ --bootproto=dhcp --onboot=no --bindto=mac
bootloader --timeout=1
zerombr
clearpart --all
autopart
keyboard us
lang en
timezone America/New_York
rootpw qweqwe
shutdown
%packages
%end
%post --nochroot
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"
@KSINCLUDE@ post-nochroot-lib-network.sh
check_bridge_has_slave_nochroot bridge0 @KSTEST_NETDEV1@ yes
if [ "${platform}" == "rhel8" ]; then
# RHEL-8-FAILURE: generic "Wired Connection" created in initramfs (ip=dhcp)
# would be edited for @KSTEST_NETDEV1@ in GUI which is not ideal
check_gui_configurations bridge0
else
check_gui_configurations @KSTEST_NETDEV1@ bridge0
fi
%end
%post
@KSINCLUDE@ post-lib-network.sh
@KSINCLUDE@ scripts-lib.sh
platform="$(get_platform @KSTEST_OS_NAME@ @KSTEST_OS_VERSION@)"
check_device_connected bridge0 yes
check_device_connected @KSTEST_NETDEV1@ yes
check_device_config_value bridge0_slave_1 BRIDGE bridge0 connection master bridge0
check_device_config_value bridge0_slave_1 BRIDGE bridge0 connection slave-type bridge
check_device_has_ipv4_address bridge0 yes
check_device_has_ipv4_address @KSTEST_NETDEV1@ no
# This check is removed because since NM in initramfs the slave's (non-bridge)
# configuration from initramfs does not produce corresponding config file
# check_device_config_value @KSTEST_NETDEV1@ ONBOOT yes connection autoconnect __NONE
check_device_config_value bridge0 ONBOOT no connection autoconnect false
check_device_config_value bridge0_slave_1 ONBOOT no connection autoconnect false
# Configuration from boot options
if [ "${platform}" != "rhel8" ]; then
check_config_exists @KSTEST_NETDEV1@ yes
fi
check_device_config_bound_to_mac bridge0_slave_1
# WARNING: this depends on assumption of running %post scripts in order they
# are defined here
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end