Re: Option to execute a command?
Re: Option to execute a command?
- Subject: Re: Option to execute a command?
- From: Stephane Sudre <email@hidden>
- Date: Thu, 31 Mar 2011 10:03:08 +0200
Another solution is to only allow the package to be installed on the
startup disk.
On Wed, Mar 30, 2011 at 9:11 PM, Karl Kuehn <email@hidden> wrote:
> One thing that is missing in this conversation is that you could be running
> this installer targeted at a volume other than the boot volume. It is really
> simple to catch this case, so we should always be pushing people to do this
> when they write installer scripts. More inline:
> On Mar 30, 2011, at 11:36 AM, Greg Neagle wrote:
>
> preinstall:
>
> #!/bin/bash
>
> LAUNCHD=/Library/LaunchDaemons/edu.caltech.autonomy.foo.plist
>
> if [ -e "$LAUNCHD" ]; then
>
> launchctl unload -w "$LAUNCHD"
>
> fi
>
> This unloads the launchd job defined in
> /Library/LaunchDaemons/edu.caltech.autonomy.foo.plist only if it already
> exists. This is useful for reinstalls and installs of new versions of your
> software. The file does not need to exist.
>
> Here you should be checking if the target volume is '/'. This is simple in
> this case, just replace the appropriate line with this:
> if [ -e "$LAUNCHD" ] && [ "$3" == "/" ]; then
_______________________________________________
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