summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2015-03-19 14:51:00 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2015-03-19 14:51:00 +0000
commita1ab1f400fc0540b254fbaf8abd7b9a8f7eb16f2 (patch)
tree6215b81af9517bdb2487d8376484d8de95e0eae9
parent616ce62bf5ee469828060847f55b5ab43ae0164a (diff)
downloadillumos-joyent-release-20150319.tar.gz
OS-4072 lx brand - zone came up without eth0 plumbed20150319release-20150319
-rwxr-xr-xusr/src/lib/brand/lx/zone/lx_boot_zone_debian.ksh30
-rw-r--r--usr/src/lib/brand/lx/zone/lx_boot_zone_redhat.ksh30
-rw-r--r--usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh32
3 files changed, 52 insertions, 40 deletions
diff --git a/usr/src/lib/brand/lx/zone/lx_boot_zone_debian.ksh b/usr/src/lib/brand/lx/zone/lx_boot_zone_debian.ksh
index 0903c09924..7a6197a98e 100755
--- a/usr/src/lib/brand/lx/zone/lx_boot_zone_debian.ksh
+++ b/usr/src/lib/brand/lx/zone/lx_boot_zone_debian.ksh
@@ -55,7 +55,24 @@ setup_net()
if ($1 == "net:") {
in_net = 1
in_attr = 0
+
+ if (phys != "") {
+ printf(" /sbin/ifconfig-native %s plumb || true\n", phys)
+ printf(" /sbin/ifconfig-native %s %s netmask %s up || true\n",
+ phys, ip, mask)
+ printf(" /sbin/ifconfig-native %s inet6 plumb up || true\n", phys)
+ if (prim == "true" && length(gw) > 0)
+
+ printf(" /sbin/route add default %s || true\n", gw)
+
+ phys = ""
+ prim = ""
+ gw = ""
+ ip = ""
+ mask = ""
+ }
next
+
} else if ($1 == "attr:") {
in_net = 0
in_attr = 1
@@ -83,19 +100,6 @@ setup_net()
gw = val
}
- if ($1 == "net:" && phys != "") {
- printf(" /sbin/ifconfig-native %s plumb || true\n", phys)
- printf(" /sbin/ifconfig-native %s %s netmask %s up || true\n",
- phys, ip, mask)
- printf(" /sbin/ifconfig-native %s inet6 plumb up || true\n", phys)
- if (prim == "true" && length(gw) > 0)
-
- printf(" /sbin/route add default %s || true\n", gw)
-
- phys = ""
- prim = ""
- gw = ""
- }
} else if (in_attr == 1) {
if ($1 == "value:") {
nres = split($2, resolvers, ",")
diff --git a/usr/src/lib/brand/lx/zone/lx_boot_zone_redhat.ksh b/usr/src/lib/brand/lx/zone/lx_boot_zone_redhat.ksh
index ae60671503..9360cdc28f 100644
--- a/usr/src/lib/brand/lx/zone/lx_boot_zone_redhat.ksh
+++ b/usr/src/lib/brand/lx/zone/lx_boot_zone_redhat.ksh
@@ -59,7 +59,24 @@ setup_net()
if ($1 == "net:") {
in_net = 1
in_attr = 0
+
+ if (phys != "") {
+ printf(" /sbin/ifconfig-native %s plumb || true\n", phys)
+ printf(" /sbin/ifconfig-native %s %s netmask %s up || true\n",
+ phys, ip, mask)
+ printf(" /sbin/ifconfig-native %s inet6 plumb up || true\n", phys)
+ if (prim == "true" && length(gw) > 0)
+
+ printf(" /sbin/route add default %s || true\n", gw)
+
+ phys = ""
+ prim = ""
+ gw = ""
+ ip = ""
+ mask = ""
+ }
next
+
} else if ($1 == "attr:") {
in_net = 0
in_attr = 1
@@ -87,19 +104,6 @@ setup_net()
gw = val
}
- if ($1 == "net:" && phys != "") {
- printf(" /sbin/ifconfig-native %s plumb || true\n", phys)
- printf(" /sbin/ifconfig-native %s %s netmask %s up || true\n",
- phys, ip, mask)
- printf(" /sbin/ifconfig-native %s inet6 plumb up || true\n", phys)
- if (prim == "true" && length(gw) > 0)
-
- printf(" /sbin/route add default %s || true\n", gw)
-
- phys = ""
- prim = ""
- gw = ""
- }
} else if (in_attr == 1) {
if ($1 == "value:") {
nres = split($2, resolvers, ",")
diff --git a/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh b/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh
index 357f5bc9b7..495aff218a 100644
--- a/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh
+++ b/usr/src/lib/brand/lx/zone/lx_boot_zone_ubuntu.ksh
@@ -49,7 +49,25 @@ setup_net()
if ($1 == "net:") {
in_net = 1
in_attr = 0
+
+ if (phys != "") {
+ printf(" /sbin/ifconfig-native %s plumb || true\n", phys)
+ printf(" /sbin/ifconfig-native %s %s netmask %s up || true\n",
+ phys, ip, mask)
+ printf(" /sbin/ifconfig-native %s inet6 plumb up || true\n", phys)
+ if (prim == "true" && length(gw) > 0)
+ printf(" /sbin/route add default %s || true\n", gw)
+ printf(" /sbin/initctl emit --no-wait net-device-up IFACE=%s\n",
+ phys)
+
+ phys = ""
+ prim = ""
+ gw = ""
+ ip = ""
+ mask = ""
+ }
next
+
} else if ($1 == "attr:") {
in_net = 0
in_attr = 1
@@ -77,20 +95,6 @@ setup_net()
gw = val
}
- if ($1 == "net:" && phys != "") {
- printf(" /sbin/ifconfig-native %s plumb || true\n", phys)
- printf(" /sbin/ifconfig-native %s %s netmask %s up || true\n",
- phys, ip, mask)
- printf(" /sbin/ifconfig-native %s inet6 plumb up || true\n", phys)
- if (prim == "true" && length(gw) > 0)
- printf(" /sbin/route add default %s || true\n", gw)
- printf(" /sbin/initctl emit --no-wait net-device-up IFACE=%s\n",
- phys)
-
- phys = ""
- prim = ""
- gw = ""
- }
} else if (in_attr == 1) {
if ($1 == "value:") {
nres = split($2, resolvers, ",")