Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

#!/bin/bash

TYPE_ZONE=$1
IP=$2
SER=$3

cat > ${HOME}/${TYPE_ZONE}.cmd <<EOT
create
set zonename=${TYPE_ZONE}
set zonepath=/zones/${TYPE_ZONE}
set autoboot=false
set ip-type=exclusive
add net
set physical=iz${SER}
set global-nic=vsw0
add property (name=ip,value="${IP}.${SER}")
add property (name=gateway,value="${IP}.254")
add property (name=netmask,value="255.255.255.0")
add property (name=primary,value="true")
end
add attr
set name=resolvers
set type=string
set value=8.8.8.8
end
add fs
set dir="/export/home/admin"
set special="/export/home/admin"
set type="lofs"
end
add fs
set dir="/export/builds"
set special="/export/builds"
set type="lofs"
end
add fs
set dir="/data/repo"
set special="/data/repo"
set type="lofs"
end
verify
commit
exit
EOT

zonecfg -z ${TYPE_ZONE} -f ${HOME}/${TYPE_ZONE}.cmd
zoneadm -z ${TYPE_ZONE} install 
zoneadm -z ${TYPE_ZONE} boot

  • No labels