View Full Version : Installation Scripts
LawlessPPC
07-14-2008, 04:28 PM
OK can someone point me in the right direction where I can find the info on generating a script within an install (PKG). I think I may have it right but need clarification. Also is there a resource for terminal commands. Also what can I use instead of root to make sure install goes on destination drive. eg the script needs to be run on the drive osx is being installed too. So I need a replacement for root.
Thanx in advance
LawlessPPC
zephyroth
07-16-2008, 11:36 AM
You must write a shell or a perl script named "preinstall" or "postinstall" and then add it to your pkg using PackageMaker.
Example:
#!/bin/sh
rm -r $3/System/Library/Extensions/AppleEFIRuntime.kext
rm -r $3/System/Library/Extensions/AppleIntelCPUPowerManagement.kext
exit 0
$3 means the destination drive.
Hope it helps.
LawlessPPC
07-16-2008, 04:39 PM
Zephy thanx for the help. Have you been away?? Also is this the reason alcinject doesnt work straight after install.
Thanks
LawlessPPC
LawlessPPC
07-16-2008, 08:02 PM
sudo chown -R root:wheel
would this need to be sudo chown -R $3:wheel
or just change the directory after this to $3/etc.,....
LawlessPPC
07-16-2008, 08:41 PM
ok Zeph solved the alcinject issue that installs fine now just need to make alc either overright the existing applehda or stop osx overwriting the alcinjects version of applehda. Any suggestions
Thanks
LawlessPPC
LawlessPPC
07-16-2008, 10:24 PM
all problems solved so far didnt realise package maker was as good as it is didnt look all the way through to notice the switches LOL *80)