#!/bin/sh

# PROVIDE: rootlibs
# REQUIRE: ldconfig
# KEYWORD: Root

. /etc/rc.subr

name=rootlibs

start_cmd=rootlibs_start
stop_cmd=:

root_libdir="/usr/local/lib/root"
cint_libdir="/usr/local/lib/root/cint"

rootlibs_start()
{
   if [ -d "$root_libdir" ]; then
      /sbin/ldconfig -m "$root_libdir"
   fi
   if [ -d "$root_libdir" ]; then
      /sbin/ldconfig -m "$cint_libdir"
   fi
}

load_rc_config $name
run_rc_command "$1"
