Skip to content

install_help: add BEName() to allow configuring the boot environment name#336

Open
mRrvz wants to merge 1 commit into
omniosorg:masterfrom
mRrvz:feature/configurable-bename
Open

install_help: add BEName() to allow configuring the boot environment name#336
mRrvz wants to merge 1 commit into
omniosorg:masterfrom
mRrvz:feature/configurable-bename

Conversation

@mRrvz

@mRrvz mRrvz commented Apr 27, 2026

Copy link
Copy Markdown

Add a BEName() function, modelled after RootPW(), that lets install
scripts or configuration profiles override the boot environment name
before installation begins.

  • BENAME is initialised with ${BENAME:-omnios} so that a value set
    in an environment-specific defs.sh (sourced before install_help.sh)
    is preserved rather than overwritten.

  • A companion flag BENAME_SET is cleared at module load and set by
    BEName(). Installer scripts append the OS version from /etc/release
    to the BE name only when BENAME_SET is unset, preserving the
    existing omnios-r151056t naming convention for default installs while
    allowing downstream distributions to supply a fully-formed name that
    is used as-is.

  • BuildBE() and MakeBootable() default to $BENAME instead of the
    hardcoded string "omnios", so the PXE/network install path also
    honours the configured name.

  • Installer scripts (dialog-install, rpool-install) call BEName $BENAME
    explicitly after sourcing install_help.sh so the function is exercised
    and any pre-set value flows through correctly.

@mRrvz mRrvz changed the title install_help: add BEName() to allow configuring the boot environment … install_help: add BEName() to allow configuring the boot environment name Apr 27, 2026
…name

Add a BEName() function, modelled after RootPW(), that lets install
scripts or configuration profiles override the boot environment name
before installation begins.

- BENAME is initialised with ${BENAME:-omnios} so that a value set
  in an environment-specific defs.sh (sourced before install_help.sh)
  is preserved rather than overwritten.

- A companion flag BENAME_SET is cleared at module load and set by
  BEName(). Installer scripts append the OS version from /etc/release
  to the BE name only when BENAME_SET is unset, preserving the
  existing omnios-r151056t naming convention for default installs while
  allowing downstream distributions to supply a fully-formed name that
  is used as-is.

- BuildBE() and MakeBootable() default to $BENAME instead of the
  hardcoded string "omnios", so the PXE/network install path also
  honours the configured name.

- Installer scripts (dialog-install, rpool-install) call BEName $BENAME
  explicitly after sourcing install_help.sh so the function is exercised
  and any pre-set value flows through correctly.

Signed-off-by: Alexey Romanov <romanov.alexey2000@gmail.com>
@mRrvz
mRrvz force-pushed the feature/configurable-bename branch from 9a44a47 to feca54a Compare April 28, 2026 13:36
@mRrvz

mRrvz commented May 7, 2026

Copy link
Copy Markdown
Author

Hi guys! Gentle reminder.

Comment thread installer/dialog-install
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants