During the installation and setup of my new Solaris 11 Automated Installer host, I ran into a situation where even though I was specifying both the origin to remove AND the origin to add, the OS refused to allow me to perform both options in the same command. While you should be able do this, I ended up having to remove the default system configured publisher and then adding the new local IPS repository as the publisher.
This is what the default publisher was configured for:
[email protected]:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F http://pkg.oracle.com/solaris/release/ [email protected]:~# pkg publisher solaris Publisher: solaris Alias: Origin URI: http://pkg.oracle.com/solaris/release/ SSL Key: None SSL Cert: None Client UUID: Catalog Updated: October 6, 2015 02:41:00 PM Enabled: Yes
Here is the command that was part of the Oracle guide How to Get Started Customizing and Configuring Systems Using the Automated Installer in Oracle Solaris 11.1 which didn’t work for me:
[email protected]:~# pkg set-publisher –G '*' -g http://10.202.46.80 solaris pkg set-publisher: only one publisher name may be specified Usage: pkg set-publisher [-Ped] [-k ssl_key] [-c ssl_cert] [-g origin_to_add|--add-origin=origin_to_add ...] [-G origin_to_remove|--remove-origin=origin_to_remove ...] [-m mirror_to_add|--add-mirror=mirror_to_add ...] [-M mirror_to_remove|--remove-mirror=mirror_to_remove ...] [-p repo_uri] [--enable] [--disable] [--no-refresh] [--reset-uuid] [--non-sticky] [--sticky] [--search-after=publisher] [--search-before=publisher] [--search-first] [--approve-ca-cert=path_to_CA] [--revoke-ca-cert=hash_of_CA_to_revoke] [--unset-ca-cert=hash_of_CA_to_unset] [--set-property name_of_property=value] [--add-property-value name_of_property=value_to_add] [--remove-property-value name_of_property=value_to_remove] [--unset-property name_of_property_to_delete] [--proxy proxy to use] [publisher]
I tried several different variations of the one line command, however I was met with the same lack of success. In order to achieve the desired result where the local IPS repository was set up for publisher name solaris I had to do an unset of the existing repo and then a set to configure my new repo.
[email protected]:~# pkg unset-publisher solaris Updating package cache 1/1 [email protected]:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION [email protected]:~# pkg set-publisher -g http:// solaris [email protected]:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F http:/// [email protected]:~# pkg publisher solaris Publisher: solaris Alias: Origin URI: http:/// SSL Key: None SSL Cert: None Client UUID: Catalog Updated: October 6, 2015 07:45:07 PM Enabled: Yes