Re: Struggles with PackageMaker and Iceberg scripts
Re: Struggles with PackageMaker and Iceberg scripts
- Subject: Re: Struggles with PackageMaker and Iceberg scripts
- From: Nick Peelman <email@hidden>
- Date: Tue, 16 Mar 2010 11:48:29 -0400
On Tue, Mar 16, 2010 at 11:32 AM, Xochitl Lunde
<email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden