forked from rhinstaller/kickstart-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbond.ks.in
56 lines (45 loc) · 1.07 KB
/
bond.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
url @KSTEST_URL@
install
network --device=link --bootproto=dhcp
# Create testing bond interface
network --device=bond0 --bootproto=dhcp --bondslaves=link --activate
bootloader --timeout=1
zerombr
clearpart --all
autopart
keyboard us
lang en
timezone America/New_York
rootpw qweqwe
shutdown
%packages
%end
%post
IF_FILE='/etc/sysconfig/network-scripts/ifcfg-bond0'
if [[ -e $IF_FILE ]]; then
cp $IF_FILE /root/
else
echo '*** ifcfg file for bond interface missing' >> /root/RESULT
exit 0
fi
grep -q '^DEVICE=bond0$' $IF_FILE
if [[ $? -ne 0 ]]; then
echo '*** DEVICE is not present' >> /root/RESULT
fi
grep -q '^TYPE=Bond$' $IF_FILE
if [[ $? -ne 0 ]]; then
echo '*** TYPE is not present' >> /root/RESULT
fi
grep -q '^ONBOOT=yes$' $IF_FILE
if [[ $? -ne 0 ]]; then
echo '*** ONBOOT is not present' >> /root/RESULT
fi
grep -q '^BOOTPROTO=dhcp$' $IF_FILE
if [[ $? -ne 0 ]]; then
echo '*** BOOTPROTO is not present' >> /root/RESULT
fi
# No error was written to /root/RESULT file, everything is OK
if [[ ! -e /root/RESULT ]]; then
echo SUCCESS > /root/RESULT
fi
%end