1#!/bin/sh 2# 3# $FreeBSD$ 4# 5 6# PROVIDE: iocell 7# REQUIRE: LOGIN cleanvar sshd ZFS 8# BEFORE: securelevel 9# KEYWORD: shutdown 10 11# Add the following lines to /etc/rc.conf to enable iocell: 12# 13# iocell_enable="YES" 14# 15# 16 17. /etc/rc.subr 18 19name="iocell" 20rcvar=iocell_enable 21 22# read configuration and set defaults 23load_rc_config "$name" 24: ${iocell_enable="NO"} 25 26start_cmd="iocell_start" 27stop_cmd="iocell_stop" 28 29iocell_start() 30{ 31 if checkyesno ${rcvar}; then 32 /usr/local/sbin/iocell rcboot 33 fi 34} 35 36iocell_stop() 37{ 38 if checkyesno ${rcvar}; then 39 /usr/local/sbin/iocell rcshutdown 40 fi 41} 42 43run_rc_command "$1" 44