forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindtomac-network-device-mac-pre.ks.in
40 lines (31 loc) · 952 Bytes
/
bindtomac-network-device-mac-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
#test name: bindtomac-network-device-mac-pre
%ksappend repos/default.ks
%include /tmp/ksinclude
%pre
echo "network --bootproto=dhcp --device=52:54:00:12:34:53 --bindto=mac" >> /tmp/ksinclude
echo "network --bootproto=dhcp --device=52:54:00:12:34:54 --activate --bindto=mac" >> /tmp/ksinclude
%end
bootloader --timeout=1
zerombr
clearpart --all
autopart
keyboard us
lang en
timezone America/New_York
rootpw qweqwe
shutdown
%packages
%end
%post
@KSINCLUDE@ post-lib-network.sh
check_config_key_exists @KSTEST_NETDEV1@ HWADDR __ANY ethernet mac-address __ANY
check_config_exists @KSTEST_NETDEV1@-1 no
check_device_connected @KSTEST_NETDEV1@ yes
check_config_key_exists @KSTEST_NETDEV2@ HWADDR __ANY ethernet mac-address __ANY
check_config_exists @KSTEST_NETDEV2@-1 no
check_device_connected @KSTEST_NETDEV2@ yes
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end