5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
23 # Copyright 2013 by Andrzej Szeszo. All rights reserved.
25 # Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved.
26 # Use is subject to license terms.
29 [[ $
(id
-u) != 0 ]] && echo Please run this
script as root
&& exit 1
31 . install_help.sh
2>/dev
/null
38 ZFSSEND
=/var
/kayak
/kayak
/r151006.zfs.bz2
39 PVGRUB
=pv-grub.gz.d3950d8
44 UNIX
=/platform
/i86xpv
/kernel
/unix
46 zpool destroy
$RPOOL 2>/dev
/null || true
55 # we need custom PV kernel because of this:
56 # https://www.illumos.org/issues/3172
57 if [[ -f $UNIX ]]; then
58 cp $UNIX $ALTROOT/platform
/i86xpv
/kernel
/unix
59 chown root
:sys
$ALTROOT/platform
/i86xpv
/kernel
/unix
66 Postboot
'/sbin/ipadm create-if xnf0'
67 Postboot
'/sbin/ipadm create-addr -T dhcp xnf0/v4'
68 Postboot
'for i in 0 1 2 3 4 5 6 7 8 9; do curl -f http://169.254.169.254/ >/dev/null 2>&1 && break; sleep 1; done'
69 Postboot
'HOSTNAME=$(/usr/bin/curl http://169.254.169.254/latest/meta-data/hostname)'
70 Postboot
'[[ -z $HOSTNAME ]] || (/usr/bin/hostname $HOSTNAME && echo $HOSTNAME >/etc/nodename)'