RE: how to copy file at post?

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

 



I do it this way: (in ks.cfg)

%post --nochroot
(
PATH=${PATH}:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin
export PATH
# create dir for data copied from source
mkdir -p /mnt/sysimage/tmp/source
cd /mnt/sysimage/tmp/source
if [ ! -e /mnt/source/mydirectory ] ; then
  # it seems my cdrom is not mounted
  mkdir -p /tmp/source
  mount /tmp/cdrom /tmp/source
  ( cd /tmp/source/mydirectory ; tar cf - *) | tar xvpf -
  umount /tmp/source
  rm -rf /tmp/source
else
  ( cd /mnt/source/mydirectory ; tar cf - *) | tar xvpf -
fi
) 2>&1 >> /mnt/sysimage/tmp/install-nochroot.log


Hope this helps

Thomas.

  
 

Zitat von "Chan, Dominic" <DWC@xxxxxxxxxxxx>:

> Is there a way for me to copy a file off the CD to the /root during post
> phrase (or before)??  Usually during post, the CD is already ejected.
> How do I get around this?
> 
> dwc


-- 
Thomas Baumann // Postfach 110115 // D-64216 Darmstadt // <tom@xxxxxxx>




[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux