Re: Option to execute a command?
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=I/xQzvnqG1FiVcC6bOgcqxSNMOHz49k0y0qNM6n3dOI=; b=pNuGGEE+5KVx/iPY2N1idrPE/NOEe34zxwyKYNIPxoHUEv3DvuQ2YLlNuyMPGg3NCm WKJQRk3Yn3uuaMghgj5NM+RUQXDPfKxUjTyvovTBgnXa2YV/2RJ67Bl8JiEebMEjHAKa HF9pAGbbgyqrcWg1kJGpXBmATsGxgscRJJq0w= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Y6kd/PlvHAEEP0QI0Xc2EKfiIFiqo7Lx7InqR3qRgK497M4Ec/b7+LkkQiww1nM1cq 0KHqalVyrW1C5C6R+RAmtO5H6acBcWQDLLty895DPvzJZp8UCfuHD4icPf0FBdRKQ9Qp ZShqQ7vPQ2ZI30qtWoBFTdb5SLyH7DOSX8CQ8= 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 <kuehn.karl@gmail.com> 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 (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Stephane Sudre