Re: %post trouble

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

 



Try doing it this way...  should save you much work..

%post

#mount the cdrom
updfstab
mount /mnt/cdrom
cp /mnt/cdrom/Fedora/RPMS/extras/mysqld.init /etc/rc.d/init.d/mysqld


That should be all you need.. the updfstab updates the /etc/fstab with 
/mnt/cdrom and points it to the correct device.  I'm sure you can figure 
out the rest :).

Good luck!

James


James S. Martin, RHCE
Contractor
Administrative Office of the United States Courts
Washington, DC
(202) 502-2394

kickstart-list-bounces@xxxxxxxxxx wrote on 05/14/2004 10:27:27 AM:

> Hi people
> 
> I have a question about kickstart in Fedora Core 1. In %post I am trying 

> to copy a file from the cd onto the newly installed system (it is a 
> modified mysqld init script - can't be bothered rebuilding mysql rpm 
> just for that)
> 
> This is what I have tried so far for tests but none of it has worked:
> %post --nochroot
> echo "in nochroot post"
> echo "doing first mkdir"
> mkdir -p /mnt/source
> echo "doing first mount"
> mount /tmp/cdrom /mnt/source
> echo "trying first copy"
> cp -f /mnt/source/Fedora/RPMS/extras/mysqld.init 
> /mnt/sysimage/etc/rc.d/init.d/mysqld
> echo "trying first unmount"
> umount /mnt/source
> 
> %post
> echo "in regular post"
> echo "doing second mkdir"
> mkdir -p /mnt/source
> echo "doing second mount"
> mount /tmp/cdrom /mnt/source
> echo "trying second copy"
> cp -f /mnt/source/Fedora/RPMS/extras/mysqld.init 
> /mnt/sysimage/etc/rc.d/init.d/mysqld
> echo "trying second unmount"
> umount /mnt/source
> 
> 
> I had done this in redhat 7.3 with just a simple:
> %post --nochroot
> cp -f /mnt/source/Fedora/RPMS/extras/mysqld.init 
> /mnt/sysimage/etc/rc.d/init.d/mysqld
> 
> This doesn't work for me with Fedora Core 1 - any ideas how I can run my 

> copy command while the cd is mounted - either mounted by me or still 
> mounted from install?
> 
> thanks
> 
> -- 
> Before you criticize someone, walk a mile in their shoes ...
> That way when you do criticize them, you're a mile away and you have
> their shoes!
> 
> 
> _______________________________________________
> 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