forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindtomac-network-static-2-httpks.ks.in
72 lines (56 loc) · 2.65 KB
/
bindtomac-network-static-2-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
72
#test name: bindtomac-network-static-2
#various combinations of activation in initramfs and stage 2
%ksappend repos/default.ks
# activated in initramfs with dhcp, reactivated in stage 2
network --device=@KSTEST_NETDEV2@ --bootproto static --ip @KSTEST_STATIC_IP1@ --netmask @KSTEST_STATIC_NETMASK@ --gateway @KSTEST_STATIC_GATEWAY@ --bindto mac
# activated in initramfs with dhcp, not reactivated in stage 2
network --device=@KSTEST_NETDEV3@ --bootproto static --ip @KSTEST_STATIC_IP2@ --netmask @KSTEST_STATIC_NETMASK@ --gateway @KSTEST_STATIC_GATEWAY@ --bindto mac
# not activated in initramfs with dhcp, reactivated in stage 2
network --device=@KSTEST_NETDEV4@ --bootproto static --ip @KSTEST_STATIC_IP3@ --netmask @KSTEST_STATIC_NETMASK@ --gateway @KSTEST_STATIC_GATEWAY@ --activate --bindto mac
# not activated in initramfs with dhcp, not reactivated in stage 2
network --device=@KSTEST_NETDEV5@ --bootproto static --ip @KSTEST_STATIC_IP4@ --netmask @KSTEST_STATIC_NETMASK@ --gateway @KSTEST_STATIC_GATEWAY@ --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
pass_autoconnections_info_to_chroot
check_gui_configurations @KSTEST_NETDEV1@ @KSTEST_NETDEV2@ @KSTEST_NETDEV3@ @KSTEST_NETDEV4@ @KSTEST_NETDEV5@
%end
%post
@KSINCLUDE@ post-lib-network.sh
check_device_connected @KSTEST_NETDEV1@ yes
check_device_config_value @KSTEST_NETDEV2@ IPADDR @KSTEST_STATIC_IP1@ ipv4 method manual
check_device_connected @KSTEST_NETDEV2@ yes
check_device_ipv4_address @KSTEST_NETDEV2@ @KSTEST_STATIC_IP1@
check_device_config_bound_to_mac @KSTEST_NETDEV2@
check_device_config_value @KSTEST_NETDEV3@ IPADDR @KSTEST_STATIC_IP2@ ipv4 method manual
check_device_connected @KSTEST_NETDEV3@ yes
check_device_config_bound_to_mac @KSTEST_NETDEV3@
check_device_config_value @KSTEST_NETDEV4@ IPADDR @KSTEST_STATIC_IP3@ ipv4 method manual
check_device_connected @KSTEST_NETDEV4@ yes
check_device_ipv4_address @KSTEST_NETDEV4@ @KSTEST_STATIC_IP3@
check_device_config_bound_to_mac @KSTEST_NETDEV4@
check_device_config_value @KSTEST_NETDEV5@ IPADDR @KSTEST_STATIC_IP4@ ipv4 method manual
detect_nm_has_autoconnections_off
nm_has_autoconnections_off=$?
if [[ $nm_has_autoconnections_off -eq 0 ]]; then
check_device_connected @KSTEST_NETDEV5@ no
else
# Ifcfg from initramfs is no longer blocking default autoconnection
check_device_connected @KSTEST_NETDEV5@ yes
fi
check_device_config_bound_to_mac @KSTEST_NETDEV5@
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end