#!/bin/sh

# Copyright C 2001-2005 by Isilon Systems, Inc. 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,
# Inc.
# 
# 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,
# Inc.  Legion is a trademark of Isilon Systems, Inc.  All other
# trademarks and registered trademarks are the property of their
# respective holders.

### Isilon configure dons
#
# This script configures disk only nodes (DONS).
# In the future, this functionality should be automatically handled
# by MCP but for now we do it this way.

# REQUIRE: isi_bootdisk_init isi_create_hardware_xml
# PROVIDE: isi_configure_dons

# Adding a DON requires a writable root file system
# We must add a DON before first-time newfs_efs and before isi_drive_d starts up.

. /etc/rc.subr

name="isi_configure_dons"

load_rc_config $name

# Only configure DONs if we not in manufacturing mode - Bugzilla #44591
# NOTE: Use the special "isi_checkyesno" version of the "checkyesno" 
#	function to prevent warning messages when the "manufacturing"
#	variable does not exist. (See Bugzilla #44848)
if ! isi_checkyesno manufacturing; then
	/usr/bin/isi_don_tool --configure
else
	echo 'Skipping storage expansion node configuration for Manufacturing.'
fi
