Environment
Novell Open Enterprise Server 2 (OES 2)
Novell Open Enterprise Server 11 (OES 11) LinuxSituation
When trying to mount NSS Pools/Volumes from the terminal command line via a script or from a cron job calling a script, the script will run, no error messages will be produced, and the NSS Pools/Volumes will not be mounted.
Resolution
Generally when mounting directly from the terminal the command to mount NSS devices will look like:
nss /poolactivate=<POOL_NAME>
nss /volumeactivate=<VOLUME_NAME>
The issue arises since the NSS command is symlinked to a perl script (nss.pl) which is located in '/opt/novell/nss/sbin/'
When using a bash script/cron job to mount and/or unmount NSS Pools/Volumes, it is therefor necessary to call the absolute path to the executable.
So, in this case this would look as:
/opt/novell/nss/sbin/nss.pl /poolactivate=<POOL_NAME>
/opt/novell/nss/sbin/nss.pl /volumeactivate=<VOLUME_NAME>
Cause
This is caused by the difference of running a command in a shell, and invoking a script. When running a command natively in a shell, it knows all of the path variables. When executing the same command via a script, the path variables are not always passed on, and therefore the script fails.
When running a command via a script, it is best practice to declare the absolute path to the executable, and is advisable to declare that actual executable in the script, and not a symlinked executable.