1#!/sbin/sh -p 2# 3# CDDL HEADER START 4# 5# The contents of this file are subject to the terms of the 6# Common Development and Distribution License (the "License"). 7# You may not use this file except in compliance with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 24# 25# 26PATH=/usr/bin:/usr/sbin:$PATH; export PATH 27STMSBOOTUTIL=/lib/mpxio/stmsboot_util 28STMSMETHODSCRIPT=/lib/svc/method/mpxio-upgrade 29KDRVCONF= 30DRVCONF= 31TMPDRVCONF= 32TMPDRVCONF_MPXIO_ENTRY= 33TMPDRVCONF_SATA_ENTRY= 34DRVLIST= 35GUID= 36VFSTAB=/etc/vfstab 37SAVEDIR=/etc/mpxio 38BOOTDEVICES=$SAVEDIR/boot-devices 39RECOVERFILE=$SAVEDIR/recover_instructions 40SVCCFG_RECOVERY=$SAVEDIR/svccfg_recover 41SUPPORTED_DRIVERS="fp|mpt|mpt_sas|pmcs" 42USAGE=`gettext "Usage: stmsboot [-D $SUPPORTED_DRIVERS] -e | -d | -u | -L | -l controller_number"` 43TEXTDOMAIN=SUNW_OST_OSCMD 44export TEXTDOMAIN 45STMSINSTANCE=svc:system/device/mpxio-upgrade:default 46STMSBOOT=/usr/sbin/stmsboot 47BOOTADM=/sbin/bootadm 48MOUNT=/usr/sbin/mount 49EEPROM=/usr/sbin/eeprom 50EGREP=/usr/bin/egrep 51GREP=/usr/bin/grep 52AWK=/usr/bin/awk 53CP=/usr/bin/cp 54DF=/usr/bin/df 55LS=/usr/bin/ls 56MV=/usr/bin/mv 57RM=/usr/bin/rm 58SORT=/usr/bin/sort 59UNIQ=/usr/bin/uniq 60EXPR=/usr/bin/expr 61MKDIR=/usr/bin/mkdir 62REBOOT=/usr/sbin/reboot 63SED=/usr/bin/sed 64SVCPROP=/usr/bin/svcprop 65SVCCFG=/usr/sbin/svccfg 66SVCS=/usr/bin/svcs 67SVCADM=/usr/sbin/svcadm 68 69NOW=`/usr/bin/date +%G%m%d_%H%M` 70MACH=`/usr/bin/uname -p` 71BOOTENV_FILE=bootenv.rc 72reboot_needed=0 73new_bootpath="" 74CLIENT_TYPE_PHCI="" 75CLIENT_TYPE_VHCI="/scsi_vhci" 76 77# 78# Copy all entries (including comments) from source driver.conf 79# to destination driver.conf except those entries which contain 80# the mpxio-disable property. 81# Take into consideration entries that spawn more than one line. 82# 83# $1 source driver.conf file 84# $2 destination driver.conf file 85# 86# Returns 0 on success, non zero on failure. 87# 88delete_mpxio_disable_entries() 89{ 90 # be careful here, we've got embedded \t characters 91 # in sed's pattern space. 92 $SED ' 93 /^[ ]*#/{ p 94 d 95 } 96 s/[ ]*$// 97 /^$/{ p 98 d 99 } 100 /mpxio-disable[ ]*=.*;$/{ w '$3' 101 d 102 } 103 /disable-sata-mpxio[ ]*=.*;$/{ w '$4' 104 d 105 } 106 /;$/{ p 107 d 108 } 109 :rdnext 110 N 111 s/[ ]*$// 112 /[^;]$/b rdnext 113 /mpxio-disable[ ]*=/{ s/\n/ /g 114 w '$3' 115 d 116 } 117 ' $1 > $2 118 119 return $? 120} 121 122# 123# backup the last saved copy of the specified files. 124# $* files to backup 125# 126backup_lastsaved() 127{ 128 for file in $* 129 do 130 newfile=`basename $file` 131 $CP $file $SAVEDIR/$newfile.$cmd.$NOW 132 done 133} 134 135# 136# build recover instructions 137# 138# $1 1 to include boot script in the instructions 139# 0 otherwise 140# 141build_recover() 142{ 143 gettext "Instructions to recover your previous STMS configuration (if in case the system does not boot):\n\n" > $RECOVERFILE 144 echo "\tboot net \c" >> $RECOVERFILE 145 gettext "(or from a cd/dvd/another disk)\n" >> $RECOVERFILE 146 echo "\tfsck <your-root-device>" >> $RECOVERFILE 147 echo "\tmount <your-root-device> /mnt" >> $RECOVERFILE 148 149 if [ "$cmd" = "update" ]; then 150 gettext "\tUndo the modifications you made to STMS configuration.\n\tFor example undo any changes you made to " >> $RECOVERFILE 151 echo "/mnt$KDRVCONF." >> $RECOVERFILE 152 else 153 echo "\tcp /mnt${SAVEDIR}/$DRVCONF.$cmd.$NOW /mnt$KDRVCONF" >> $RECOVERFILE 154 fi 155 156 if [ $1 -eq 1 ]; then 157 echo "\tcp /mnt${SAVEDIR}/vfstab.$cmd.$NOW /mnt$VFSTAB" >> $RECOVERFILE 158 159 echo "repository /mnt/etc/svc/repository.db" > $SVCCFG_RECOVERY 160 echo "select $STMSINSTANCE" >> $SVCCFG_RECOVERY 161 echo "setprop general/enabled=false" >> $SVCCFG_RECOVERY 162 echo "exit" >> $SVCCFG_RECOVERY 163 164 echo "\t$SVCCFG -f /mnt$SVCCFG_RECOVERY" >> $RECOVERFILE 165 166 if [ -n "$new_bootpath" -a "$MACH" = "i386" ]; then 167 echo "\tcp /mnt${SAVEDIR}/bootenv.rc.$cmd.$NOW /mnt/boot/solaris/$BOOTENV_FILE" >> $RECOVERFILE 168 fi 169 fi 170 171 rootdisk=`$MOUNT | $GREP "/ on " | cut -f 3 -d " "` 172 echo "\tumount /mnt\n\treboot\n\n${rootdisk} \c" >> $RECOVERFILE 173 gettext "was your root device,\nbut it could be named differently after you boot net.\n" >> $RECOVERFILE 174} 175 176 177# 178# Arrange for /etc/vfstab and dump configuration to be updated 179# during the next reboot. If the cmd is "enable" or "disable", copy 180# $TMPDRVCONF to $KDRVCONF. 181# 182# Returns 0 on success, 1 on failure. 183# 184update_sysfiles() 185{ 186 187 gettext "WARNING: This operation will require a reboot.\n" 188 gettext "Do you want to continue ? [y/n] (default: y) " 189 read response 190 191 if [ -n "$response" -a "$response" != "y" -a \ 192 "$response" != "Y" ]; then 193 for d in $DRVLIST; do 194 TMPDRVCONF=/var/run/tmp.$d.conf.$$ 195 $RM -f $TMPDRVCONF > /dev/null 2>&1 196 done; 197 return 0; 198 fi 199 200 # set need_bootscript to the number of drivers that 201 # we support. 202 need_bootscript=`echo $SUPPORTED_DRIVERS|$AWK -F"|" '{print NF}'` 203 204 if [ "$cmd" = "enable" -o "$cmd" = "disable" ]; then 205 206 for d in $DRVLIST; do 207 DRVCONF=$d.conf 208 KDRVCONF=/kernel/drv/$d.conf 209 TMPDRVCONF=/var/run/tmp.$d.conf.$$ 210 211 $CP $KDRVCONF $SAVEDIR/`basename $KDRVCONF`.$cmd.$NOW 212 if [ -f $TMPDRVCONF ]; then 213 $CP $TMPDRVCONF $KDRVCONF 214 $RM -f $TMPDRVCONF 215 else 216 # if $TMPDRVCONF doesn't exist, then we 217 # haven't made any changes to it 218 continue; 219 fi 220 221 # 222 # there is no need to update the system files in the following 223 # cases: 224 # - we are enabling mpxio and the system has no configured 225 # disks accessible by phci paths. 226 # - we are disabling mpxio and the system has no configured 227 # disks accessible by vhci paths. 228 # 229 230 # Function to setup the CLIENT_TYPE_PHCI string based on 231 # the list of drivers that we're operating on. The variable 232 # depends upon the pathname of the parent node in the 233 # device tree, which can be different on x86/x64 and sparc. 234 235 CLIENT_TYPE_PHCI=`$STMSBOOTUTIL -D $d -N`; 236 237 if [ -z "$CLIENT_TYPE_PHCI" ]; then 238 continue; 239 fi 240 241 if [ "$cmd" = "enable" ]; then 242 $LS -l /dev/dsk/*s2 2> /dev/null | \ 243 $EGREP -s "$CLIENT_TYPE_PHCI" 244 else 245 $LS -l /dev/dsk/*s2 2> /dev/null | \ 246 $EGREP -s "$CLIENT_TYPE_VHCI" 247 fi 248 249 if [ $? -ne 0 ]; then 250 need_bootscript=`$EXPR $need_bootscript - 1` 251 fi 252 done 253 fi 254 255 if [ $need_bootscript -gt 0 ]; then 256 need_bootscript=1 257 if [ -n "$new_bootpath" -a "$MACH" = "i386" ]; then 258 #only update bootpath for x86. 259 $CP /boot/solaris/$BOOTENV_FILE $SAVEDIR/$BOOTENV_FILE.$cmd.$NOW 260 $EEPROM bootpath="$new_bootpath" 261 fi 262 # Enable the mpxio-upgrade service for the reboot 263 $SVCADM disable -t $STMSINSTANCE 264 $SVCCFG -s $STMSINSTANCE "setprop general/enabled=true" 265 else 266 need_bootscript=0 267 fi 268 269 build_recover $need_bootscript 270 271 if [ "$MACH" = "i386" ]; then 272 $BOOTADM update-archive 273 fi 274 275 gettext "The changes will come into effect after rebooting the system.\nReboot the system now ? [y/n] (default: y) " 276 read response 277 278 if [ -z "$response" -o "$response" = "y" -o \ 279 "$response" = "Y" ]; then 280 $REBOOT 281 fi 282 283 return 0 284} 285 286 287# 288# Enable or disable mpxio as specified by the cmd. 289# Returns 0 on success, 1 on failure. 290# 291# Args: $cmd = {enable | disable} 292# $d = {fp | mpt | mpt_sas | pmcs} 293# 294# the global variable $DRVLIST is used 295# 296configure_mpxio() 297{ 298 # be careful here, we've got embedded \t characters 299 # in sed's pattern space. 300 mpxiodisableno='mpxio-disable[ ]*=[ ]*"no"[ ]*;' 301 mpxiodisableyes='mpxio-disable[ ]*=[ ]*"yes"[ ]*;' 302 satadisableno='disable-sata-mpxio[ ]*=[ ]*"no"[ ]*;' 303 satadisableyes='disable-sata-mpxio[ ]*=[ ]*"yes"[ ]*;' 304 305 if [ "$cmd" = "enable" ]; then 306 mpxiodisable_cur_entry=$mpxiodisableyes 307 satadisable_cur_entry=$satadisableyes 308 propval=no 309 msg=`gettext "STMS already enabled"` 310 else 311 mpxiodisable_cur_entry=$mpxiodisableno 312 satadisable_cur_entry=$satadisableno 313 propval=yes 314 msg=`gettext "STMS already disabled"` 315 fi 316 317 DRVCONF=$d.conf 318 KDRVCONF=/kernel/drv/$d.conf 319 TMPDRVCONF=/var/run/tmp.$d.conf.$$ 320 TMPDRVCONF_MPXIO_ENTRY=/var/run/tmp.$d.conf.mpxioentry.$$; 321 TMPDRVCONF_SATA_ENTRY=/var/run/tmp.$d.conf.sataentry.$$; 322 323 if delete_mpxio_disable_entries $KDRVCONF $TMPDRVCONF $TMPDRVCONF_MPXIO_ENTRY $TMPDRVCONF_SATA_ENTRY; then 324 325 if [ -s $TMPDRVCONF_MPXIO_ENTRY ]; then 326 # $DRVCONF does have mpxiodisable entries 327 $EGREP -s "$mpxiodisable_cur_entry" $TMPDRVCONF_MPXIO_ENTRY 328 if [ $? -eq 0 ]; then 329 reboot_needed=`$EXPR $reboot_needed + 1` 330 else 331 # if all mpxiodisable entries are no/yes for 332 # enable/disable mpxio, notify the user 333 $EGREP -s "$satadisable_cur_entry" $TMPDRVCONF_SATA_ENTRY 334 if [ $? -eq 0 -a "$d" = "mpt" ]; then 335 reboot_needed=`$EXPR $reboot_needed + 1` 336 else 337 $RM -f $TMPDRVCONF $TMPDRVCONF_MPXIO_ENTRY $TMPDRVCONF_SATA_ENTRY > /dev/null 2>&1 338 return 0; 339 fi 340 fi 341 342 # If mpxiodisable entries do not exist, always continue update 343 fi 344 else 345 $RM -f $TMPDRVCONF $TMPDRVCONF_MPXIO_ENTRY $TMPDRVCONF_SATA_ENTRY > /dev/null 2>&1 346 gettext "failed to update " 1>&2 347 echo "$KDRVCONF." 1>&2 348 gettext "No changes were made to your STMS configuration.\n" 1>&2 349 return 1 350 fi 351 352 rm $TMPDRVCONF_MPXIO_ENTRY $TMPDRVCONF_SATA_ENTRY > /dev/null 2>&1 353 echo "mpxio-disable=\"${propval}\";" >> $TMPDRVCONF 354 if [ "$d" = "mpt" ]; then 355 echo "disable-sata-mpxio=\"${propval}\";" >> $TMPDRVCONF 356 fi 357 358} 359 360setcmd() 361{ 362 if [ "$cmd" = "none" ]; then 363 cmd=$1 364 else 365 echo "$USAGE" 1>&2 366 exit 2 367 fi 368} 369 370# 371# Need to update bootpath on x86 if boot system from FC disk 372# Only update bootpath here when mpxio is enabled 373# If mpxio is currently disabled, then we'll update bootpath in the 374# mpxio-upgrade service method on reboot. 375# 376 377get_newbootpath_for_stmsdev() { 378 if [ "$cmd" = "enable" ]; then 379 return 0 380 fi 381 382 cur_bootpath=`$STMSBOOTUTIL -b` 383 if [ $? != 0 ]; then 384 return 1 385 fi 386 387 # Since on x64 platforms the eeprom command doesn't update the 388 # kernel, the file /boot/solaris/bootenv.rc and the kernel's 389 # bootpath variable have a good chance of differing. We do some 390 # extra handwaving to get the correct bootpath variable setting. 391 392 ONDISKVER=`$AWK '/bootpath/ {print $3}' /boot/solaris/bootenv.rc|\ 393 $SED -e"s,',,g"` 394 if [ "$ONDISKVER" != "$cur_bootpath" ]; then 395 cur_bootpath="$ONDISKVER" 396 fi 397 398 NEWBOOTPATH="" 399 for path in $cur_bootpath; do 400 mapped=`$STMSBOOTUTIL -p $path` 401 if [ "$mapped" != "NOT_MAPPED" ]; then 402 if [ "$mapped" != "$path" ]; then 403 NEWBOOTPATH=`echo "$path " | \ 404 $SED -e"s|$path|$mapped|"`" $NEWBOOTPATH" 405 else 406 NEWBOOTPATH="$NEWBOOTPATH $path" 407 fi 408 fi 409 done 410 # now strip off leading and trailing space chars 411 new_bootpath=`echo $NEWBOOTPATH` 412 return 0 413} 414 415# 416# Emit a warning message to the user that by default we 417# operate on all multipath-capable controllers that are 418# attached to the system, and that if they want to operate 419# on only a specific controller type (fp|mpt|mpt_sas|pmcs|....) then 420# they need to re-invoke stmsboot with "-D $driver" in 421# their argument list 422# 423 424emit_driver_warning_msg() { 425 426 # for each driver that we support, grab the list 427 # of controllers attached to the system. 428 429 echo "" 430 gettext "WARNING: stmsboot operates on each supported multipath-capable controller\n" 431 gettext " detected in a host. In your system, these controllers are\n\n" 432 433 for WARNDRV in `echo $SUPPORTED_DRIVERS| $SED -e"s,|, ,g"`; do 434 $STMSBOOTUTIL -D $WARNDRV -n 435 done; 436 437 echo "" 438 gettext "If you do NOT wish to operate on these controllers, please quit stmsboot\n" 439 gettext "and re-invoke with -D { fp | mpt | mpt_sas | pmcs} to specify which controllers you wish\n" 440 gettext "to modify your multipathing configuration for.\n" 441 442 echo "" 443 gettext "Do you wish to continue? [y/n] (default: y) " 444 read response 445 446 if [ -n "$response" -a "$response" != "Y" -a \ 447 "$response" != "y" ]; then 448 exit 449 fi 450} 451 452 453# 454# 455# main starts here 456# 457 458cmd=none 459# process options 460while getopts D:geduLl: c 461do 462 case $c in 463 e) setcmd enable;; 464 d) setcmd disable;; 465 u) setcmd update;; 466 L) setcmd listall;; 467 l) setcmd list 468 controller=$OPTARG;; 469 D) DRV=$OPTARG;; 470 g) GUID="-g";; 471 \?) echo "$USAGE" 1>&2 472 exit 2;; 473 esac 474done 475 476if [ "$cmd" = "none" ]; then 477 echo "$USAGE" 1>&2 478 exit 2 479fi 480 481if [ -z "$DRV" ]; then 482 DRVLIST="fp mpt mpt_sas pmcs" 483else 484 DRVLIST=$DRV 485fi 486 487USERID=`id | $EGREP "uid=0"` 488if [ -z "$USERID" ]; then 489 gettext "You must be super-user to run this script.\n" 1>&2 490 exit 1 491fi 492 493# just a sanity check 494if [ ! -f $STMSBOOTUTIL -o ! -f $STMSMETHODSCRIPT ]; then 495 fmt=`gettext "Can't find %s and/or %s"` 496 printf "$fmt\n" "$STMSBOOTUTIL" "$STMSMETHODSCRIPT" 1>&2 497 exit 1 498fi 499 500# If the old sun4u-specific SMF method is found, remove it 501$SVCCFG -s "platform/sun4u/mpxio-upgrade:default" < /dev/null > /dev/null 2>&1 502if [ $? -eq 0 ]; then 503 $SVCCFG delete "platform/sun4u/mpxio-upgrade:default" > /dev/null 2>&1 504fi 505 506# now import the new service, if necessary 507$SVCPROP -q $STMSINSTANCE < /dev/null > /dev/null 2>&1 508if [ $? -ne 0 ]; then 509 if [ -f /lib/svc/manifest/system/device/mpxio-upgrade.xml ]; then 510 $SVCCFG import /lib/svc/manifest/system/device/mpxio-upgrade.xml 511 if [ $? -ne 0 ]; then 512 513 fmt=`gettext "Unable to import the %s service"` 514 printf "$fmt\n" "$STMSINSTANCE" 1>&2 515 exit 1 516 else 517 fmt=`gettext "Service %s imported successfully, continuing"` 518 printf "$fmt\n" "$STMSINSTANCE" 1>&2 519 fi 520 else 521 fmt=`gettext "Service %s does not exist on this host"` 522 printf "$fmt\n" "$STMSINSTANCE" 1>&2 523 exit 1 524 fi 525fi 526 527 528# make sure we can stash our data somewhere private 529if [ ! -d $SAVEDIR ]; then 530 $MKDIR -p $SAVEDIR 531fi 532# prime the cache 533$STMSBOOTUTIL -i 534 535 536if [ "$cmd" = "enable" -o "$cmd" = "disable" -o "$cmd" = "update" ]; then 537 # 538 # The bootup script doesn't work on cache-only-clients as the script 539 # is executed before the plumbing for cachefs mounting of root is done. 540 # 541 if $MOUNT -v | $EGREP -s " on / type (nfs|cachefs) "; then 542 gettext "This command option is not supported on systems with an nfs or cachefs mounted root filesystem.\n" 1>&2 543 exit 1 544 fi 545 546 # if the user has left the system with the mpxio-upgrade service 547 # in a temporarily disabled state (ie, service is armed for the next 548 # reboot), then let them know. We need to ensure that the system is 549 # is in a sane state before allowing any further invocations, so 550 # try to get the system admin to do so 551 552 ISARMED=`$SVCS -l $STMSINSTANCE|$GREP "enabled.*false.*temporary"` 553 if [ ! $? ]; then 554 echo "" 555 gettext "You need to reboot the system in order to complete\n" 556 gettext "the previous invocation of stmsboot.\n" 557 echo "" 558 gettext "Do you wish to reboot the system now? (y/n, default y) " 559 read response 560 561 if [ -z "$response" -o "x$response" = "Y" -o \ 562 "$response" = "y" ]; then 563 $REBOOT 564 else 565 echo "" 566 gettext "Please reboot this system before continuing\n" 567 echo "" 568 exit 1 569 fi 570 fi 571 572 # 573 # keep a copy of the last saved files, useful for manual 574 # recovery in case of a problem. 575 # 576 for d in $DRVLIST; do 577 DRVCONF=$d.conf 578 KDRVCONF=/kernel/drv/$d.conf 579 TMPDRVCONF=/var/run/tmp.$d.conf.$$ 580 TMPDRVCONF_MPXIO_ENTRY=/var/run/tmp.$d.conf.mpxioentry.$$; 581 if [ "$MACH" = "sparc" ]; then 582 backup_lastsaved $KDRVCONF $VFSTAB 583 else 584 backup_lastsaved $KDRVCONF $VFSTAB /boot/solaris/$BOOTENV_FILE 585 fi 586 done 587fi 588 589if [ "$cmd" = "enable" -o "$cmd" = "disable" ]; then 590 591 msgneeded=`echo "$DRVLIST" |$GREP " "` 592 if [ -n "$msgneeded" ]; then 593 emit_driver_warning_msg 594 fi 595 for d in $DRVLIST; do 596 configure_mpxio $cmd $d 597 done 598 599 if [ $reboot_needed -ne 0 ]; then 600 # Need to update bootpath on x86 if our boot device is 601 # now accessed through mpxio. 602 # Only update bootpath before reboot when mpxio is enabled 603 # If mpxio is currently disabled, we will update bootpath 604 # on reboot in the mpxio-upgrade service 605 606 if [ "$cmd" = "disable" ]; then 607 if [ "$MACH" = "i386" ]; then 608 get_newbootpath_for_stmsdev 609 if [ $? -ne 0 ]; then 610 $RM -f $TMPDRVCONF > /dev/null 2>&1 611 gettext "failed to update bootpath.\n" 1>&2 612 gettext "No changes were made to your STMS configuration.\n" 1>&2 613 return 1 614 fi 615 fi 616 # If we're not using ZFS root then we need 617 # to keep track of what / maps to in case 618 # it's an active-active device and we boot from 619 # the other path 620 HASZFSROOT=`$DF -g / |$GREP zfs` 621 if [ -z "$HASZFSROOT" ]; then 622 ROOTSCSIVHCI=`$DF /|$AWK -F":" '{print $1}' | \ 623 $AWK -F"(" '{print $2}'| $SED -e"s,),,"` 624 TMPROOTDEV=`$LS -l $ROOTSCSIVHCI |$AWK -F">" '{print $2}' | \ 625 $SED -e"s, ../../devices,,"` 626 $STMSBOOTUTIL -q $TMPROOTDEV > $BOOTDEVICES 627 fi 628 fi 629 update_sysfiles 630 else 631 echo "STMS is already ${cmd}d. No changes or reboots needed" 632 fi 633 634 635elif [ "$cmd" = "update" ]; then 636 if [ "$MACH" = "i386" ]; then 637 # In this case we always change the bootpath to phci-based 638 # path first. bootpath will later be modified in mpxio-upgrade 639 # to the vhci-based path if mpxio is enabled on root. 640 get_newbootpath_for_stmsdev 641 if [ $? -ne 0 ]; then 642 gettext "failed to update bootpath.\n" 1>&2 643 return 1 644 fi 645 fi 646 update_sysfiles 647 648elif [ "$cmd" = "list" ]; then 649 $STMSBOOTUTIL $GUID -l $controller 650else 651 $STMSBOOTUTIL $GUID -L 652fi 653 654exit $? 655