4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.
19 ZFS_IMAGE
=/.cdrom
/image
/*.zfs.bz2
20 keyboard_layout
=${2:-US-English}
22 zpool list
$RPOOL >& /dev
/null
23 if [[ $?
!= 0 ]]; then
24 echo "Cannot find root pool $RPOOL"
25 echo "Press RETURN to exit"
30 echo "Installing from ZFS image $ZFS_IMAGE"
34 .
/kayak
/install_help.sh
37 # Make sure $1 (hostname) is a legit one.
38 echo $1 |
egrep '^[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]$' > /dev
/null
39 if [[ $?
!= 0 ]]; then
40 echo "[$1] is not a legitimate hostname."
48 until [[ $NEWHOST == "" ]]; do
50 echo -n "Please enter a hostname or press RETURN if you want [$HOSTNAME]: "
52 if [[ $NEWHOST != "" ]]; then
53 reality_check
$NEWHOST
54 if [[ $?
!= 0 ]]; then
62 until [[ $NEWTZ == "" ]]; do
64 echo "Current timezone is [$TZ]: " `TZ=$TZ date`
65 echo "(NOTE: If time/date above looks wrong, the timezone name doesn't exist.)"
66 echo -n "Enter a new timezone, or just hit RETURN to accept [$TZ]: "
70 # Because of kayak's small miniroot, just use C as the language for now.
73 BuildBE
$RPOOL $ZFS_IMAGE
74 ApplyChanges
$HOSTNAME $TZ $LANG $keyboard_layout
80 echo "$RPOOL now has a working and mounted boot environment, per above."
81 echo "Once back at the main menu, you can reboot from there, or"
82 echo "re-enter the shell to modify your new BE before its first boot."
83 echo -n "Press RETURN to go back to the menu: "