May 15, 2018May 15, 2018 by Andrew Fore
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:
root@qa1jumpstart01:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F http://pkg.oracle.com/solaris/release/ root@qa1jumpstart01:~# 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:
root@qa1jumpstart01:~# 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.
root@qa1jumpstart01:~# pkg unset-publisher solaris Updating package cache 1/1 root@qa1jumpstart01:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION root@qa1jumpstart01:~# pkg set-publisher -g http:// solaris root@qa1jumpstart01:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F http:/// root@qa1jumpstart01:~# 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
Categories Solaris, Tips n TricksLeave a comment January 8, 2017March 17, 2015 by Andrew Fore
In my day job as a Systems Engineer I frequently find myself switching between different UNIX and Linux distributions. While many of the commands exist on both sides of the aisle, I often find vast differences in the command line parameters that can be consumed by a given command when used in, for example, Linux vs Solaris.
Recently I came upon this again with the need to easily ferret out the majority consumer of drive space on a Solaris 10 system. While we did have the xpg4 specification support available, the du command was still missing my favorite option “max-depth”.
In Linux I use this to limit the output to only the current directory level so that I don’t have to face to possibility of wading through a tremendously large listing of sub-directories to find the largest directory in the level I am in. Unfortunately, in Solaris, even with xpg4, the du command doesn’t have this option, so my solution was to pipe the results through egrep and use that to filter out the sub-directories.
Read moreSolaris Tip of the Week: a better du experience
Categories Linux, Solaris, Tips n Tricks, Uncategorized1 Comment