#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/devd,v 1.7.2.1 2005/12/16 01:42:54 dougb Exp $
# $MidnightBSD: src/etc/rc.d/devd,v 1.2 2006/08/28 02:47:45 laffer1 Exp $

# PROVIDE: devd
# REQUIRE: NETWORKING
# BEFORE: mountcritremote
# KEYWORD: nojail

. /etc/rc.subr

name="devd"
rcvar=`set_rcvar`
command="/sbin/${name}"

load_rc_config $name
run_rc_command "$1"

# If devd is disabled, turn it off in the kernel to avoid memory leaks.
if ! checkyesno ${rcvar}; then
    sysctl hw.bus.devctl_disable=1
fi
