1#!/bin/sh 2# 3# 4 5# PROVIDE: rctl 6# REQUIRE: FILESYSTEMS 7# BEFORE: LOGIN 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 12name="rctl" 13desc="Manage resource limits" 14rcvar="rctl_enable" 15start_cmd="rctl_start" 16stop_cmd="rctl_stop" 17 18rctl_start() 19{ 20 if [ -f ${rctl_rules} ]; then 21 while read var comments 22 do 23 case ${var} in 24 \#*|'') 25 ;; 26 *) 27 echo "${var}" 28 ;; 29 esac 30 done < ${rctl_rules} | xargs rctl -a 31 fi 32} 33 34rctl_stop() 35{ 36 37 rctl -r : 38} 39 40load_rc_config $name 41 42# doesn't make sense to run in a svcj: config setting 43rctl_svcj="NO" 44 45run_rc_command "$1" 46