9 |
|
|
10 |
# Default root pass, will be changed in post-install process anyway |
# Default root pass, will be changed in post-install process anyway |
11 |
rootpw --lock |
rootpw --lock |
12 |
|
user --name=installer --uid=9999 |
13 |
|
|
14 |
# Accept EULA |
# Accept EULA |
15 |
eula --agreed |
eula --agreed |
127 |
# from https://wiki.contribs.org/Raid |
# from https://wiki.contribs.org/Raid |
128 |
# 2 Drives - Software RAID 1 |
# 2 Drives - Software RAID 1 |
129 |
# 3 Drives - Software RAID 1 + 1 Hot-spare |
# 3 Drives - Software RAID 1 + 1 Hot-spare |
130 |
# 4-6 Drives - Software RAID 5 + 1 Hot-spare |
# 4 Drives - Software RAID 6 |
131 |
# 7+ Drives - Software RAID 6 + 1 Hot-spare |
# 5+ Drives - Software RAID 6 + 1 Hot-spare |
132 |
|
|
133 |
if [ ${#DRIVES[@]} == 2 ] ; then |
if [ ${#DRIVES[@]} == 2 ] ; then |
134 |
LEVEL=1 |
LEVEL=1 |
136 |
elif [ ${#DRIVES[@]} == 3 ] ; then |
elif [ ${#DRIVES[@]} == 3 ] ; then |
137 |
LEVEL=1 |
LEVEL=1 |
138 |
SPARE=1 |
SPARE=1 |
139 |
elif (( ${#DRIVES[@]} > 3 && ${#DRIVES[@]} <= 6 )) ; then |
elif [ ${#DRIVES[@]} == 4 ] ; then |
140 |
LEVEL=5 |
LEVEL=6 |
141 |
SPARE=1 |
SPARE=0 |
142 |
else |
else |
143 |
LEVEL=6 |
LEVEL=6 |
144 |
SPARE=1 |
SPARE=1 |
151 |
|
|
152 |
# Include the EFI partition if necessary |
# Include the EFI partition if necessary |
153 |
if [ -d /sys/firmware/efi ] ; then |
if [ -d /sys/firmware/efi ] ; then |
154 |
printf "raid /boot/efi --fstype=efi --level=1 --spares=%s --device=md9 %s\n" "$SPARE" "$EFIDEVS" >> /tmp/part-include |
printf "raid /boot/efi --fstype=efi --level=1 --spares=0 --device=md9 %s\n" "$EFIDEVS" >> /tmp/part-include |
155 |
fi |
fi |
156 |
|
|
157 |
printf "raid /boot --fstype=xfs --level=1 --spares=%s --device=md0 %s\n" "$SPARE" "$BOOTDEVS" >> /tmp/part-include |
printf "raid /boot --fstype=xfs --level=1 --spares=0 --device=md0 %s\n" "$BOOTDEVS" >> /tmp/part-include |
158 |
printf "raid pv.01 --level=%s --spares=%s --device=md1 %s\n" "$LEVEL" "$SPARE" "$ROOTDEVS" >> /tmp/part-include |
printf "raid pv.01 --level=%s --spares=%s --device=md1 %s\n" "$LEVEL" "$SPARE" "$ROOTDEVS" >> /tmp/part-include |
159 |
|
|
160 |
# Set up LVM |
# Set up LVM |
172 |
|
|
173 |
# SME events in post-install |
# SME events in post-install |
174 |
%post --interpreter=/usr/bin/bash --log=/var/log/ks.post02.log |
%post --interpreter=/usr/bin/bash --log=/var/log/ks.post02.log |
175 |
/sbin/rsyslogd; |
userdel -r installer |
176 |
sleep 2; |
sleep 2 |
177 |
/sbin/e-smith/signal-event post-install; |
/sbin/e-smith/signal-event post-install |
178 |
sleep 2; |
sleep 2 |
179 |
/sbin/e-smith/db configuration set UnsavedChanges no; |
/sbin/e-smith/db configuration set UnsavedChanges no |
180 |
touch /forcequotacheck |
touch /forcequotacheck |
181 |
%end |
%end |
182 |
|
|