Re: Environment variable availability within post-install script
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:received:received:mime-version:in-reply-to :references:content-type:message-id:content-transfer-encoding:from :subject:date:to:x-mailer; bh=P0sKb7ZcFWur6VXafhbxOGHGtpPK+yYP1yfcwkpKPLM=; b=F6557lwA1K+0TatIEkfDi95uof7krW8bxxRoh1qsACBgcsLHt0skT/FyxcmyQ4yhgL JcksTkE9ukMGq+mZ3MFaJt9hqtwwQTtqd2kB4EswMxH+ec0eIDS/ktCe0qGinvrtcdmd pzIGZwN8klBiF8sQTBqq+nBnSdN8wUs+qQfhw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=Q5FiICpcEcB104Urj8vu+0p1z7i+rlNAFi1x+uqDnqvFjwjGTbiard4mHDOlHHAKWN 1NEDTEjRn1Qbw8bJUOOvgEpeQNvDY/j974OEGhCjkX/HJt+wt2soJgQCkMGpVH7eEzeN 3wuE+374Repv9xwWXGzkgOTmijzchZT/PbL+g= On May 9, 2010, at 8:10 PM, Tim Streater wrote: In my PHP, I appear to be able to do: $user = getenv ("USER"); My post-install script (written in PHP) must write a file on the user's desktop, and so needs the user's shortname in order to construct the path. The script also modifies the apache config file and so needs admin priv. I appear to be able to give it that by ticking "Require admin authentication". to have the logged-in user's name. This seems unexpected to me, I would have thought that I would get "root", if anything at all. It also seems at variance with the documentation that lists the environment variables available to the scripts. Can I rely on what I've done or is there a better way of getting the user's shortname? I didn't know you could use PHP code in a post-install script but that's the correct environment variable. _______________________________________________ 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)
-
Iceberg-Dev