RE: %post

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

 



I've tried this and it works.  Yes, the script needs to be executable. 

Thanks to you all for your help!!!

-----Original Message-----
From: Tru Huynh [mailto:tru@xxxxxxxxxx] 
Sent: Thursday, January 16, 2003 3:24 PM
To: kickstart-list@xxxxxxxxxx
Subject: Re: %post

On Thu, Jan 16, 2003 at 02:01:01PM -0500, Bodle, Donald E wrote:
> What I've done is written a shell script that is called in %post, which
> contains a lot of actions I want taken such as your chkconfig command:
> 
> # make sure telnet,tftp, rsh, rlogin, and wu-ftpd are turned on
#!/bin/sh
> /sbin/chkconfig telnet on
...
> /sbin/chkconfig --level 2345 xfs off
> 
> Here's how I call it:
> 
> %post --nochroot
> # some other actions that I want done in a nochroot environment.  
> # The script is called at the very end
> # it resides in the root of the CDROM, so I move it to disk
> cp /mnt/source/postscript /mnt/sysimage/tmp/postscript
then what about:
%post --nochroot
cp /mnt/source/postscript /mnt/sysimage/tmp/postscript
%post 
sh /tmp/postscript

> # more other actions
> # then I call it in a chroot environment
> chroot /mnt/sysimage /tmp/postscript

is your script /tmp/postscript executable?

%post --nochroot
cp /mnt/source/postscript /mnt/sysimage/tmp/postscript
chmod 700 /mnt/sysimage/tmp/postscript
chroot /mnt/sysimage /tmp/postscript

my .02 euros cents,

Tru
-- 
Dr Tru Huynh          | http://www.pasteur.fr/recherche/unites/Binfs/
mailto:tru@xxxxxxxxxx | tel/fax +33 1 45 68 87 37/19
Institut Pasteur, 25-28 rue du Docteur Roux, 75724 Paris CEDEX 15 France  



_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.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