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

RE: %include statement



Here's an example.  See in particular the "%include /tmp/partfile" and the
"cat >> /tmp/partfile << EOF"

lang en_US
langsupport en_US
... stuff ...
%include /tmp/partfile
%packages
@ Everything
%pre
shopt -s xpg_echo
... stuff ...
ls /proc/ide/hdb > /dev/null 2>&1
if [ $? -eq 0 ]
then # hdb means cdrom is not hda, so ide disks exist
  echo "Setting up IDE based partitioning" > /dev/tty3
  echo "Setting up IDE based partitioning at `date`" >> /tmp/reyinstall.log
# okay, here we have to use fdisk to do partitioning instead of letting
# anaconda do it.  We already know its an ide device.  Just have to create
# the right partitions with the right sizes

# start out fresh
echo | fdisk /dev/hda << EOF
o
w
EOF
# now start creating partitions
echo | fdisk /dev/hda << EOF
n
p
1

+64M
n
e
2


n
l

+4096M
n
l

+2048M
n
l

+2047M
t
7
82
n
l

+512M
n
l

+448M
n
l

+320M
n
l

+256M
w
EOF
  echo "IDE based partitioning completed" > /dev/tty3
  echo "IDE based partitioning completed at `date`" >> /tmp/reyinstall.log
  fdisk -l > /dev/tty3
  fdisk -l >> /tmp/reyinstall.log
  cat >> /tmp/partfile << EOF
part /boot --onpart hda1
part swap  --onpart hda7
part /     --onpart hda10
part /tmp  --onpart hda6
part /usr  --onpart hda5
part /var  --onpart hda8
part /opt  --onpart hda11
part /rs1  --onpart hda9
EOF
  echo "/dev/hda11" > /tmp/INSMGR_DEV
else # if no hdb, then cdrom is hda, and scsi disks exist
  echo "Setting up SCSI based partitioning" > /dev/tty3
  echo "Setting up SCSI based partitioning at `date`" >> /tmp/reyinstall.log
# okay, here we have to use fdisk to do partitioning instead of letting
# anaconda do it.  We already know its a scsi device.  Just have to create
# the right partitions with the right sizes

# start out fresh
echo | fdisk /dev/sda << EOF
o
w
EOF
# now start creating partitions
echo | fdisk /dev/sda << EOF
n
p
1

+64M
n
e
2


n
l

+4096M
n
l

+2048M
n
l

+2047M
t
7
82
n
l

+512M
n
l

+448M
n
l

+320M
n
l

+256M
w
EOF
  echo "SCSI based partitioning completed" > /dev/tty3
  echo "SCSI based partitioning completed at `date`" >> /tmp/reyinstall.log
  fdisk -l > /dev/tty3
  fdisk -l >> /tmp/reyinstall.log
  cat >> /tmp/partfile << EOF
part /boot --onpart sda1
part swap  --onpart sda7
part /     --onpart sda10
part /tmp  --onpart sda6
part /usr  --onpart sda5
part /var  --onpart sda8
part /opt  --onpart sda11
part /rs1  --onpart sda9
EOF
    echo "/dev/sda11" > /tmp/INSMGR_DEV
fi
%post --nochroot
echo "Beginning postinstall steps" > /dev/tty3
echo "Beginning postinstall steps at `date`" >> /tmp/reyinstall.log
... stuff ...
chroot /mnt/sysimage /tmp/postscript I
echo "Done running chroot postscript" > /dev/tty3
echo "Done running chroot postscript at `date`" >>
/mnt/sysimage/tmp/reyinstall.
log

Donald E. Bodle, Jr., RHCT
Sr. Systems Integration Engineer
Platform Development
The Reynolds and Reynolds Co.
(937) 485-1954
 


-----Original Message-----
From: trax [mailto:traxtopel HotPOP com] 
Sent: Wednesday, August 27, 2003 2:39 PM
To: kickstart-list redhat com
Subject: %include statement


Hi,
can anyone show me an example of a ks.cfg which incorporates the %include
statement in it. I seem to have some issues getting mine to read it
correctly.

-- 
trax <traxtopel HotPOP com>



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




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