svc-create-first-boot - create a first boot service package
svc-create-first-boot [-s|--source <script_path>] [-d|--destination <p5ppath|repoURI>] [-o|--options <name=value>]... [-h |--help]
The svc-create-first-boot command is used to create a first boot service package. The first boot service package may be published to an existing repository or wrapped inside a p5p archive. The package may then be installed onto an AI client from the repository or the p5p archive during AI installation. The command allows you to customize the following:
The name of the first boot service
The services the first boot service depends on, called service dependencies
The start method time out in seconds which should be more than the execution time of the user provided script
The package name of the first boot service package
The publisher name in the P5P archive
The command runs interactively when no options are provided. While running in interactive mode you will be asked various questions. You can ensure the command uses only the defaults by hitting the return key when the questions are asked. The defaults are mentioned in square brackets when the questions are asked.
Interactive mode requires you to provide the path to the location of the first boot script to be included in the created package. This is a required input. When prompted for the destination, you need to provide the path to an existing repository (either local or remote, accessible via HTTP). Alternatively, you may provide the path to the location where you wish to store the p5p archive.
To run the command non-interactively, at least –s and –d option must be specified. A detailed description of the options and the arguments allowed in the command line mode is provided in the section that follows.
The following options are supported:
Display the command usage
Path to the script to be run on first boot
URI to an existing repository or path to where the p5p archive will be stored. file:, file:// prefix are supported for repository or p5p archive file. http:// prefix is supported only for repository URI
Name value pairs to customize different aspects of first boot service package
The names and their corresponding values supported are as follows:
The name of the first boot service which would run the first boot configuration script in the client. Any string of the form svc:/site/<service_name>:[<instance_name>] is supported. Default service-name is 'first-boot-svc'.
Refer to the timeout section of smf_method(7) man-page to configure this option. Default value is 60 seconds.
The services on which the first boot service would depend on.
The fmri of the first boot service package to be installed on the AI client. The value supported is any valid package fmri. Default package-fmri is 'first-boot-svc'.
The publisher name for the first boot service package. The value supported is any valid package publisher name prefix. Default publisher-name is 'firstboot'.
rerun-on-clone, which has a default value of true, controls whether the first boot script is run on every deployment of a clone archive/zone that contains this package. Note that, when the script reruns on clone systems/zones, it should be able to detect what has already been configured as a result of this being a cloned system/zone and behave accordingly. See archiveadm(8) for information on clone archives, and zoneadm(8) for information on zone cloning.
In case user does not customize dependencies, then default dependency svc:/milestone/multiuser will be added to first boot smf service.
# svc-create-first-boot Enter the path to the script to be run at first boot: Enter the path to an existing repository or the path to\ the desired location of the generated p5p archive: Enter the FMRI of the first boot service \ [svc:/site/first-boot-svc]: Customize dependencies [yes/No]: - No (retains the default milestone/multi-user) - yes (switches the default to milestone/config) Does your first boot service configure the network \ or require access to the network? [yes/No]: - yes (adds the milestone/network dependency) Does your first boot service need to look up non-local \ host or user names? [yes/No]: - yes (adds the milestone/name-services dependency) Does your first boot service need to access any file \ systems outside of the root file system? [yes/No]: - yes (adds the milestone/multi-user dependency) Enter any additional dependency [None]: Should your first boot script be rerun on cloned instance of installed client? [yes/No]: Enter the method script timeout in seconds : Enter the package name [first-boot-svc]: Enter the publisher name [firstboot]: Enter the URI to an existing repository or the path to the generated p5p archive :Example 2 Creating a first boot service package in command line mode
The following command creates the p5p archive for a first boot service package with the default names and default service dependencies.
svc-create-first-boot -s /home/myscript -d myp5p.p5pExample 3 Creating a first boot service package and publishing to an existing repository
The first boot service package can be published to a local or a non-local repository (via HTTP)
Local repository: svc-create-first-boot -s /home/myscript -d file:///export/repoSolaris11 svc-create-first-boot -s /home/myscript -d /export/repoSolaris11 Non-local repository: svc-create-first-boot -s ./myscript -d \ http://<host_name>:<port_no>Example 4 Creating a first boot service package with customizations provided using command line
svc-create-first-boot -s ./myscript -d ./myp5p.p5p \ -o service-name=svc:/site/svctrial \ -o service-dependency=milestone/network \ -o service-dependency=milestone/name-service \ -o package-fmri=svcpack -o package-publisher=svcpubExample 5 Creating a first boot service which will not rerun on cloned instance of the installed client
svc-create-first-boot -s /home/myscript -d myp5p.p5p \ -o rerun-on-clone=false
The following exit values are returned:
The command was processed successfully
Error in execution of the command
Invalid CLI option
See attributes(7) for descriptions of the following attributes: