summaryrefslogtreecommitdiff
path: root/usr/src/cmd/cmd-inet/lib/nwamd/interface.c
diff options
context:
space:
mode:
authoramaguire <none@none>2007-04-27 02:36:22 -0700
committeramaguire <none@none>2007-04-27 02:36:22 -0700
commit032ae3d9dc781b45931a4e8b7c4c527ff1419ddc (patch)
tree305b2e9affbe0afb21366d73cba8445cae4ed71d /usr/src/cmd/cmd-inet/lib/nwamd/interface.c
parent038a8f41fc75478546db55fe98bd9c7fc5e08b96 (diff)
downloadillumos-gate-032ae3d9dc781b45931a4e8b7c4c527ff1419ddc.tar.gz
6545585 t_optmgmt System error message appears when rebooting after installation/upgrade
6548363 incorrect formatting of AF_LINK interface name in nwamd
Diffstat (limited to 'usr/src/cmd/cmd-inet/lib/nwamd/interface.c')
-rw-r--r--usr/src/cmd/cmd-inet/lib/nwamd/interface.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/usr/src/cmd/cmd-inet/lib/nwamd/interface.c b/usr/src/cmd/cmd-inet/lib/nwamd/interface.c
index 3724275f6e..c4fbc7dc92 100644
--- a/usr/src/cmd/cmd-inet/lib/nwamd/interface.c
+++ b/usr/src/cmd/cmd-inet/lib/nwamd/interface.c
@@ -429,25 +429,26 @@ activate_upper_layer_profile(boolean_t do_dhcp, const char *ifname)
size_t buflen;
size_t offset;
const char bringup[] = "/bringup";
+ boolean_t should;
+ int res;
- if (do_dhcp) {
- boolean_t should;
- int res;
-
- res = lookup_boolean_property(OUR_PG, "use_net_svc", &should);
- /*
- * If the look-up failed, try anyway: only avoid this if we
- * know for sure not to.
- */
- if ((res == 0 && should) || (res == -1)) {
- if (check_svc_up(NET_SVC_FMRI, 5)) {
- (void) start_child(NET_SVC_METHOD, "start",
- ifname, NULL);
- } else {
- syslog(LOG_WARNING, "timed out when waiting "
- "for %s to come up, start method %s not "
- "executed", NET_SVC_FMRI, NET_SVC_METHOD);
- }
+ res = lookup_boolean_property(OUR_PG, "use_net_svc", &should);
+ /*
+ * If the look-up failed, try anyway: only avoid this if we
+ * know for sure not to.
+ */
+ if ((res == 0 && should) || (res == -1)) {
+ if (check_svc_up(NET_SVC_FMRI, 5)) {
+ /*
+ * If doing dhcp, pass in specific interface
+ * name to net-svc so dhcpinfo can specify it.
+ */
+ (void) start_child(NET_SVC_METHOD, "start",
+ do_dhcp ? ifname : NULL, NULL);
+ } else {
+ syslog(LOG_WARNING, "timed out when waiting "
+ "for %s to come up, start method %s not "
+ "executed", NET_SVC_FMRI, NET_SVC_METHOD);
}
}
f = popen(ULP_DIR "/check-conditions", "r");