1 |
gordonr |
1.1 |
install |
2 |
|
|
text |
3 |
|
|
cdrom |
4 |
|
|
skipx |
5 |
slords |
1.3 |
mouse |
6 |
gordonr |
1.1 |
network --device eth0 --bootproto dhcp |
7 |
|
|
rootpw --iscrypted $1$iHhL195i$25OY88oyw2bxgU47MvuZf0 |
8 |
|
|
firewall --disabled |
9 |
slords |
1.3 |
selinux --permissive |
10 |
gordonr |
1.1 |
authconfig --enableshadow --enablemd5 |
11 |
|
|
bootloader --location=mbr |
12 |
|
|
zerombr yes |
13 |
|
|
%include /tmp/part-include |
14 |
|
|
|
15 |
|
|
%packages |
16 |
|
|
@ Base |
17 |
|
|
|
18 |
|
|
%post |
19 |
|
|
/sbin/syslogd & |
20 |
|
|
sleep 2 |
21 |
|
|
/sbin/e-smith/signal-event post-install |
22 |
|
|
|
23 |
slords |
1.3 |
# Make SELinux rescan filesystems on reboot |
24 |
|
|
touch /.autorelabel |
25 |
gordonr |
1.1 |
|
26 |
|
|
%pre |
27 |
|
|
#!/bin/sh |
28 |
|
|
set -x |
29 |
|
|
|
30 |
|
|
hds="" |
31 |
|
|
raidlevel=2 |
32 |
|
|
|
33 |
|
|
memsize=`cat /proc/meminfo | grep 'MemTotal:' | sed 's/^.* \([0-9]\+\) kB$/\1/'` |
34 |
|
|
swapsize=$(($memsize/512)) |
35 |
|
|
|
36 |
|
|
if [ $swapsize -gt 2048 ] ; then |
37 |
|
|
swapsize=2048 |
38 |
|
|
fi |
39 |
|
|
|
40 |
|
|
# let's assume it's a SCSI system |
41 |
|
|
hds=`grep 'sd[a-z]$' /proc/partitions | sed 's/.* sd/ sd/'` |
42 |
|
|
set $hds |
43 |
|
|
numhd=`echo $#` |
44 |
|
|
if [ $numhd == "0" ] ; then |
45 |
|
|
# No SCSI Drives is must be IDE |
46 |
|
|
for file in /proc/ide/hd* |
47 |
|
|
do |
48 |
|
|
media=`cat $file/media` |
49 |
|
|
if [ $media == "disk" ] ; then |
50 |
|
|
hds="$hds `basename $file`" |
51 |
|
|
fi |
52 |
|
|
done |
53 |
slords |
1.2 |
|
54 |
gordonr |
1.1 |
set $hds |
55 |
|
|
numhd=`echo $#` |
56 |
|
|
fi |
57 |
|
|
|
58 |
|
|
echo "# Auto configure partitions" > /tmp/part-include |
59 |
|
|
|
60 |
|
|
if [ $numhd -gt "0" ] ; then |
61 |
|
|
hdlist=`echo $hds | sed 's/^ \+//;s/ \+$//;s/ \+/ /g;s/ /,/g'` |
62 |
|
|
echo "clearpart --all --initlabel --drives=$hdlist" >> /tmp/part-include |
63 |
|
|
|
64 |
|
|
num=1 |
65 |
|
|
while [ $num -le $numhd ]; do |
66 |
|
|
hd=`echo $hds | cut -d' ' -f$num` |
67 |
|
|
echo "part raid.0_$num --size=100 --ondisk=$hd --asprimary" >> /tmp/part-include |
68 |
slords |
1.2 |
echo "part raid.1_$num --size=1500 --grow --ondisk=$hd" >> /tmp/part-include |
69 |
gordonr |
1.1 |
|
70 |
|
|
md0="$md0 raid.0_$num" |
71 |
|
|
md1="$md1 raid.1_$num" |
72 |
|
|
let num=num+1 |
73 |
|
|
done |
74 |
|
|
|
75 |
|
|
if [ $numhd -le "2" ] ; then |
76 |
|
|
raidlevel=1 |
77 |
|
|
elif [ $numhd -ge "6" ]; then |
78 |
|
|
raidlevel=6 |
79 |
|
|
else |
80 |
|
|
raidlevel=5 |
81 |
|
|
fi |
82 |
slords |
1.2 |
|
83 |
|
|
echo "raid /boot --fstype ext3 --level=1 --device=md0 $md0" >> /tmp/part-include |
84 |
gordonr |
1.1 |
echo "raid pv.1 --fstype \"physical volume (LVM)\" --level=RAID$raidlevel --device=md1 $md1" >> /tmp/part-include |
85 |
|
|
echo "volgroup vg_primary --pesize=32768 pv.1" >> /tmp/part-include |
86 |
slords |
1.2 |
echo "logvol / --fstype ext3 --name=lv_root --vgname=vg_primary --size=1200 --grow" >> /tmp/part-include |
87 |
gordonr |
1.1 |
echo "logvol swap --fstype swap --name=lv_swap --vgname=vg_primary --size=256 --grow --maxsize=$swapsize" >> /tmp/part-include |
88 |
|
|
fi |