Skip to content
Permalink
Browse files

OS-1906 have sngl brand use files from dataset, remove use of SNGL_BA…

…SE tarball.
  • Loading branch information
joshwilsdon committed Feb 21, 2013
1 parent 300dd07 commit c6920fb1d0f6cd852da06e049631f1ee274b5b9d
Showing with 0 additions and 19 deletions.
  1. +0 −19 usr/src/lib/brand/sngl/zone/sinstall.sh
@@ -30,18 +30,11 @@ export PATH
. /usr/lib/brand/shared/common.ksh
. /usr/lib/brand/joyent/common.ksh

SNGL_BASE=/zones/sngl_base.tar.gz

ZONENAME=""
ZONEPATH=""
# Default to 10GB diskset quota
ZQUOTA=10

if [[ ! -f $SNGL_BASE ]]; then
print -u2 "Brand error: missing the SNGL install tar file"
exit $ZONE_SUBPROC_FATAL
fi

while getopts "R:t:U:q:z:" opt
do
case "$opt" in
@@ -103,23 +96,11 @@ zfs snapshot $PDS_NAME/${TMPLZONE}@${bname}
zfs clone -F ${QUOTA_ARG} $PDS_NAME/${TMPLZONE}@${bname} \
$PDS_NAME/$bname || fatal "failed to clone zone dataset"

# Make sure zoneinit is setup to use -o xtrace, this handles old datasets where
# is not yet enabled by default.
if [[ -f ${ZROOT}/root/zoneinit && -z $(grep "^set -o xtrace" ${ZROOT}/root/zoneinit) ]]; then
sed -i "" -e "s/^#set -o xtrace/set -o xtrace/" ${ZROOT}/root/zoneinit
fi

if [ ! -d ${ZONEPATH}/config ]; then
mkdir -p ${ZONEPATH}/config
chmod 755 ${ZONEPATH}/config
fi

final_setup

# Modify to make it a SNGL zone
rm -f $ZROOT/bin
ln -s /system/usr/bin $ZROOT/bin

(cd $ZROOT; rm -rf usr; gzcat $SNGL_BASE | tar xbf 512 -)

exit $ZONE_SUBPROC_OK

0 comments on commit c6920fb

Please sign in to comment.
You can’t perform that action at this time.