forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bridge-2devs.ks.in
74 lines (52 loc) · 1.7 KB
/
bridge-2devs.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
72
73
74
#test name bridge-2devs
# One bridge with slave activated in dracut,
# the other one with slave activated only with the bridge
url @KSTEST_URL@
install
# --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=ens3 --bootproto=dhcp --onboot=no
network --device=bridge1 --bridgeslaves=ens4 --bootproto=dhcp
bootloader --timeout=1
zerombr
clearpart --all
autopart
keyboard us
lang en
timezone America/New_York
rootpw qweqwe
shutdown
%packages
%end
%post --nochroot
@KSINCLUDE@ post-nochroot-lib-network.sh
check_bridge_has_slave_nochroot bridge0 ens3 yes
check_bridge_has_slave_nochroot bridge1 ens4 yes
check_gui_configurations ens3 ens4 bridge0 bridge1
%end
%post
@KSINCLUDE@ post-lib-network.sh
# bridge0
check_device_connected bridge0 yes
check_device_connected ens3 yes
check_device_ifcfg_value bridge0_slave_1 BRIDGE bridge0
check_device_has_ipv4_address bridge0 yes
check_device_has_ipv4_address ens3 no
check_device_ifcfg_value ens3 ONBOOT yes
check_device_ifcfg_value bridge0 ONBOOT no
check_device_ifcfg_value bridge0_slave_1 ONBOOT no
# bridge1
check_device_connected bridge1 no
check_device_connected ens4 no
check_device_ifcfg_value bridge1_slave_1 BRIDGE bridge1
check_device_has_ipv4_address ens4 no
check_device_ifcfg_value bridge1 ONBOOT yes
check_device_ifcfg_value bridge1_slave_1 ONBOOT yes
# anaconda does not create default ifcfg file for enslaved device
check_ifcfg_exists ens4 no
# 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