Install of rpm packages in %post - script
daniel.kidger at quadrics.com
daniel.kidger at quadrics.com
Tue Apr 20 16:00:30 UTC 2004
I guess I would simplify that even more:
%post
updfstab
mount /mnt/cdrom >>/tmp/mount.log 2>&1
cd /root
tar xvfz /mnt/cdrom/custom.tar.gz
umount /mnt/cdrom
Yours,
Daniel.
--------------------------------------------------------------
Dr. Dan Kidger, Quadrics Ltd. daniel.kidger at quadrics.com
One Bridewell St., Bristol, BS1 2AA, UK 0117 915 5505
----------------------- www.quadrics.com --------------------
> -----Original Message-----
> From: James_Martin at ao.uscourts.gov
> [mailto:James_Martin at ao.uscourts.gov]
> Sent: 20 April 2004 16:20
> To: Discussion list about Kickstart
> Cc: MSiddall at imaginativeit.co.uk
> Subject: RE: Install of rpm packages in %post - script
>
>
> Here's more elegant way doing of what you are trying to
> accomplish %post:
>
> %post
> updfstab
> mount /mnt/cdrom >>/tmp/mount.log 2>&1
> cp -f /mnt/cdrom/custom.tar.gz /root
> cd /root
> gunzip custom.tar.gz
> tar -xf custom.tar
> rm custom.tar
>
> The updfstab updates the /etc/fstab on the system, creating
> the necessary
> entry for /mnt/cdrom so you don't have to type in all that
> extra stuff.
> You don't need the --nochroot.
>
> James S. Martin, RHCE
> Contractor
> Administrative Office of the United States Courts
> Washington, DC
> (202) 502-2394
>
>
>
>
> "Martin Siddall" <MSiddall at imaginativeit.co.uk>
> Sent by: kickstart-list-bounces at redhat.com
> 04/20/2004 05:47 AM
> Please respond to MSiddall; Please respond to Discussion list about
> Kickstart
>
>
> To: "'Discussion list about Kickstart'"
> <kickstart-list at redhat.com>
> cc:
> Subject: RE: Install of rpm packages in %post - script
>
>
> Many thanks to you all.
>
> I have got it working and thought I would let you all know
> the config in
> the ks.cfg file in case anyone else has the same problems.
>
>
> %post --nochroot
> ln -sv /dev/hdc /tmp/cdromsource
> mkdir -p /mnt/source
> mount -t iso9660 /tmp/cdromsource /mnt/source >>/tmp/mount.log 2>&1
> cp -f /mnt/source/custom.tar.gz /mnt/sysimage/root
> cd /mnt/sysimage/root
> gunzip custom.tar.gz
> tar -xf custom.tar
> rm custom.tar
>
>
> HTH
>
> Cheers
>
> Martin
>
> -----Original Message-----
> From: kickstart-list-bounces at redhat.com
> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of
> Philip Rowlands
> Sent: 20 April 2004 10:26
> To: Discussion list about Kickstart
> Subject: RE: Install of rpm packages in %post - script
>
> On Tue, 20 Apr 2004, Martin Siddall wrote:
>
> >When opening the shell in the %post section I tried the
> commands an got
> >an error from mount saying that the file does not exist.
> Having checked
> >the mnt/source and /tmp/cdrom I found that the device file cdrom had
> >been deleted.
> [snip]
> >How can I create the device in the /tmp dir.
>
> See mknod(1), which I believe is part of the busybox builtin.
>
>
> Cheers,
> Phil
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
>
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
More information about the Kickstart-list
mailing list