#!/bin/sh

# Copyright C 2002-2011 by Isilon Systems, LLC. All rights not expressly
# granted herein are reserved.
# Created in the United States of America.
# 
# This digital media is protected by U.S. and international copyright and
# intellectual property laws. Unless otherwise specified, all information
# and screens appearing as part of this digital medium, including
# software, services, documents, text, images, icons, and logos design;
# the selection, assembly, arrangement, and design thereof; and the code
# that enables its presentation, are the sole property of Isilon Systems,
# LLC.
# 
# Except as otherwise required by applicable law, no part of any
# copyrighted material may be reproduced, modified, translated,
# distributed, published, or transmitted by any means, electronic or
# mechanical, for any purpose, without the prior written consent of Isilon
# Systems. 
#  
# Isilon and Isilon Systems are registered trademarks of Isilon Systems,
# LLC.  Legion is a trademark of Isilon Systems, LLC.  All other
# trademarks and registered trademarks are the property of their
# respective holders.

# The script formerly know as isi_initial. All non-network hardware code has
#moved out of here, and this should now be the truly first script to run from 
#rc.d.  Sets up loopback ethernet and fills in version information
#

# PROVIDE: isi_init_config

. /etc/rc.subr

name="isi_init_config"
start_cmd="isi_init_config_start"

isi_init_config_start()
{

	#Enable to loopback adapter, other startup scripts may need it
	/sbin/ifconfig lo0 127.0.0.1 netmask 255.0.0.0 up

	#Set up the data structure that contains our version info 
	/usr/sbin/isi_kversion_config &

	# Start logging SCSI data protection errors with sense data
	# indicating access denied/no access rights.  We quiet them
	# during kernel boot in order to avoid GEOM tasting logging
	# lots of READ errors on locked self-encrypting drives.
	# Always hiding the errors might hide bugs, so start logging
	# them once userspace starts running.
	sysctl kern.cam.log_access_denied_no_rights=1
}

load_rc_config $name
run_rc_command "$1"
