forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindtomac-ifname-httpks.ks.in
61 lines (48 loc) · 2 KB
/
bindtomac-ifname-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
#test name: bindtomac-ifname-httpks
%ksappend repos/default.ks
network --bootproto=dhcp --device=ifname0 --ipv6=2001:cafe:cafe::2/64 --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
# For RHEL <= 8.2: if the device is not activated in initramfs, ifname from boot options is not applied
# check_gui_configurations ifname0 @KSTEST_NETDEV2@
check_gui_configurations ifname0 ifname1
%end
%post
@KSINCLUDE@ post-lib-network.sh
check_device_config_value ifname0 IPV6ADDR 2001:cafe:cafe::2/64 ipv6 address1 2001:cafe:cafe::2/64
check_device_config_value ifname0 HWADDR 52:54:00:12:34:40 ethernet mac-address 52:54:00:12:34:40
check_device_config_value ifname0 DEVICE ifname0 connection interface-name ifname0
check_device_connected ifname0 yes
# For RHEL <= 8.2: if the device is not activated in initramfs, ifname from boot options is not applied
# check_device_config_value @KSTEST_NETDEV2@ DEVICE @KSTEST_NETDEV2@ connection interface-name @KSTEST_NETDEV2@
# check_device_config_value @KSTEST_NETDEV2@ HWADDR __NONE ethernet mac-address __NONE
# check_device_config_value @KSTEST_NETDEV2@ ONBOOT no connection autoconnect false
# check_device_connected @KSTEST_NETDEV2@ no
check_device_config_value ifname1 HWADDR 52:54:00:12:34:41 ethernet mac-address 52:54:00:12:34:41
check_device_config_value ifname1 DEVICE ifname1 connection interface-name ifname1
detect_nm_has_autoconnections_off
nm_has_autoconnections_off=$?
if [[ $nm_has_autoconnections_off -eq 0 ]]; then
check_device_config_value ifname1 ONBOOT no connection autoconnect false
check_device_connected ifname1 no
else
check_device_config_value ifname1 ONBOOT yes connection autoconnect __NONE
check_device_connected ifname1 yes
fi
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end