Re: coping files off the CD.

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

 



On Tue, Apr 10, 2001 at 10:20:27AM -0400, hesselsp@xxxxxxxxxxxxxxx wrote:
> 
> one resulting question:
> can I have two `%post`s?
> 
> for example:
> %post --nochroot
> /usr/bin/cp /mnt/source/file.tgz /mnt/sysimage/
> %post 
> /usr/sbin/useradd hesselsp

at first glance, I'd say that you can't / shouldn't do that... but I haven't 
tested it myself.  

Mainly because %post contains the script that is to be evaluated post-install,
and --nochroot is an option to %post, interpreted by anaconda, and that %post 
is viewed as a definition of the script.  You've defined %post twice in the
above example, and I'm not sure how that's interpreted by the installer, or if
there is defined behavior other than "everything after the %post line is run
by bash (or the interpeter specified in ks.cfg)".

perhaps doing --nochroot and running `chroot` inside %post as needed would be 
better, I've heard of at least partial success in that case.  You might also
try running `chroot [new root] [command]` as needed.  Again, I've not tested
chroot inside the installer myself, but don't see any obvious reasons that it
should act differently than on a system that's running installed Red Hat Linux.


--Brian



-- 
Brian Brock

Red Hat, Inc. -- Quality Assurance
bbrock@xxxxxxxxxx





[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