Unless you specify a different administrative file, the pkgadd command reads “/var/sadm/install/admin/default”, which specifies the base directory as “/opt”. Do not change the settings in this file, but rather create a custom admin file and enter an alternate “basedir” directive if you want to install your package into a different directory. We are going to install our package into “/var/applications”, and call our custom admin file “custom”.
First, create and edit “/var/sadm/install/admin/custom”, adding a line similar to this:
Next, issue the pkgadd command with the “-a” flag to call you alternative admin file:
pkgadd -d device -a custom PackageName
This really comes in handy when your customers want to retain control over their packages, but you don’t want to give them access to write packages into the system area. More detailed instructions can be found here.