#!/bin/ksh # # This file and its contents are supplied under the terms of the # Common Development and Distribution License ("CDDL"), version 1.0. # You may only use this file in accordance with the terms of version # 1.0 of the CDDL. # # A full copy of the text of the CDDL should have accompanied this # source. A copy of the CDDL is also available via the Internet at # http://www.illumos.org/license/CDDL. # # # Copyright (c) 2013, Joyent, Inc. All rights reserved. # function do_node { cat < EOF } cat < EOF enclosure=1 bay=0 slot=0 devctl0='/devices/pci@0,0/pci8086,3c02@1/pci15d9,691@0:devctl' devctl1='/devices/pci@0,0/pci8086,e02@1/pci15d9,691@0:devctl' while (( slot <= 7 )); do do_node $bay "Front Disk $bay" "$devctl0|$devctl1" $enclosure $slot (( bay = bay + 1 )) (( slot = slot + 1 )) done slot=0 devctl0='/devices/pci@0,0/pci8086,3c06@2,2/pci15d9,691@0:devctl' devctl1='/devices/pci@0,0/pci8086,e06@2,2/pci15d9,691@0:devctl' while (( slot <= 7 )); do do_node $bay "Front Disk $bay" "$devctl0|$devctl1" $enclosure $slot (( bay = bay + 1 )) (( slot = slot + 1 )) done cat < EOF