Re: A question about locations within a package, vis-à-vis postinstall script
Re: A question about locations within a package, vis-à-vis postinstall script
- Subject: Re: A question about locations within a package, vis-à-vis postinstall script
- From: "OSullivan, Steve" <email@hidden>
- Date: Tue, 21 Oct 2008 15:16:16 -0700
- Thread-topic: A question about locations within a package, vis-à-vis postinstall script
Greg,
Thank you very much for your correspondence.
I have changed my ditto line to use $1, so that it now reads:
ditto $1/Resources/com.product.launchd.engine_osx.plist
/Library/LaunchDaemons/
And yet, ditto responds that it cannot 'get real path for source'.
I have also removed the sudos from the script and everything else still
works even without them.... I guess that they were a security risk?
I have been learning this piecemeal, and working outside of the GUI. How
would you suggest that I get the com.product.launchd.engine_osx.plist file
into the bom and archive?
Thanks for any and all assistance!
Regards,
Steve O'Sullivan
On 10/21/08 11:33 AM, "Greg Neagle" <email@hidden> wrote:
> $1: Full path to the installation package the Installer application
> is processing. For example: /Volumes/Users/michelle/Desktop/
> Levon.mpkg
>
> So:
>
> ditto $1/Contents/Resources/com.company.launchd.engine_OS.plist /
> Library/LaunchDaemons/
>
> Don't use sudo in your postinstall scripts.
> And - any reason the launchd plist isn't simply in the archive and bom?
>
> Try to avoid postinstall (and preinstall) file copying if at all
> possible. Ideally the bom should tell the truth as far as what files
> were installed and/or replaced by your package.
>
> -Greg
>
>
> On Oct 21, 2008, at 11:19 AM, OSullivan, Steve wrote:
>
>> Good morning all,
>>
>> I am creating an installer package using PackageMaker 3.0.2 from the
>> command
>> line.
>>
>> I am running a postinstall script that overall seems to work well
>> (it is
>> triggered and most of its commands are carried out.)
>>
>> The problem lies in the fact that I am trying to copy a launch
>> daemon plist
>> from the package to /Library/LaunchDaemons, and I cannot seem to
>> find the
>> proper syntax to tell the script where the launch daemon plist is
>> located in
>> the installer.
>>
>> Things are laid out like this (examining the package with Pacifist):
>>
>> engine.pkg
>> pkgbaseengine.pkg
>> scripts
>> postinstall
>> Resources
>> launch daemon plist
>>
>> In my postinstall script, I am using the following line to try and
>> place the
>> launch daemon plist in the appropriate place which so far fails:
>>
>> sudo ditto ../Resources/com.company.launchd.engine_osx.plist
>> /Library/LaunchDaemons/
>>
>> As of right now, I do not know how to properly identify the starting
>> location of the launch daemon to be able to copy it into the
>> /Library/LaunchDaemons directory.
>>
>> I really appreciate any and all thoughts!
>>
>> TIA,
>>
>> Steve O'Sullivan
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Installer-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> ation.com
>>
>> This email sent to email@hidden
>
>
_______________________________________________
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