AFP548

chroot and $0, $1, $2, $3 in postflight scripts.

I may just have this totally wrong in my head. I want to use the $2 variable to chroot at the very beginning of a script. That way any path I use in the script will work anywhere I tell the installer to install to. For instance If I am booted from drive A, but run the installer against drive B... #!/bin/bash # postflight script # Installer.app Environmental Variables # $0 = Path to package being installed # $1 = Destination path of where package is being installed # $2 = Mountpoint of the destination volume # $3 = Path to the directory containing the System folder that contains the active Installation framework. # # set working directory. chroot "$2" touch /test1 # # rest of script... This should create a file called "test1" at the root of drive B. However, the Installer hangs at the chroot command. and gives the following error. postflight[858]: sh: no job control in this shell
Exit mobile version