[Open-FCoE] [PATCH] [FCoE] Move fcmenu.sh into usr/ofc/scripts

Steve Ma steve.ma at intel.com
Fri Apr 18 04:47:01 UTC 2008


Signed-off-by: Steve Ma <steve.ma at intel.com>
---

 usr/Makefile                   |    1 
 usr/ofc/scripts/fcmenu.sh      |  477 ++++++++++++++++++++++++++++++++++++++++
 usr/ofc/tools/fcmenu/fcmenu.sh |  477 ----------------------------------------
 3 files changed, 477 insertions(+), 478 deletions(-)
 create mode 100755 usr/ofc/scripts/fcmenu.sh
 delete mode 100755 usr/ofc/tools/fcmenu/fcmenu.sh


diff --git a/usr/Makefile b/usr/Makefile
index fe6cfe3..5c6fb19 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -32,7 +32,6 @@ install:
 	mkdir -p /etc/sysconfig/openfc
 	/usr/bin/install $(SRC)/ofc/tools/fcconf/src/fcconf /usr/local/bin
 	/usr/bin/install $(SRC)/ofc/tools/fcping/src/fcping /usr/local/bin
-	/usr/bin/install $(SRC)/ofc/tools/fcmenu/fcmenu.sh /usr/local/bin/fcmenu
 	@( [ -f /etc/hba.conf ] && grep -v 'libhbaofc\.so' /etc/hba.conf; \
 		echo $(HBA_ID) $(LIB_PATH)/libhbaofc.so; \
 	) > hba.conf && \
diff --git a/usr/ofc/scripts/fcmenu.sh b/usr/ofc/scripts/fcmenu.sh
new file mode 100755
index 0000000..045841d
--- /dev/null
+++ b/usr/ofc/scripts/fcmenu.sh
@@ -0,0 +1,477 @@
+#!/bin/sh
+#
+# Copyright(c) 2007 Intel Corporation. All rights reserved.
+# 
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+# 
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+# 
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+# 
+# Maintained at www.Open-FCoE.org
+#
+# $Id: fcmenu.sh
+
+# script for OpenFC configuration in interactive mode
+
+# Appearance variables
+
+FCM_SEP=")"				# character after number in menus
+let FCM_INDENT=5			# chars per level of indentation
+
+# Line appearing before each menu
+#
+FCM_LINE="-------------------"		# 19 chars
+FCM_LINE=$FCM_LINE$FCM_LINE		# 38 chars
+FCM_LINE=$FCM_LINE$FCM_LINE--		# 78 chars
+
+FCCONF=
+for x in /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin
+do
+	if [ -x $x/fcconf ]
+	then
+		FCCONF=$x/fcconf
+		break
+	fi
+done
+
+if [ "$FCCONF" = "" ]
+then
+	echo "$0: fcconf command not installed" >&2
+	exit 1
+fi
+
+if [ $# != 0 ]
+then
+	echo "$0: usage: no arguments permitted" >&2
+	exit 1
+fi
+
+#
+# Functions
+#
+
+#
+# Test for an argument being "yes" or "y" or "true" ignoring case
+#
+test_yes() {
+	case "$1" in
+	[Yy][Ee][Ss] | [Yy] | [Tt][Rr][Uu][Ee])
+		true
+		;;
+	*)
+		false
+		;;
+	esac
+}
+
+#
+# fcm_read_value <prompt>
+#
+# Read value from the user. 
+#
+fcm_read_value() {
+	value=
+	prompt="value"
+	if [ $# -ge 1 ]
+	then
+		prompt="$1"
+		shift
+	fi
+	read -p "Enter $prompt:  " value
+}
+
+fcm_confirm() {
+	echo "Confirm command: $@"
+	while read -p "Are you sure?  " ans
+	do
+		if test_yes $ans
+		then
+			"$@"
+			break
+		else
+			echo "Not confirmed."
+			exit 1
+		fi
+	done
+}
+
+#
+# fcm_menu <prompt> <cmd> <args>...
+#
+# Show a menu of selections by number.
+#
+# Each line of stdin is a separate menu item.
+# The first token on each line is the key returned once the selection is made
+# Lines with a - as a first token are not given a menu selection number.
+#
+# The selection is waited for, giving the prompt if provided.
+# Once the selection is verified, the command is executed, passing the
+# selected token as the first argument, followed by the other args.
+#
+fcm_menu() {
+	declare -a menu_item
+	let level=0
+	blanks="                                                      "
+
+	#
+	# Form and print the menu
+	#
+	echo $FCM_LINE
+	let item=1
+	while read tag line
+	do
+		let next_level=$level
+		case "$tag" in 
+		- | "" )
+			label=""
+			;;
+		tag_section)			# start of subsection for menu
+			label=""
+			let next_level=$level+$FCM_INDENT
+			;;
+		tag_end)			# end of subsection (no text)
+			if [ "$level" -gt 0 ]
+			then
+				let level=$level-$FCM_INDENT
+			fi
+			continue
+			;;
+		tag_*)
+			label="${tag:4}$FCM_SEP"
+			;;
+		*)
+			label="$item$FCM_SEP"
+			menu_item[$item]="$tag"
+			let item=$item+1
+			;;
+		esac
+		printf "%3s  %s%s\n" "$label" "${blanks:1:$level}" "$line"
+		let level=$next_level
+	done
+	echo
+
+	#
+	# Allow the first parameter to select the prompt.
+	#
+	prompt="Select item"
+	if [ $# -gt 0 ]
+	then
+		prompt=$1
+		shift
+	fi
+
+	#
+	# Get user's selection.
+	#
+	while :
+	do 
+		read -p "$prompt:  " i <&2
+		if [ $? -ne 0 ]
+		then
+			echo
+			exit
+		fi
+		case "$i" in
+		[1-9] | [1-9][0-9])		# any menu item up to 99
+			if [ "$i" -lt "$item" -a "$i" -ne 0 ]
+			then
+				selection=${menu_item[$i]}
+				break
+			else
+				let max=$item-1
+				echo "$i out of range.  Select 1-$max."
+			fi
+			;;
+
+		[qQ] | [qQ][uU][iI][tT])
+			exit
+			;;
+		*)
+			echo "invalid selection" >&2
+			;;
+		esac
+	done
+	echo
+
+	#
+	# Handle command, if present, using selected parameter
+	# Otherwise, the calling script uses $selection.
+	#
+	if [ $# != 0 ]
+	then
+		cmd=$1
+		shift
+		"$cmd" $selection "$@" <&2
+	fi
+}
+
+fcm_hba_select() {
+	#
+	# Form the menu by editing the 'fcconf list' output to duplicate the
+	# hba name on every line.  Then change the headers first word to "-"
+	# After that, append the "quit" menu item.
+	# 
+	(
+		echo "- HBA Selection Menu"
+		echo
+		$FCCONF list |
+			sed -e 's/^\([a-zA-Z0-9:-]*\) /\1 \1 /' \
+				-e 's/^Name /- /'
+		echo tag_q "Return to previous menu"
+	) | fcm_menu "Select HBA" "$@"
+}
+
+fcm_hba_cmds() {
+	if [ $# -lt 1 ]
+	then
+		echo "$0: HBA selection required" >&2
+		exit
+	fi
+	hba=$1
+	while :
+	do
+		fcm_menu <<-END-MENU
+			- 		HBA Commands Menu
+
+			tag_section	HBA Information
+			info		Display Information
+			settings	Display Settings
+			set		Configure Settings
+			tag_end
+
+			tag_section	Display Discovered Device Information
+			tag_section	Remote ports
+			remote		Summary
+			remote_detail	Detail
+			remote_rnid	Details with node ID
+			tag_end
+			tag_section	Target ports only
+			target		Summary
+			target_detail	Details
+			target_rnid	Details withnNode ID 
+			tag_end
+			tag_end
+
+			tag_section	Display LUN mappings
+			lun		Summary
+			lun_detail	Detail
+			tag_end
+
+			tag_q		Return to main menu
+		END-MENU
+		cmd=$selection
+		case "$cmd" in
+		info | lun | remote | settings | target)
+			$FCCONF $hba $cmd
+			;;
+		lun_detail)
+			$FCCONF $hba lun detail
+			;;
+		remote_detail)
+			$FCCONF $hba remote detail
+			;;
+		remote_rnid)
+			$FCCONF $hba remote rnid
+			;;
+		target_detail)
+			$FCCONF $hba target detail
+			;;
+		target_rnid)
+			$FCCONF $hba target rnid
+			;;
+		set)
+			fcm_hba_set $hba $cmd
+			;;
+		*)
+			echo "option $cmd not implemented yet" >&2
+			;;
+		esac
+	done
+}
+
+#
+# FDMI settings
+#
+fcm_fdmi_menu() {
+	if [ $# -lt 1 ]
+	then
+		echo "$0: HBA selection required" >&2
+		exit
+	fi
+	hba=$1
+	while :
+	do
+		fcm_menu <<-END-MENU
+			-	HBA FC Device Management Interface (FDMI) Menu
+
+			register	Register HBA with FDMI
+			deregister	Deregister HBA with FDMI
+
+			vendor_id	Vendor ID field
+			phys_port	Physical Port Number
+			mgmt_unit_type	Unit Type (Host)
+
+			mgmt_ip_ver	IP Version for Management
+			mgmt_ip_addr	IP Address for Management
+			mgmt_protocol	Managment protocol (SNMP, Telnet, etc.)
+			mgmt_port	TCP or UDP port
+
+			tag_q		Return to previous menu
+		END-MENU
+		cmd=$selection
+
+		case "$cmd" in
+
+		register | deregister)
+			value=""
+			;;
+		mgmt_ip_ver)
+			fcm_menu <<-END-MENU
+				ipv4		IP
+				ipv6		IPv6
+				tag_q		Return to previous menu
+			END-MENU
+			value=$selection
+			;;
+
+		mgmt_protocol)
+			fcm_menu <<-END-MENU
+				snmp		SNMP
+				telnet		Telnet
+				HTTP		HTTP - Web Server
+				https		HTTPS - Web Server with SSL
+				XML		HTTP/XML - CIM
+				tag_q		Return to previous menu
+			END-MENU
+			value=$selection
+			;;
+
+		mgmt_unit_type)
+			fcm_menu <<-END-MENU
+				-	HBA FDMI Unit Types
+				unknown		Unknown
+				other		Other
+				hub		Hub
+				switch		Switch
+				gateway		Gateway
+				Storage		Storage
+				Host		Host
+				Subsystem	Subsystem
+				Access		Access
+				NAS		NAS - Network Attached Storage
+				Bridge		Bridge
+				virtualization	Virtualization
+				tag_q		Return to previous menu
+			END-MENU
+			value=$selection
+			;;
+		*)
+			fcm_read_value
+			;;
+		esac
+		$FCCONF $hba $cmd $value
+	done
+}
+
+#
+# Set command - set parameters for an HBA
+#
+fcm_hba_set() {
+	if [ $# -lt 1 ]
+	then
+		echo "$0: HBA selection required" >&2
+		exit
+	fi
+	hba=$1
+	while :
+	do
+		fcm_menu <<-END-MENU
+			- 	HBA Settings Menu
+
+			enable	Enable HBA
+			disable	Disable HBA
+			reset	Reset HBA
+
+			frame	Set maximum frame size
+			fdmi	FDMI / RNID settings
+			save	Save settings for use after system reboot
+
+			settings Show current settings
+			tag_q	Return to previous menu
+		END-MENU
+		cmd=$selection
+
+		case "$cmd" in
+		deregister | enable | register | save | settings )
+			$FCCONF $hba $cmd
+			;;
+		disable | reset )
+			fcm_confirm $FCCONF $hba $cmd
+			;;
+
+		fdmi)
+			fcm_fdmi_menu $hba
+			;;
+		frame)
+			fcm_read_value "Maximum Frame Size"
+			$FCCONF $hba $cmd $value
+			;;
+		*)
+			echo "option $cmd not implemented yet" >&2
+			;;
+		esac
+	done
+}
+
+fcm_top_menu() {
+	fcm_menu <<-END-MENU
+		-		fcconf Main Menu
+
+		tag_section	HBA Information
+		info		Display Information (all HBAs)
+		settings	Display Settings (all HBAs)
+		hba		Select HBA for further commands
+		tag_end
+
+		tag_section	Discovered Device Information (all HBAs)
+		remote		Display Remote Ports
+		target		Display Targets
+		lun		Display LUNs
+		tag_end
+
+		tag_section	System Information
+		system		Display System Information
+		version		Display HBA-API version 
+		tag_end
+
+		tag_q		Quit
+	END-MENU
+	cmd=$selection
+	case "$cmd" in
+	system | version)
+		$FCCONF $cmd
+		;;
+	settings | info | remote | target | lun)
+		$FCCONF $cmd
+		;;
+	hba)
+		fcm_hba_select fcm_hba_cmds
+		;;
+	*)
+		echo "option $cmd not implemented yet" >&2
+		;;
+	esac
+}
+
+while :
+do
+	fcm_top_menu
+done
diff --git a/usr/ofc/tools/fcmenu/fcmenu.sh b/usr/ofc/tools/fcmenu/fcmenu.sh
deleted file mode 100755
index 045841d..0000000
--- a/usr/ofc/tools/fcmenu/fcmenu.sh
+++ /dev/null
@@ -1,477 +0,0 @@
-#!/bin/sh
-#
-# Copyright(c) 2007 Intel Corporation. All rights reserved.
-# 
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-# 
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-# more details.
-# 
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-# 
-# Maintained at www.Open-FCoE.org
-#
-# $Id: fcmenu.sh
-
-# script for OpenFC configuration in interactive mode
-
-# Appearance variables
-
-FCM_SEP=")"				# character after number in menus
-let FCM_INDENT=5			# chars per level of indentation
-
-# Line appearing before each menu
-#
-FCM_LINE="-------------------"		# 19 chars
-FCM_LINE=$FCM_LINE$FCM_LINE		# 38 chars
-FCM_LINE=$FCM_LINE$FCM_LINE--		# 78 chars
-
-FCCONF=
-for x in /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin
-do
-	if [ -x $x/fcconf ]
-	then
-		FCCONF=$x/fcconf
-		break
-	fi
-done
-
-if [ "$FCCONF" = "" ]
-then
-	echo "$0: fcconf command not installed" >&2
-	exit 1
-fi
-
-if [ $# != 0 ]
-then
-	echo "$0: usage: no arguments permitted" >&2
-	exit 1
-fi
-
-#
-# Functions
-#
-
-#
-# Test for an argument being "yes" or "y" or "true" ignoring case
-#
-test_yes() {
-	case "$1" in
-	[Yy][Ee][Ss] | [Yy] | [Tt][Rr][Uu][Ee])
-		true
-		;;
-	*)
-		false
-		;;
-	esac
-}
-
-#
-# fcm_read_value <prompt>
-#
-# Read value from the user. 
-#
-fcm_read_value() {
-	value=
-	prompt="value"
-	if [ $# -ge 1 ]
-	then
-		prompt="$1"
-		shift
-	fi
-	read -p "Enter $prompt:  " value
-}
-
-fcm_confirm() {
-	echo "Confirm command: $@"
-	while read -p "Are you sure?  " ans
-	do
-		if test_yes $ans
-		then
-			"$@"
-			break
-		else
-			echo "Not confirmed."
-			exit 1
-		fi
-	done
-}
-
-#
-# fcm_menu <prompt> <cmd> <args>...
-#
-# Show a menu of selections by number.
-#
-# Each line of stdin is a separate menu item.
-# The first token on each line is the key returned once the selection is made
-# Lines with a - as a first token are not given a menu selection number.
-#
-# The selection is waited for, giving the prompt if provided.
-# Once the selection is verified, the command is executed, passing the
-# selected token as the first argument, followed by the other args.
-#
-fcm_menu() {
-	declare -a menu_item
-	let level=0
-	blanks="                                                      "
-
-	#
-	# Form and print the menu
-	#
-	echo $FCM_LINE
-	let item=1
-	while read tag line
-	do
-		let next_level=$level
-		case "$tag" in 
-		- | "" )
-			label=""
-			;;
-		tag_section)			# start of subsection for menu
-			label=""
-			let next_level=$level+$FCM_INDENT
-			;;
-		tag_end)			# end of subsection (no text)
-			if [ "$level" -gt 0 ]
-			then
-				let level=$level-$FCM_INDENT
-			fi
-			continue
-			;;
-		tag_*)
-			label="${tag:4}$FCM_SEP"
-			;;
-		*)
-			label="$item$FCM_SEP"
-			menu_item[$item]="$tag"
-			let item=$item+1
-			;;
-		esac
-		printf "%3s  %s%s\n" "$label" "${blanks:1:$level}" "$line"
-		let level=$next_level
-	done
-	echo
-
-	#
-	# Allow the first parameter to select the prompt.
-	#
-	prompt="Select item"
-	if [ $# -gt 0 ]
-	then
-		prompt=$1
-		shift
-	fi
-
-	#
-	# Get user's selection.
-	#
-	while :
-	do 
-		read -p "$prompt:  " i <&2
-		if [ $? -ne 0 ]
-		then
-			echo
-			exit
-		fi
-		case "$i" in
-		[1-9] | [1-9][0-9])		# any menu item up to 99
-			if [ "$i" -lt "$item" -a "$i" -ne 0 ]
-			then
-				selection=${menu_item[$i]}
-				break
-			else
-				let max=$item-1
-				echo "$i out of range.  Select 1-$max."
-			fi
-			;;
-
-		[qQ] | [qQ][uU][iI][tT])
-			exit
-			;;
-		*)
-			echo "invalid selection" >&2
-			;;
-		esac
-	done
-	echo
-
-	#
-	# Handle command, if present, using selected parameter
-	# Otherwise, the calling script uses $selection.
-	#
-	if [ $# != 0 ]
-	then
-		cmd=$1
-		shift
-		"$cmd" $selection "$@" <&2
-	fi
-}
-
-fcm_hba_select() {
-	#
-	# Form the menu by editing the 'fcconf list' output to duplicate the
-	# hba name on every line.  Then change the headers first word to "-"
-	# After that, append the "quit" menu item.
-	# 
-	(
-		echo "- HBA Selection Menu"
-		echo
-		$FCCONF list |
-			sed -e 's/^\([a-zA-Z0-9:-]*\) /\1 \1 /' \
-				-e 's/^Name /- /'
-		echo tag_q "Return to previous menu"
-	) | fcm_menu "Select HBA" "$@"
-}
-
-fcm_hba_cmds() {
-	if [ $# -lt 1 ]
-	then
-		echo "$0: HBA selection required" >&2
-		exit
-	fi
-	hba=$1
-	while :
-	do
-		fcm_menu <<-END-MENU
-			- 		HBA Commands Menu
-
-			tag_section	HBA Information
-			info		Display Information
-			settings	Display Settings
-			set		Configure Settings
-			tag_end
-
-			tag_section	Display Discovered Device Information
-			tag_section	Remote ports
-			remote		Summary
-			remote_detail	Detail
-			remote_rnid	Details with node ID
-			tag_end
-			tag_section	Target ports only
-			target		Summary
-			target_detail	Details
-			target_rnid	Details withnNode ID 
-			tag_end
-			tag_end
-
-			tag_section	Display LUN mappings
-			lun		Summary
-			lun_detail	Detail
-			tag_end
-
-			tag_q		Return to main menu
-		END-MENU
-		cmd=$selection
-		case "$cmd" in
-		info | lun | remote | settings | target)
-			$FCCONF $hba $cmd
-			;;
-		lun_detail)
-			$FCCONF $hba lun detail
-			;;
-		remote_detail)
-			$FCCONF $hba remote detail
-			;;
-		remote_rnid)
-			$FCCONF $hba remote rnid
-			;;
-		target_detail)
-			$FCCONF $hba target detail
-			;;
-		target_rnid)
-			$FCCONF $hba target rnid
-			;;
-		set)
-			fcm_hba_set $hba $cmd
-			;;
-		*)
-			echo "option $cmd not implemented yet" >&2
-			;;
-		esac
-	done
-}
-
-#
-# FDMI settings
-#
-fcm_fdmi_menu() {
-	if [ $# -lt 1 ]
-	then
-		echo "$0: HBA selection required" >&2
-		exit
-	fi
-	hba=$1
-	while :
-	do
-		fcm_menu <<-END-MENU
-			-	HBA FC Device Management Interface (FDMI) Menu
-
-			register	Register HBA with FDMI
-			deregister	Deregister HBA with FDMI
-
-			vendor_id	Vendor ID field
-			phys_port	Physical Port Number
-			mgmt_unit_type	Unit Type (Host)
-
-			mgmt_ip_ver	IP Version for Management
-			mgmt_ip_addr	IP Address for Management
-			mgmt_protocol	Managment protocol (SNMP, Telnet, etc.)
-			mgmt_port	TCP or UDP port
-
-			tag_q		Return to previous menu
-		END-MENU
-		cmd=$selection
-
-		case "$cmd" in
-
-		register | deregister)
-			value=""
-			;;
-		mgmt_ip_ver)
-			fcm_menu <<-END-MENU
-				ipv4		IP
-				ipv6		IPv6
-				tag_q		Return to previous menu
-			END-MENU
-			value=$selection
-			;;
-
-		mgmt_protocol)
-			fcm_menu <<-END-MENU
-				snmp		SNMP
-				telnet		Telnet
-				HTTP		HTTP - Web Server
-				https		HTTPS - Web Server with SSL
-				XML		HTTP/XML - CIM
-				tag_q		Return to previous menu
-			END-MENU
-			value=$selection
-			;;
-
-		mgmt_unit_type)
-			fcm_menu <<-END-MENU
-				-	HBA FDMI Unit Types
-				unknown		Unknown
-				other		Other
-				hub		Hub
-				switch		Switch
-				gateway		Gateway
-				Storage		Storage
-				Host		Host
-				Subsystem	Subsystem
-				Access		Access
-				NAS		NAS - Network Attached Storage
-				Bridge		Bridge
-				virtualization	Virtualization
-				tag_q		Return to previous menu
-			END-MENU
-			value=$selection
-			;;
-		*)
-			fcm_read_value
-			;;
-		esac
-		$FCCONF $hba $cmd $value
-	done
-}
-
-#
-# Set command - set parameters for an HBA
-#
-fcm_hba_set() {
-	if [ $# -lt 1 ]
-	then
-		echo "$0: HBA selection required" >&2
-		exit
-	fi
-	hba=$1
-	while :
-	do
-		fcm_menu <<-END-MENU
-			- 	HBA Settings Menu
-
-			enable	Enable HBA
-			disable	Disable HBA
-			reset	Reset HBA
-
-			frame	Set maximum frame size
-			fdmi	FDMI / RNID settings
-			save	Save settings for use after system reboot
-
-			settings Show current settings
-			tag_q	Return to previous menu
-		END-MENU
-		cmd=$selection
-
-		case "$cmd" in
-		deregister | enable | register | save | settings )
-			$FCCONF $hba $cmd
-			;;
-		disable | reset )
-			fcm_confirm $FCCONF $hba $cmd
-			;;
-
-		fdmi)
-			fcm_fdmi_menu $hba
-			;;
-		frame)
-			fcm_read_value "Maximum Frame Size"
-			$FCCONF $hba $cmd $value
-			;;
-		*)
-			echo "option $cmd not implemented yet" >&2
-			;;
-		esac
-	done
-}
-
-fcm_top_menu() {
-	fcm_menu <<-END-MENU
-		-		fcconf Main Menu
-
-		tag_section	HBA Information
-		info		Display Information (all HBAs)
-		settings	Display Settings (all HBAs)
-		hba		Select HBA for further commands
-		tag_end
-
-		tag_section	Discovered Device Information (all HBAs)
-		remote		Display Remote Ports
-		target		Display Targets
-		lun		Display LUNs
-		tag_end
-
-		tag_section	System Information
-		system		Display System Information
-		version		Display HBA-API version 
-		tag_end
-
-		tag_q		Quit
-	END-MENU
-	cmd=$selection
-	case "$cmd" in
-	system | version)
-		$FCCONF $cmd
-		;;
-	settings | info | remote | target | lun)
-		$FCCONF $cmd
-		;;
-	hba)
-		fcm_hba_select fcm_hba_cmds
-		;;
-	*)
-		echo "option $cmd not implemented yet" >&2
-		;;
-	esac
-}
-
-while :
-do
-	fcm_top_menu
-done




More information about the devel mailing list