The rc.d script installed by the smartmontools port is still trying to use set_rcvar. The problem is that the copy of the script under the files directory has been updated, but the script that the port actually installs is work/smartd.freebsd.initd.in, which is an older version.