eddie11c
Mar 26 2008, 07:27 PM
I am trying to add a script into an installer to make an alias. Can I not use the ln command in bash? if so is the usage different somehow? ln -s <target> <alias> is what i have tried, I get no error during the script, but also don't see any alias output. I can do the command just fine in terminal and I do require root authorization. Any ideas? I want to create an alias as opposed to installing a premade one..
ritalin
Mar 26 2008, 07:48 PM
ln -s ${1} ${2} works in #!/bin/bash or #!/bin/sh on my machine.
In what context are you trying to use it?
eddie11c
Mar 26 2008, 08:24 PM
During my custom install DVD I want to create some alias'. I tried ln -s "$3/target" "$3/alias", and even tried pointing to the ln command /bin/ln, it doesn't spit out any errors about not finding the file or that it already exists, but yet there is no output that I can see. Maybe my syntax is incorrect. If you could post an example of what is working?
Lets make up a file called test that is located in /System/Library/Filesystems/Example of the target Volume $3 and want an alias created in the same volume in /usr/bin. ln -s "$3/System/Library/Filesystems/Example/test" "$3/usr/bin/test" but this is not working. Any help would be appreciated.
ritalin
Mar 26 2008, 08:46 PM
Where in the installer will this command being called from?
InstallationCheck
VolumeCheck
preflight
postflight...Etc
Is volume referenced by $3 definitely mounted at the point in time in question?
When I said it was working in bash and sh, that was just a quick test from a shell script on my desktop, not from a running Installer. I will try again from my live/install memory stick.
eddie11c
Mar 26 2008, 09:44 PM
Yes the target volume is mounted and defined as $3 during install. This script would be attached as postinstall of a package.
ritalin
Mar 26 2008, 10:03 PM
Okay, I'll build a pkg and try it. Back in a mo..... Yes, it works fine.
eddie11c
Mar 26 2008, 10:05 PM
QUOTE (ritalin @ Mar 26 2008, 10:03 PM)

Okay, I'll build a pkg and try it. Back in a mo..... Yes, it works fine.
And the syntax I had was correct? If so I will have to double check it again for a typo or something.
ritalin
Mar 26 2008, 10:14 PM
Here is a
link to the pkg I used to run the test.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.