RE: execute shell script in postinstall

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

 



 

> From: Philip Rowlands [mailto:phr@xxxxxxxxxxxx] 
> 
> On Tue, 22 Mar 2005, keanboon wrote:
> 
> >I want to execute a shell script in postinstall. Where 
> should i put my
> >shell script? How can i execute it?
> 
> Hard disk, optical disk, network... e.g. :
> 
> %post
> wget http://server.example.com/script.sh
> sh script.sh

Just to add a couple of points from my own experience (yes, the hard way :).

- If you execute the script directly, './script' instead of 'sh script.sh', be sure to make it executable. Phil's method would have saved me some grief.

- Until you reboot, you have the limited installation environment and tool set. For example, sed is available, but awk is not.

Andrew Robinson


[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