Hi sorry for that
I m not familiar yet with forum use thanks for that
I m not using yum install I m using automated kickstart scriipt install
to install the tftp server
tftp-server-*
system-config-netboot-*
So do you sugeest instead of using that should I use tftp-server* ?
Run scripts after centos installed
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Run scripts after centos installed
All I was suggesting is that you may want to verify that the syntax you are using is resulting in the package selection you want, and if not to adjust accordingly.
Re: Run scripts after centos installed
[quote]allamiro wrote:
# backup the rc local file
# Enable a call to your script
echo "BCFINSTALL=1 ; /etc/rc.d/bcfinstall.sh" >> /etc/rc.d/rc.local
# Create your script
cat > /etc/rc.d/bcfinstall.sh > /etc/rc.d/rc.local
mount -r -o loop /isos/applogic/centos57.iso /mnt/centos
rpm --import /mnt/centos/RPM-GPG-KEY-5
rpm -ivh /mnt/centos/CentOS/tftp-server-*
yum list
cp /mnt/centos/CentOS/bfc*.iso /isos/applogic/
cp /mnt/centos/interactive.txt /isos/applogic/
mount -r -o loop /isos/applogic/bfcinstall.iso /mnt/cdrom
/mnt/cdrom/fcinstall.sh -c /isos/applogic/interactive.txt -x /isos/applogic/bfcext.iso
# Disable the call to this script
sed -i "s/BCFINSTALL/#BCFINSTALL/" /etc/rc.d/rc.local
EOF
chmod +x /etc/rc.d/bcfinstall.sh[/quote]
For clarity: this is supposedly a part of the %post section of a kickstart file.
Furthermore, the version above should probably be cleaned to this:
[code]# backup the rc local file
# Enable a call to your script
echo "BCFINSTALL=1 ; /etc/rc.d/bcfinstall.sh" >> /etc/rc.d/rc.local
# Create your script
cat > /etc/rc.d/bcfinstall.sh <<EOF
#!/bin/bash
#Your install script commands here
dd if=/dev/cdrom of=/isos/applogic/centos57.iso
chmod 755 /isos/applogic/centos57.iso
mount -r -o loop /isos/applogic/centos57.iso /mnt/centos
cp /mnt/centos/CentOS/bfc*.iso /isos/applogic/
cp /mnt/centos/interactive.txt /isos/applogic/
mount -r -o loop /isos/applogic/bfcinstall.iso /mnt/cdrom
#
/mnt/cdrom/fcinstall.sh -c /isos/applogic/interactive.txt -x /isos/applogic/bfcext.iso
#
# As last action disable the call to your script from the rc.local
sed -i "s/BCFINSTALL/#BCFINSTALL/" /etc/rc.d/rc.local
EOF
# Make sure that rc.local can execute the /etc/rc.d/bcfinstall.sh
chmod +x /etc/rc.d/bcfinstall.sh[/code]
# backup the rc local file
# Enable a call to your script
echo "BCFINSTALL=1 ; /etc/rc.d/bcfinstall.sh" >> /etc/rc.d/rc.local
# Create your script
cat > /etc/rc.d/bcfinstall.sh > /etc/rc.d/rc.local
mount -r -o loop /isos/applogic/centos57.iso /mnt/centos
rpm --import /mnt/centos/RPM-GPG-KEY-5
rpm -ivh /mnt/centos/CentOS/tftp-server-*
yum list
cp /mnt/centos/CentOS/bfc*.iso /isos/applogic/
cp /mnt/centos/interactive.txt /isos/applogic/
mount -r -o loop /isos/applogic/bfcinstall.iso /mnt/cdrom
/mnt/cdrom/fcinstall.sh -c /isos/applogic/interactive.txt -x /isos/applogic/bfcext.iso
# Disable the call to this script
sed -i "s/BCFINSTALL/#BCFINSTALL/" /etc/rc.d/rc.local
EOF
chmod +x /etc/rc.d/bcfinstall.sh[/quote]
For clarity: this is supposedly a part of the %post section of a kickstart file.
Furthermore, the version above should probably be cleaned to this:
[code]# backup the rc local file
# Enable a call to your script
echo "BCFINSTALL=1 ; /etc/rc.d/bcfinstall.sh" >> /etc/rc.d/rc.local
# Create your script
cat > /etc/rc.d/bcfinstall.sh <<EOF
#!/bin/bash
#Your install script commands here
dd if=/dev/cdrom of=/isos/applogic/centos57.iso
chmod 755 /isos/applogic/centos57.iso
mount -r -o loop /isos/applogic/centos57.iso /mnt/centos
cp /mnt/centos/CentOS/bfc*.iso /isos/applogic/
cp /mnt/centos/interactive.txt /isos/applogic/
mount -r -o loop /isos/applogic/bfcinstall.iso /mnt/cdrom
#
/mnt/cdrom/fcinstall.sh -c /isos/applogic/interactive.txt -x /isos/applogic/bfcext.iso
#
# As last action disable the call to your script from the rc.local
sed -i "s/BCFINSTALL/#BCFINSTALL/" /etc/rc.d/rc.local
EOF
# Make sure that rc.local can execute the /etc/rc.d/bcfinstall.sh
chmod +x /etc/rc.d/bcfinstall.sh[/code]