Includes in pre scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux