Re: Struggles with PackageMaker and Iceberg scripts
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:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=O5gXeCaMeg1PKPVM7kdk8RJjge16yEml2R00T62/Yr0=; b=x/+2ROLLsyeFGxX1b3NcdCVw6i3zIkxZNZI17dd1EBdoDEEqrKcSn/Mb78IjGh3N+Q J/1txZhEYyikLvlYzJBDABX6glbErfOY1U7XI7PFznZBblRWeBvxK/XVJXFHWmKdlXIc bG5xWWbJQxlTIHCHXrjsyPYC3jzWPg+nrjKXI= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=AnO5BKnWeq7XVihC8iIhQt6uErl+4fxzbuxw5Ri5/DCfSq7oKcsIwn8YTt2KXLHcF4 EU9UzaZ/qoN23vtPbZFBfsJF1Hw6Xr68AFKQvXCeSlO91iGdvcuCGFZT6rjPmnUShfRF WE4eKqGjS+5qyJpsoEKbODXpqkilgQNNftyOA= On Tue, Mar 16, 2010 at 11:32 AM, Xochitl Lunde <Xochitl_Lunde@tripplite.com> wrote:
XO: I do install the plist in /Library/LaunchAgents. The reason that I care is that if either of our programs is running when the installer runs, I have to stop the program before installing again. This doesn't work nicely if other users are logged in because I can't stop the agent for them also.
Admittedly, this is an edge case, how many users would be using Fast User Switching to have a second console user, but its still a case that should be handled.
XO: It doesn't give me an extra user. What happens is that when the Installer GUI is used to install the package, the $USER environment variable is set as my user, 'xlunde'. If I use 'sudo' to run the installer on the command line, the $USER parameter is set to 'root' instead. Because my script checks for users logged in who are not $USER, I get the error.
My post install scripts also try to start the launch agent for the $USER, so this might work weird or not at all if 'root' is the $USER.
Yeah, that's what I get for opening my mouth/keyboard without testing first. When sudo is invoked, it sets several variables as well, including $SUDO_USER which should contain the username of the user who invoked it. You may have to do an else if in your bash to handle that.
XO: I don't have ARD that I know of, and it doesn't look like it's free. This software is going to an external testing house later, so they'll have to test that. : /
I could run a few test cases for you with ARD, if you wanted. Ping me offlist. -nick _______________________________________________ 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)
-
Nick Peelman