1 .\" " CDDL HEADER START
   2 .\" "
   3 .\" " The contents of this file are subject to the terms of the
   4 .\" " Common Development and Distribution License (the "License").
   5 .\" " You may not use this file except in compliance with the License.
   6 .\" "
   7 .\" " You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   8 .\" " or http://www.opensolaris.org/os/licensing.
   9 .\" " See the License for the specific language governing permissions
  10 .\" " and limitations under the License.
  11 .\" "
  12 .\" " When distributing Covered Code, include this CDDL HEADER in each
  13 .\" " file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14 .\" " If applicable, add the following below this CDDL HEADER, with the
  15 .\" " fields enclosed by brackets "[]" replaced with your own identifying
  16 .\" " information: Portions Copyright [yyyy] [name of copyright owner]
  17 .\" "
  18 .\" " CDDL HEADER END
  19 .\" "
  20 .\" "Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  21 .\" "Copyright 2010, Richard Lowe
  22 .\" "Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
  23 .\" "
  24 .TH ONU 1ONBLD "Nov 7, 2016"
  25 .SH NAME
  26 .I onu
  27 \- OS/Net Update
  28 .SH SYNOPSIS
  29 \fBonu [opts] [-s <beName>] -t <beName>\fP
  30 .br
  31 \fBonu [opts] -r\fP
  32 .SH DESCRIPTION
  33 .LP
  34 .I onu
  35 is a replacement for
  36 .I bfu
  37 used to update a system with the latest set of IPS packages for the ON
  38 (OS/Net) consolidation of Solaris, using beadm(1M) to create a new Boot
  39 Environment (BE) and pkg(1) to update the image.
  40 .SH OPTIONS
  41 .LP
  42 The following global options are supported:
  43 .TP 4
  44 .B \-c <consolidation>
  45 Specifies the consolidation being installed via
  46 .IR onu ,
  47 used to locate the publisher from which that consolidation is currently
  48 installed.  This is almost always "osnet".
  49 .TP 4
  50 .B \-d <dir>
  51 Specifies that <dir> contains the repo.redist sub-directory;
  52 .I onu
  53 will run a depot using this packaging repository.
  54 Note that -d ignores -u and -U as well
  55 as the environment variables used by those options.
  56 .TP 4
  57 .B \-u <URI>
  58 Specifies that <URI> should be used as the origin URI for the publisher
  59 packaging repository.  See \fBONURI\fP below for default values.
  60 .TP 4
  61 .B \-U <publisher>
  62 Specifies that <publisher> should be used as the publisher name for
  63 the packaging repository.  See \fBONPUB\fP below for default values.
  64 .TP 4
  65 .B \-v
  66 Verbose mode.
  67 .LP
  68 The first form of onu creates a new BE and then updates it, and takes
  69 the following options:
  70 .TP 4
  71 .B \-s <beName>
  72 Specifies that <beName> should be used as the source Boot Environment to
  73 clone.  The default is the active BE.
  74 .TP 4
  75 .B \-t <beName>
  76 Specifies the target BE name.  This argument is required; there
  77 is no default value.
  78 .TP 4
  79 .B \-Z
  80 Do not update any installed zones.
  81 .LP
  82 The second form of onu takes the following option:
  83 .TP 4
  84 .B \-r
  85 In the current BE configure the requested publisher appropriately, without
  86 updating.
  87 .SH EXIT STATUS
  88 .LP
  89 The following exit values are returned:
  90 .TP 4
  91 .B 0
  92 The command completed successfully.
  93 No errors or warnings were reported.
  94 .TP 4
  95 .B 1
  96 Incorrect usage.
  97 .TP 4
  98 .B 2
  99 One of the commands used by the script failed.
 100 .SH NOTES
 101 .LP
 102 Distributions which segment certain system directories onto separate, child
 103 datasets (e.g., /var for openindiana Text Install) must run
 104 .B beadm unmount <new beName>
 105 after running onu or else the child dataset will not mount at the correct
 106 location after reboot.
 107 .LP
 108 Former users of bfu should note the following ways in which onu behaves
 109 differently from bfu.  First, as noted above, onu creates a new BE, rather
 110 than updating an existing BE in-place.  Second, onu will not install packages
 111 that are older than what is already installed in the source BE.  Third,
 112 conflicts in system configuration files are automatically resolved according
 113 to the files' "preserve" attribute, as described in pkg(5).
 114 .LP
 115 If the
 116 .B -d
 117 option is given to specify a repository directory, the new
 118 publishers will not be available in the new BE. This can prevent correct
 119 zone installs or cause issues with installing additional packages
 120 sourced from the ON repositories. In both cases, the \fB-r\fR option
 121 can be used in the new BE to re-enable the publishers. See
 122 \fBEXAMPLES\fR.
 123 .LP
 124 Use of
 125 .I onu
 126 will prevent use of zone attach for ipkg-brand zones in the new BE,
 127 since the
 128 .B entire
 129 incorporation is removed.
 130 .LP
 131 By default,
 132 .I onu
 133 will attempt to update any ipkg-brand installed zones on the system; the
 134 .B -Z
 135 option may be used to disable this behavior.
 136 .SH EXAMPLES
 137 .LP
 138 \fBExample 1\fR Installing latest ON nightly build
 139 .LP
 140 # onu -t new-nightly-be
 141 .LP
 142 \fBExample 2\fR Installing an ON build from a directory
 143 .LP
 144 # onu -d /path/to/my/ws/packages/`uname -p`/nightly -t new-nightly-be
 145 .LP
 146 \fBExample 3\fR Installing additional packages in the new BE
 147 .LP
 148 # onu -d /path/to/my/ws/packages/`uname -p`/nightly -t new-nightly-be
 149 .br
 150 # reboot
 151 .br
 152 # onu -r -d /path/to/my/ws/packages/`uname -p`/nightly
 153 .br
 154 # pkg install netcat
 155 .br
 156 #
 157 .SH ENVIRONMENT
 158 .LP
 159 ONURI
 160 .IP
 161 If the -u option is not provided, and this variable is set, it will be used
 162 as the origin URI for the publisher packaging repository.  If -u is not
 163 provided and this variable is not set, http://ipkg.sfbay/on-nightly will
 164 be used.
 165 .LP
 166 ONPUB
 167 .IP
 168 If the -U option is not provided, and this variable is set, it will be
 169 used as the publisher name for the packaging repository.  If -U is not
 170 provided and this variable is not set, on-nightly will be used.
 171 .SH SEE ALSO
 172 .BR beadm "(1M), "
 173 .BR pkg "(1), "
 174 .BR pkg "(5) "