summaryrefslogtreecommitdiff
path: root/usr/src/cmd/svc
diff options
context:
space:
mode:
authorAnurag S. Maskey <Anurag.Maskey@Oracle.COM>2010-04-28 09:54:03 -0400
committerAnurag S. Maskey <Anurag.Maskey@Oracle.COM>2010-04-28 09:54:03 -0400
commit4a44f0a129f99893a7aef6325037c5e1fa702a0f (patch)
tree3ed9811d5dd1bd738bb505fccd7a645937c5cbc0 /usr/src/cmd/svc
parent134a1f4e3289b54e0f980e9cf05352e419a60bee (diff)
downloadillumos-joyent-4a44f0a129f99893a7aef6325037c5e1fa702a0f.tar.gz
6944720 upgrade with ephemeral location causes network/location to go into maintenance on boot
Diffstat (limited to 'usr/src/cmd/svc')
-rw-r--r--usr/src/cmd/svc/milestone/net-loc15
1 files changed, 11 insertions, 4 deletions
diff --git a/usr/src/cmd/svc/milestone/net-loc b/usr/src/cmd/svc/milestone/net-loc
index 60f466d8d7..a26ce9a37b 100644
--- a/usr/src/cmd/svc/milestone/net-loc
+++ b/usr/src/cmd/svc/milestone/net-loc
@@ -20,8 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
. /lib/svc/share/smf_include.sh
@@ -689,8 +688,16 @@ else
# location hasn't been selected; default to NoNet
activate_loc NoNet
else
- # activate selected location
- activate_loc $sel_loc
+ # check if the selected location exists
+ $NWAMCFG list loc $sel_loc >/dev/null 2>&1
+ if [ $? -eq 1 ]; then
+ echo "location $sel_loc doesn't exist, revert to NoNet"
+ set_smf_prop $SMF_FMRI location/selected NoNet
+ refresh_svc $SMF_FMRI
+ else
+ # activate selected location
+ activate_loc $sel_loc
+ fi
fi
fi