Re: %post assistance in RH7.3

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

 



> >The %post is the last section in my ks.cfg file, and looks like this:
> >
> >#Post-Install
> >%post --nochroot
> >
> >#Install and/or update RPMs
> >mkdir /mnt/a
> >mount 10.14.1.40:/local /mnt/a
> >
> >echo "Installing apt-get RPM..."
> >chroot /mnt/sysimage rpm -ivh
> >/mnt/a/rpms/apt-0.5.4cnc9-fr0.1.rh73.i386.rpm
> >echo "Done."
>
> The rpm command here won't see /mnt/a because you've chrooted to
> /mnt/sysimage.
>
> You're not doing anything apart from the mount which benefits from
> --nochroot, so I'd suggest something like this:
>
> %post --nochroot
> mkdir /mnt/sysimage/mnt/a
> mount 10.14.1.40:/local /mnt/sysimage/mnt/a
>
> %post
> rpm -ivh /mnt/a/rpms/apt*.rpm
> etc.

Or they can be condensed into one using the --root option of rpm:

  %post --nochroot
  mkdir /mnt/sysimage/mnt/a
  mount 10.14.1.40:/local /mnt/sysimage/mnt/a
  rpm -ivh --root /mnt/sysimage /mnt/sysimage/mnt/a/rpms/apt*.rpm


Cheers...james






[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