Skip to content

Commit

Permalink
Allow ONU be-name to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Feb 27, 2018
1 parent b10c51b commit acb6614
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions bin/omni
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,25 @@ onu_destroy()

onu_illumos()
{
case $1 in
-d)
pkgdir="$illumos_clone/packages/i386/nightly"
;;
-nd|"")
pkgdir="$illumos_clone/packages/i386/nightly-nd"
;;
*)
abort "Unknown argument ($1) to onu."
;;
esac
while [[ "$1" = -* ]]; do
case $1 in
-d)
pkgdir="$illumos_clone/packages/i386/nightly"
;;
-nd|"")
pkgdir="$illumos_clone/packages/i386/nightly-nd"
;;
*)
abort "Unknown argument ($1) to onu."
;;
esac
shift
done

[ -z "$1" ] && be="`date +%Y%m%d01`" || be="$1"

[ -d "$pkgdir" ] || abort "No built illumos packages found."

be="`date +%Y%m%d01`"
while beadm list -H | egrep -s "^${be}-onu;"; do
((be = be + 1))
done
Expand Down Expand Up @@ -960,7 +965,7 @@ Operations (defaults for optional arguments are shown in []):
build_media [URL] - build OmniOS install media (GZ only) (bm)
Defaults to using local repo if URL not provided.
onu [-d|-nd] - Create a new boot environment from the locally
onu [-d|-nd] [name] - Create a new boot environment from the locally
built copy of omnios-illumos. Non-debug packages
by default or as per provided option.
destroy_onu - Remove all ONU boot environments (do)
Expand Down

0 comments on commit acb6614

Please sign in to comment.