summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/stmsboot/stmsboot.sh10
-rw-r--r--usr/src/cmd/stmsboot/stmsboot_util.c17
2 files changed, 22 insertions, 5 deletions
diff --git a/usr/src/cmd/stmsboot/stmsboot.sh b/usr/src/cmd/stmsboot/stmsboot.sh
index bfc8db3ac2..0650561e82 100644
--- a/usr/src/cmd/stmsboot/stmsboot.sh
+++ b/usr/src/cmd/stmsboot/stmsboot.sh
@@ -332,7 +332,7 @@ configure_mpxio()
# if all mpxiodisable entries are no/yes for
# enable/disable mpxio, notify the user
$EGREP -s "$satadisable_cur_entry" $TMPDRVCONF_SATA_ENTRY
- if [ $? -eq 0 ]; then
+ if [ $? -eq 0 -a "$d" = mpt ]; then
reboot_needed=`$EXPR $reboot_needed + 1`
else
$RM -f $TMPDRVCONF $TMPDRVCONF_MPXIO_ENTRY $TMPDRVCONF_SATA_ENTRY > /dev/null 2>&1
@@ -350,9 +350,11 @@ configure_mpxio()
return 1
fi
- rm $TMPDRVCONF_MPXIO_ENTRY > /dev/null 2>&1
+ rm $TMPDRVCONF_MPXIO_ENTRY $TMPDRVCONF_SATA_ENTRY > /dev/null 2>&1
echo "mpxio-disable=\"${propval}\";" >> $TMPDRVCONF
- echo "disable-sata-mpxio=\"${propval}\";" >> $TMPDRVCONF
+ if [ "$d" = mpt ]; then
+ echo "disable-sata-mpxio=\"${propval}\";" >> $TMPDRVCONF
+ fi
}
@@ -617,7 +619,7 @@ if [ "x$cmd" = xenable -o "x$cmd" = xdisable ]; then
# the other path
ROOTSCSIVHCI=`$DF /|$AWK -F":" '{print $1}' | \
$AWK -F"(" '{print $2}'| \
- $SED -e"s,dsk,rdsk," -e"s,s.),,"`
+ $SED -e"s,dsk,rdsk," -e"s,s.[ ]*),,"`
$STMSBOOTUTIL -L | $GREP $ROOTSCSIVHCI | \
$AWK '{print $1}' | $SED -e"s,rdsk,dsk,g" \
>$BOOTDEVICES
diff --git a/usr/src/cmd/stmsboot/stmsboot_util.c b/usr/src/cmd/stmsboot/stmsboot_util.c
index 97c14fae44..a57a5ab2cb 100644
--- a/usr/src/cmd/stmsboot/stmsboot_util.c
+++ b/usr/src/cmd/stmsboot/stmsboot_util.c
@@ -84,6 +84,7 @@ static char *ondiskname = "/etc/mpxio/devid_path.cache";
static nvlist_t *mapnvl;
static int mpxenabled = 0;
static int limctrl = -1;
+static int mpxprop = 0;
static int guid = 0;
static char *drvlimit;
static int globarg = 0;
@@ -507,7 +508,12 @@ list_devs(int listguids, int ctrl)
int rv;
if (!mpxenabled) {
- logmsg(MSG_ERROR, gettext("MPxIO is not enabled\n"));
+ if (mpxprop) {
+ logmsg(MSG_ERROR, gettext("MPXIO disabled\n"));
+ } else {
+ logmsg(MSG_ERROR, gettext("No STMS devices have "
+ "been found\n"));
+ }
return;
}
@@ -898,6 +904,7 @@ popcheck_devnvl(di_node_t thisnode, nvlist_t *devnvl, char *strdevid)
char *path = NULL;
char *curpath = NULL;
char *devfspath = NULL;
+ char *prop = NULL;
int scsivhciparent = 0;
int rv = 0;
boolean_t mpxenp = B_FALSE;
@@ -918,6 +925,14 @@ popcheck_devnvl(di_node_t thisnode, nvlist_t *devnvl, char *strdevid)
"%s to mapnvl\n"), devfspath, strdevid);
return (-1);
}
+ if (di_prop_lookup_strings(DDI_DEV_T_ANY, di_parent_node(thisnode),
+ "mpxio-disable", &prop) >= 0) {
+ if (strncmp(prop, "yes", 3) == 0) {
+ if (!mpxprop)
+ mpxprop++;
+ }
+ }
+
if (strncmp(di_driver_name(di_parent_node(thisnode)),
"scsi_vhci", 9) == 0) {
scsivhciparent = 1;