RE: Install of rpm packages in %post - script

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

 



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@xxxxxxxxxxxx
One Bridewell St., Bristol, BS1 2AA, UK         0117 915 5505
----------------------- www.quadrics.com --------------------


> -----Original Message-----
> From: James_Martin@xxxxxxxxxxxxxxx 
> [mailto:James_Martin@xxxxxxxxxxxxxxx]
> Sent: 20 April 2004 16:20
> To: Discussion list about Kickstart
> Cc: MSiddall@xxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxx>
> Sent by: kickstart-list-bounces@xxxxxxxxxx
> 04/20/2004 05:47 AM
> Please respond to MSiddall; Please respond to Discussion list about 
> Kickstart
> 
>  
>         To:     "'Discussion list about Kickstart'" 
> <kickstart-list@xxxxxxxxxx>
>         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@xxxxxxxxxx
> [mailto:kickstart-list-bounces@xxxxxxxxxx] 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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/kickstart-list
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/kickstart-list
> 
> 
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/kickstart-list
> 



[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