forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bond-vlan-pre.ks.in
52 lines (40 loc) · 1.65 KB
/
bond-vlan-pre.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
#test name: bond-vlan-pre
#NOTE: this test is a variant of bond-vlan-httpks test, it is sharing its .sh file (setup of NICs and network boot configuration) so beware of changing it independently of bond-vlan-httpks test
%ksappend repos/default.ks
%include /tmp/ksinclude
%pre
echo "network --device bond0 --bootproto static --ip @KSTEST_STATIC_IP@ --netmask @KSTEST_STATIC_NETMASK@ --gateway @KSTEST_STATIC_GATEWAY@ --bondslaves=@KSTEST_NETDEV2@,@KSTEST_NETDEV3@ --bondopts=mode=active-backup,miimon=100,primary=@KSTEST_NETDEV2@ --activate --vlanid=222 --activate --onboot=no" >> /tmp/ksinclude
%end
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_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ bond0 bond0.222
%end
%post
@KSINCLUDE@ post-lib-network.sh
check_device_config_value bond0.222 ONBOOT no connection autoconnect false
check_device_config_value bond0 ONBOOT no connection autoconnect false
check_device_config_value bond0_slave_1 ONBOOT no connection autoconnect false
check_device_config_value bond0_slave_2 ONBOOT no connection autoconnect false
check_device_connected bond0 yes
check_device_connected bond0.222 yes
check_bond_has_slave bond0 @KSTEST_NETDEV2@ yes
check_bond_has_slave bond0 @KSTEST_NETDEV3@ yes
check_bond_has_slave bond0 @KSTEST_NETDEV1@ no
check_device_ipv4_address bond0.222 @KSTEST_STATIC_IP@
check_device_has_ipv4_address bond0 no
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end