summaryrefslogtreecommitdiff
path: root/usr/src/cmd/cmd-inet/lib/nwamd/interface.c
diff options
context:
space:
mode:
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");