-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathbindtomac-bridge-no-bootopts-net.ks.in
61 lines (45 loc) · 1.84 KB
/
bindtomac-bridge-no-bootopts-net.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
# Test activating bridge from kickstart in dracut (requires no active network
# when parsing kickstart, ie ks=hd: or ks=file:)
# https://bugzilla.redhat.com/show_bug.cgi?id=1373360
%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 --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@ post-nochroot-lib-network.sh
check_bridge_has_slave_nochroot bridge0 @KSTEST_NETDEV1@ yes
check_gui_configurations @KSTEST_NETDEV1@ bridge0
%end
%post
@KSINCLUDE@ post-lib-network.sh
check_device_connected bridge0 yes
check_device_connected @KSTEST_NETDEV1@ yes
# The bridge is created in initramfs so the slave connection is named @KSTEST_NETDEV1@
# connection.controller is identified by connection uuid so check __ANY
check_device_config_value @KSTEST_NETDEV1@ BRIDGE bridge0 connection controller __ANY
check_device_config_value @KSTEST_NETDEV1@ BRIDGE bridge0 connection port-type bridge
check_device_has_ipv4_address bridge0 yes
check_device_has_ipv4_address @KSTEST_NETDEV1@ no
# The bridge is created in initramfs so the slave connection is named @KSTEST_NETDEV1@
# KNOWNFAILURE: This is failing because kickstart is actually applied in
# initramfs by NM via dracut boot options which don't have notion of
# --bindto=mac. The fix would be updating the connection in stage2 or adding
# support to nm-initrd-generator.
check_device_config_bound_to_mac @KSTEST_NETDEV1@
# 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