LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (http://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   RHEL 5 Kickstart copying files from DVD & inserting comments with sed (http://www.linuxquestions.org/questions/linux-enterprise-47/rhel-5-kickstart-copying-files-from-dvd-and-inserting-comments-with-sed-617706/)

ilo 01-31-2008 12:01 PM

RHEL 5 Kickstart copying files from DVD & inserting comments with sed
 
Hello everyone,

First post here.

I am trying to copy files from the installation DVD over to the new filesystem.
I understand that the system is new and it is difficult to copy from.
Here is the post section of my kickstart:

Code:

%post nochroot --log=/tmp/post.log

#Enable / Disable Services
/sbin/chkconfig --level 0123456 apmd off
/sbin/chkconfig --level 0123456 pcmcia off
/sbin/chkconfig --level 0123456 bluetooth off
/sbin/chkconfig --level 0123456 hidd off
/sbin/chkconfig --level 0123456 hplip off
/sbin/chkconfig --level 0123456 ip6tables off
/sbin/chkconfig --level 0123456 isdn off
/sbin/chkconfig --level 0123456 pcscd off
/sbin/chkconfig --level 0123456 rhn-virtualization-host off
/sbin/chkconfig --level 0123456 xend off
/sbin/chkconfig --level 0123456 xendomains off
/sbin/chkconfig --level 35 httpd on
/sbin/chkconfig --level 35 vsftpd on
/sbin/chkconfig --level 2345 ntpd on
/sbin/chkconfig rlogin on
/sbin/chkconfig rsh on

#Backing up Files that will be changed
mkdir /backup/original_files
cp /etc/inittab /backup/original_files/inittab
cp /etc/fstab /backup/original_files/fstab
cp /etc/udev/rules.d/50-udev.rules /backup/original_files/50-udev.rules
cp /etc/ntp.conf /backup/original_files/ntp.conf

#Copying Files
mkdir /mnt/up
mkdir /backup/hp
mount /dev/dvd /mnt/up
cp /mnt/up/HP_Insight_manager/hpasm-7.9.1-13.rhel5.x86_64.rpm /backup/hp/hpasm-7.9.1-13.rhel5.x86_64.rpm
cp /mnt/up/ntp_file/ntp.conf /etc/ntp.conf

umount /mnt/up
/usr/bin/cp /tmp/post.log /mnt/sysimage/root/post.log

Any help appreciated


All times are GMT -5. The time now is 08:24 PM.