• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it ok to create a directory from a postflight script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Is it ok to create a directory from a postflight script? (From: "OSullivan, Steven" <email@hidden>)
 >Re: Is it ok to create a directory from a postflight script? (From: email@hidden)

  • Prev by Date: RE: Distribution packages and Panther
  • Next by Date: Debugging Plugin
  • Previous by thread: Re: Is it ok to create a directory from a postflight script?
  • Next by thread: The source media you are installing from is damaged
  • Index(es):
    • Date
    • Thread