Includes in pre scripts
Gerrard Geldenhuis
Gerrard.Geldenhuis at datacash.com
Wed Mar 26 17:54:01 UTC 2008
Hi
I am trying to do the following in satellite:
At the top of the kickstart file:
device scsi cciss
zerombr yes
clearpart --all
%include /tmp/partinfo
In my pre script :
%pre
wget http://blah.com/pub/ks-scripts/post.sh -O /tmp/post.sh
wget http://blah.com/pub/ks-scripts/pre.sh -O /tmp/pre.sh
%include /tmp/pre.sh
This works but my pre.sh script looks like the following:
HOSTNAME=$(grep HOSTNAME /tmp/netinfo|cut -d= -f2|cut -d. -f1)
vgn=vg_$HOSTNAME
cat << EOF > /tmp/partinfo
partition /boot --fstype=ext3 --size=200
partition pv.01 --size=1000 --grow
partition swap --size=1000 --maxsize=2000
volgroup $vgn pv.01
logvol / --vgname=$vgn --name=rootvol --size=5120
logvol /home --vgname=$vgn --name=homevol --size=1024
logvol /tmp --vgname=$vgn --name=tmpvol --size=1024
logvol /var --vgname=$vgn --name=varvol --size=1536
logvol /var/log --vgname=$vgn --name=logvol --size=30720
logvol /var/tmp --vgname=$vgn --name=vartmpvol --size=1024
EOF
So what I am expecting to happen is:
1. Download post and pre scripts from server.
2. Insert pre.sh as part of the pre script
3. Execute the pre.sh script
4. Continue on its mery way.
However I get a No such file or directory: '/tmp/partinfo'
Can anyone suggest a way of achieving this.
I have 5 different kickstarts at the moment and I want them all to share
the same post and pre scripts without having to edit the scripts on each
one in the satellite config everytime I make a minor change.
Any suggestions would be appreciated.
Regards
More information about the Kickstart-list
mailing list