Re: %post trouble

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

 



My favorite, often overlooked, debugging and development tool: open a
shell in %post:

%post
chvt 3
exec < /dev/tty3 > /dev/tty3
sh

Now you are in a chrooted shell, and you can alt+F2 to the no-chrooted
shell console.  When you exit the shell, on tty3, the %post script
continues.  

Also, the "chvt 3" would enable you to see the output of your echo
statements.

hth,
Ed






On Fri, 2004-05-14 at 08:27, Paul Pianta wrote:
> 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



[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