Re: Is it ok to create a directory from a postflight script?
Re: Is it ok to create a directory from a postflight script?
- Subject: Re: Is it ok to create a directory from a postflight script?
- From: Karl Kuehn <email@hidden>
- Date: Tue, 6 Jan 2009 08:30:22 -0800
On Jan 6, 2009, at 7:41 AM, email@hidden wrote:
I need to create a folder in /Library/Application\ Support/Company/
called 'target'. Is it ok to add the following step to the
postflight script:
mkdir /Library/Application\ Support/Company/target
Or, should this be in a postinstall script instead?
/bin/mkdir -p /Library/Application\ Support/Company/target
/bin/chmod 775 Library/Application\ Support/Company/target
/usr/sbin/chown root:admin /Library/Application\ Support/Company/
target
postflight is fine with the command above.
If at all possible I would put the directory in the package without
invoking a postflight script. If you do have to use a script for some
reason, I would ask that you get in the habit of always using commands
that reference relative to the install target ($3):
/bin/mkdir -p "$3"/Library/Application\ Support/Company/target
/bin/chmod 775 "$3"/Library/Application\ Support/Company/target
/usr/sbin/chown root:admin "$3"/Library/Application\ Support/Company/
target
I ask this because I am one of the developers of InstaDMG, and one of
the problems we run into time and again is that people don't use the
relative targeting and our system then installs all of the files on
the target volume, but the scripts screw up and target the boot volume.
--
Karl Kuehn
email@hidden
_______________________________________________
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