summaryrefslogtreecommitdiff
path: root/usr/src/lib/brand
diff options
context:
space:
mode:
authorJohn Sonnenschein <johns@joyent.com>2012-01-26 22:45:08 +0000
committerJohn Sonnenschein <johns@joyent.com>2012-01-26 22:45:08 +0000
commit92fb61a58dea0e097df79e73d3cda1bef52c4339 (patch)
tree8a9727b7a3600c29b261de4580520de19ec57e56 /usr/src/lib/brand
parentd6f90348d6442b80b8e77a4aaf217cbf86c54bdb (diff)
parent6a5fc1386817167c00f9ee99bebd9ce35d434593 (diff)
downloadillumos-joyent-gcc4.tar.gz
Merge branch 'gcc4' of git.joyent.com:illumos-joyent into gcc4gcc4
Diffstat (limited to 'usr/src/lib/brand')
-rw-r--r--usr/src/lib/brand/joyent/zone/statechange.ksh3
-rwxr-xr-xusr/src/lib/brand/kvm/zone/kinstall.ksh8
-rwxr-xr-xusr/src/lib/brand/kvm/zone/statechange.ksh3
3 files changed, 10 insertions, 4 deletions
diff --git a/usr/src/lib/brand/joyent/zone/statechange.ksh b/usr/src/lib/brand/joyent/zone/statechange.ksh
index 70be7819b4..97b041528a 100644
--- a/usr/src/lib/brand/joyent/zone/statechange.ksh
+++ b/usr/src/lib/brand/joyent/zone/statechange.ksh
@@ -248,7 +248,6 @@ setup_net()
fi
if [[ $allow_ip_spoof != "1" ]]; then
spoof_opts="${spoof_opts}${comma}ip-nospoof"
- ip_spoof_enabled="true"
comma=","
fi
if [[ $allow_restricted_traffic != "1" ]]; then
@@ -288,7 +287,7 @@ setup_net()
fi
fi
- if [[ -n "${zone_ip}" ]] && [[ -n "${ip_spoof_enabled}" ]] && \
+ if [[ -n "${zone_ip}" ]] && [[ $allow_ip_spoof != "1" ]] && \
[[ "${zone_ip}" != "dhcp" ]]; then
dladm set-linkprop -t -z $ZONENAME \
-p "allowed-ips=${zone_ip}" ${nic}
diff --git a/usr/src/lib/brand/kvm/zone/kinstall.ksh b/usr/src/lib/brand/kvm/zone/kinstall.ksh
index abd60a17b7..43b0c953d1 100755
--- a/usr/src/lib/brand/kvm/zone/kinstall.ksh
+++ b/usr/src/lib/brand/kvm/zone/kinstall.ksh
@@ -66,6 +66,14 @@ PDS_NAME=`mount | nawk -v p=$dname '{if ($1 == p) print $3}'`
[ -z "$PDS_NAME" ] && \
print -u2 "Brand error: missing parent ZFS dataset for $dname"
+# it's possible to specify a zone root here if you specified the
+# '-x nodataset' when installing the zone.
+if [[ -n ${TMPLZONE} ]]; then
+ zfs snapshot $PDS_NAME/${TMPLZONE}@${bname}
+ zfs clone -o quota=${ZQUOTA}g $PDS_NAME/${TMPLZONE}@${bname} \
+ $PDS_NAME/$bname
+fi
+
if [ ! -d ${ZONEPATH}/config ]; then
mkdir -p ${ZONEPATH}/config
chmod 755 ${ZONEPATH}/config
diff --git a/usr/src/lib/brand/kvm/zone/statechange.ksh b/usr/src/lib/brand/kvm/zone/statechange.ksh
index 22f647775a..efb10be50e 100755
--- a/usr/src/lib/brand/kvm/zone/statechange.ksh
+++ b/usr/src/lib/brand/kvm/zone/statechange.ksh
@@ -221,7 +221,6 @@ setup_net()
fi
if [[ $allow_ip_spoof != "1" ]]; then
spoof_opts="${spoof_opts}${comma}ip-nospoof"
- ip_spoof_enabled="true"
comma=","
fi
if [[ $allow_restricted_traffic != "1" ]]; then
@@ -244,7 +243,7 @@ setup_net()
fi
fi
- if [[ -n "${zone_ip}" ]] && [[ -n "${ip_spoof_enabled}" ]] && \
+ if [[ -n "${zone_ip}" ]] && [[ $allow_ip_spoof != "1" ]] && \
[[ "${zone_ip}" != "dhcp" ]]; then
dladm set-linkprop -t -z $ZONENAME \
-p "allowed-ips=${zone_ip}" ${nic}