Wanted to add rar to my FreeNAS installation (not in a jail), so did the following:
Why does is only work using the complete path to rar?
	
		
			
		
		
	
			
			Code:
[root@storage] ~# mount -urw /
[root@storage] ~# pkg_add -v -r rar
scheme:   [ftp]
user:     []
password: []
host:     [ftp.freebsd.org]
port:     [0]
document: [/pub/FreeBSD/ports/amd64/packages-8.3-release/Latest/rar.tbz]
---> ftp.freebsd.org:21
looking up ftp.freebsd.org
connecting to ftp.freebsd.org:21
<<< 220 beastie.tdk.net FTP server (Version 6.00LS) ready.
>>> USER anonymous
<<< 331 Guest login ok, send your email address as password.
>>> PASS root@storage.local
<<< 230 Guest login ok, access restrictions apply.
>>> PWD
<<< 257 "/" is current directory.
>>> CWD pub/FreeBSD/ports/amd64/packages-8.3-release/Latest
<<< 250 CWD command successful.
>>> MODE S
<<< 200 MODE S accepted.
>>> TYPE I
<<< 200 Type set to I.
setting passive mode
>>> PASV
<<< 227 Entering Passive Mode (193,162,146,4,220,231)
opening data connection
initiating transfer
>>> RETR rar.tbz
<<< 150 Opening BINARY mode data connection for 'rar.tbz' (557764 bytes).
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.3-release/Latest/rar.tbz...x +CONTENTS
x +COMMENT
x +DESC
x +MTREE_DIRS
x bin/rarWaiting for final status
<<< 226 Transfer complete.
x lib/default.sfx
x etc/rarfiles.lst
x man/cat1/rar.1
x share/licenses/rar-4.1.1,3/catalog.mk
x share/licenses/rar-4.1.1,3/LICENSE
x share/licenses/rar-4.1.1,3/RAR
x share/doc/rar/technote.txt
x share/doc/rar/license.txt
x share/doc/rar/whatsnew.txt
x share/doc/rar/order.htm
x share/doc/rar/readme.txt
tar command returns 0 status
 Done.
extract: Package name is rar-4.1.1,3
extract: CWD to /usr/local
extract: /usr/local/bin/rar
extract: /usr/local/lib/default.sfx
extract: /usr/local/etc/rarfiles.lst
extract: /usr/local/man/cat1/rar.1
extract: /usr/local/share/licenses/rar-4.1.1,3/catalog.mk
extract: /usr/local/share/licenses/rar-4.1.1,3/LICENSE
extract: /usr/local/share/licenses/rar-4.1.1,3/RAR
extract: CWD to /usr/local
extract: CWD to /usr/local
extract: /usr/local/share/doc/rar/technote.txt
extract: /usr/local/share/doc/rar/license.txt
extract: /usr/local/share/doc/rar/whatsnew.txt
extract: /usr/local/share/doc/rar/order.htm
extract: /usr/local/share/doc/rar/readme.txt
Running mtree for rar-4.1.1,3..
mtree -U -f +MTREE_DIRS -d -e -p /usr/local >/dev/null
Attempting to record package into /var/db/pkg/rar-4.1.1,3..
Package rar-4.1.1,3 registered in /var/db/pkg/rar-4.1.1,3
[root@storage] ~# rar
CORRECT>tar (y|n|e|a)? no
rar: Command not found.
[root@storage] ~# which rar
rar: Command not found.
[root@freenas] ~# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/usr/local/fusion-io
[root@freenas] ~# /usr/local/bin/rar 
RAR 4.11   Copyright (c) 1993-2012 Alexander Roshal   17 Feb 2012
Shareware version         Type RAR -? for help
Usage:     rar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract\>
<Commands>
  a             Add files to archive
  c             Add archive comment
...Why does is only work using the complete path to rar?