Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions installer/dialog-install
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
. /kayak/lib/disk_help.sh

SetupLog /tmp/kayak.log
BEName $BENAME

keyboard_layout=${1:-US-English}

Expand Down Expand Up @@ -411,9 +412,11 @@ d_info "Preparing to install..."
# Because of kayak's small miniroot, just use C as the language for now.
LANG=C

bename=omnios
ver=`head -1 /etc/release | awk '{print $3}'`
[ -n "$ver" ] && bename+="-$ver"
bename=$BENAME
if [ -z "$BENAME_SET" ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this always going to be false because you have called BEName up at line 28? Same comment for rpool-install.

We should still default to omnios-r151058 or whatever, depending on the version being installed.

ver=`head -1 /etc/release | awk '{print $3}'`
[ -n "$ver" ] && bename+="-$ver"
fi

BuildBE $RPOOL $ZFS_IMAGE $bename
ApplyChanges $HOSTNAME $TZ $LANG $keyboard_layout \
Expand Down
9 changes: 6 additions & 3 deletions installer/rpool-install
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,19 @@ echo "Installing from ZFS image $ZFS_IMAGE"
. /kayak/lib/install_help.sh

SetupLog /tmp/kayak.log
BEName $BENAME

prompt_hostname omnios
prompt_timezone

# Because of kayak's small miniroot, just use C as the language for now.
LANG=C

bename=omnios
ver=`head -1 /etc/release | awk '{print $3}'`
[ -n "$ver" ] && bename+="-$ver"
bename=$BENAME
if [ -z "$BENAME_SET" ]; then
ver=`head -1 /etc/release | awk '{print $3}'`
[ -n "$ver" ] && bename+="-$ver"
fi

BuildBE $RPOOL $ZFS_IMAGE $bename
ApplyChanges $HOSTNAME $TZ $LANG $keyboard_layout
Expand Down
12 changes: 10 additions & 2 deletions lib/install_help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ function getvar {
prtconf -v /devices | sed -n '/'$1'/{;n;p;}' | cut -f2 -d\' | pipelog
}

BENAME=${BENAME:-omnios}
BENAME_SET=
function BEName {
log "Setting boot environment name to $1"
BENAME="$1"
BENAME_SET=1
}

# Blank
ROOTPW='$5$kr1VgdIt$OUiUAyZCDogH/uaxH71rMeQxvpDEY2yX.x0ZQRnmeb9'
function RootPW {
Expand Down Expand Up @@ -238,7 +246,7 @@ function BE_LinkMsglog {
function BuildBE {
RPOOL=${1:-rpool}
typeset MEDIA="$2"
typeset _bename=${3:-omnios}
typeset _bename=${3:-$BENAME}

if [ -z "$MEDIA" ]; then
BOOTSRVA=`/sbin/dhcpinfo BootSrvA`
Expand Down Expand Up @@ -294,7 +302,7 @@ function FetchConfig {

function MakeBootable {
typeset _rpool=${1:-rpool}
typeset _bename=${2:-omnios}
typeset _bename=${2:-$BENAME}
slog "Making boot environment bootable"
logcmd zpool set bootfs=$_rpool/ROOT/$_bename $_rpool
# Must do beadm activate first on the off chance we're bootstrapping from
Expand Down