execute shell script in postinstall
Robinson, Andrew W.
andrew.w.robinson at mms.gov
Tue Mar 22 14:41:15 UTC 2005
> From: Philip Rowlands [mailto:phr at doc.ic.ac.uk]
>
> 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
More information about the Kickstart-list
mailing list