Re: How to pass variable to preflight/Volumecheck using installer command to do installation?
Re: How to pass variable to preflight/Volumecheck using installer command to do installation?
- Subject: Re: How to pass variable to preflight/Volumecheck using installer command to do installation?
- From: David Buxton <email@hidden>
- Date: Tue, 26 Oct 2010 12:08:18 +0100
On 26 Oct 2010, at 10:51, Shaguo wrote:
> Is there any way to pass a variable to the preflight script using installer command to install a pkg?
>
> # sudo installer -pkg xxx.pkg -target /
>
> I want to pass a variable to the Volumecheck/preflight scripts. Usually, the export command can set variable to its children processes. But it does not work for the installer. For example,
> #export xx=s; (sudo installer -pkg xxx.pkg -target / )
> preflight can not get the variable xx.
This may be because sudo cleans its environment rather than installer cleaning it for the package scripts. What if you set your environment variable like this:
sudo xx=s installer -pkg xxx.pkg -target /
Make any difference? I haven't checked whether installer does also clean the environment for scripts - if it does then obviously this won't help much.
David B.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden