Validate Packages in Solaris 10

I previously posted in my useful comments entry how to validate rpm files on an rpm based Linux server using `rpm -Va` and then checking the output. So how do you do this on Solaris 10? It’s actually quite simple. Use the pgkchk command. If you want to check a specific package use:

pkgchk <package name>

If it doesn’t return anything that package is fine. If you want to make sure it is checking the files you can always use the -v parameter:

pkgchk -v <package name>

If you want to validate all of the packages on the system, don’t add any parameters (of course, you can always use -v here, but then you won’t be able to keep track of the errors.

pkgchk

Of course, just because something comes up doesn’t mean that you’ve been hacked or anything, just that someone or something has modified the particular file since it was installed. You will need to go through each of the files it finds and decide if that is normal or not for your own individual installation. You can also just check file attributes only (-a) or file content only (-c).

Note: Since all of the errors that pkgchk finds are sent to standard error, you need to make sure you redirect standard error to a file if you want to save the contents somewhere. So to save to a file you may want to run something like this:

pkgchk > /root/pkgchk.errors 2>&1

Follow up – How do you easily list what packages are installed on your system (rpm -qa)? With the pkginfo command without any parameters!

Configuring Nagios Plugins & NRPE on Solaris 10

Here’s a step by step installation of the Nagios plugin NRPE for Solaris 10 x86 (as the remote host):

useradd -c “nagios system user” -d /usr/local/nagios -m nagios
chown nagios:nagios /usr/local/nagios/
cd /usr/local/src # or wherever you like to put source code
wget http://internap.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
wget http://internap.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz
gunzip nagios-plugins-1.4.11.tar.gz
tar -xvf nagios-plugins-1.4.11.tar
gunzip nrpe-2.12.tar.gz
tar -xvf nrpe-2.12.tar

First we’ll compile the nagios plugins:

cd nagios-plugins-1.4.11
./configure
make
make install
chown -R nagios:nagios /usr/local/nagios/libexec
cd ..

Run a quick check to make sure the plugins are working:

/usr/local/nagios/libexec/check_disk -w 10 -c 5 -p /

Next, we’ll compile NRPE. Normally at this point we would just run `cd nrpe-2.12; ./configure`. Unfortunately, the configure script can not find the SSH headers and libraries on Solaris 10. You get errors like this:

checking for SSL headers… configure: error: Cannot find ssl headers

checking for SSL libraries… configure: error: Cannot find ssl libraries

The answer to this is, of course, to tell configure where to find them:

cd nrpe-2.12
./configure –with-ssl=/usr/sfw/ –with-ssl-lib=/usr/sfw/lib/

Currently there is a bug in 2.12 that it assumes that all systems have 2 syslog facilities that Solaris doesn’t have, so if you try and compile it generates the following errors:

nrpe.c: In function `get_log_facility’:
nrpe.c:617: error: `LOG_AUTHPRIV’ undeclared (first use in this function)
nrpe.c:617: error: (Each undeclared identifier is reported only once
nrpe.c:617: error: for each function it appears in.)
nrpe.c:619: error: `LOG_FTP’ undeclared (first use in this function)
*** Error code 1
make: Fatal error: Command failed for target `nrpe’
Current working directory /usr/local/src/nrpe-2.12/src
*** Error code 1
make: Fatal error: Command failed for target `all’

Unfortunately, the fix at this time is to comment out the code that calls these two facilities, lines 616-619, in src/nrpe.c:

/*else if(!strcmp(varvalue,”authpriv”))
log_facility=LOG_AUTHPRIV;
else if(!strcmp(varvalue,”ftp”))
log_facility=LOG_FTP;*/

UPDATE: You no longer need to comment out these lines, just replace them with the following:

else if(!strcmp(varvalue,”authpriv”))
log_facility=LOG_AUTH;
else if(!strcmp(varvalue,”ftp”))
log_facility=LOG_DAEMON;

Now it will compile:

# make all
cd ./src/; make ; cd ..
gcc -g -O2 -I/usr/sfw//include/openssl -I/usr/sfw//include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/usr/sfw/lib/ -lssl -lcrypto -lnsl -lsocket ./snprintf.o
gcc -g -O2 -I/usr/sfw//include/openssl -I/usr/sfw//include -DHAVE_CONFIG_H -o check_nrpe check_nrpe.c utils.c -L/usr/sfw/lib/ -lssl -lcrypto -lnsl -lsocket

*** Compile finished ***

Next install the new binaries:

# make install
cd ./src/ && make install
make install-plugin
.././install-sh -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
.././install-sh -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
make install-daemon
.././install-sh -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
.././install-sh -c -m 775 -o nagios -g nagios nrpe /usr/local/nagios/bin

Optionally, if you want to use the sample config file run (Recommended if you don’t already have a standard config):

# make install-daemon-config
./install-sh -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
./install-sh -c -m 644 -o nagios -g nagios sample-config/nrpe.cfg /usr/local/nagios/etc

Modify the nrpe.cfg file with your settings:

vi /usr/local/nagios/etc/nrpe.cfg

With Solaris 10, we don’t use either inetd or xinetd, but SMF. Thankfully, we can convert inetd entires into the SMF repository with the inetconv command. So first, add the following entry to /etc/services:

nrpe 5666/tcp # NRPE

Then add the following line to the end of /etc/inet/inetd.conf:

nrpe stream tcp nowait nagios /usr/sfw/sbin/tcpd /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -i

Next, we need to convert it to SMF:

# inetconv
nrpe -> /var/svc/manifest/network/nrpe-tcp.xml
Importing nrpe-tcp.xml …Done
# inetconv -e
svc:/network/nrpe/tcp:default enabled

Check to make sure it went online:

# svcs svc:/network/nrpe/tcp:default
STATE STIME FMRI
online 15:53:39 svc:/network/nrpe/tcp:default
# netstat -a | grep nrpe
*.nrpe *.* 0 0 49152 0 LISTEN

Check the default installed parameters:

# inetadm -l svc:/network/nrpe/tcp:default
SCOPE NAME=VALUE
name=”nrpe”
endpoint_type=”stream”
proto=”tcp”
isrpc=FALSE
wait=FALSE
exec=”/usr/sfw/sbin/tcpd -c /usr/local/nagios/etc/nrpe.cfg -i”
arg0=”/usr/local/nagios/bin/nrpe”
user=”nagios”
default bind_addr=””
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
default tcp_trace=FALSE
default tcp_wrappers=FALSE
default connection_backlog=10

Change it so that it uses tcp_wrappers:

# inetadm -m svc:/network/nrpe/tcp:default tcp_wrappers=TRUE

And check to make sure it took effect:

# inetadm -l svc:/network/nrpe/tcp:default
SCOPE NAME=VALUE
name=”nrpe”
endpoint_type=”stream”
proto=”tcp”
isrpc=FALSE
wait=FALSE
exec=”/usr/sfw/sbin/tcpd -c /usr/local/nagios/etc/nrpe.cfg -i”
arg0=”/usr/local/nagios/bin/nrpe”
user=”nagios”
default bind_addr=””
default bind_fail_max=-1
default bind_fail_interval=-1
default max_con_rate=-1
default max_copies=-1
default con_rate_offline=-1
default failrate_cnt=40
default failrate_interval=60
default inherit_env=TRUE
default tcp_trace=FALSE
tcp_wrappers=TRUE
default connection_backlog=10

Modify your hosts.allow and hosts.deny to only allow your nagios server access to the NRPE port. Note that tcpd always looks at hosts.allow first, so even though we specify that everyone is rejected in the hosts.deny file, the ip addresses specified in hots.allow are allowed.
/etc/hosts.allow:

nrpe: LOCAL, 10.0.0.45

/etc/hosts.deny:

nrpe: ALL

Finally, check to make sure you have everything installed correctly (should return version information):

/usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.12

Optionally, modify any firewalls between your nagios server and the remote host to allow port 5666.
Don’t forget to configure your nagios server to check your new service.

Registering Solaris 10 and updating patches from the command line (CLI)

All the mainstream Sun documentation on the Sun Connection or Update Manager expects the server to have a GUI, which I completely don’t understand. As a matter of fact, their whole installation process is just as backwards and assumes the same thing. They have a server package installation, and it installs GNOME, duh! Anyway, you do a custom install and check and uncheck all the little boxes and deal with all the dependency issues to install a normal server installation without a GUI. But then, you want to be able to update your server to the latest patch levels, but you don’t have a GUI to register your system. Well, I finally found the tech note that shows how to register from the command line. Here’s how you do it:

cp /usr/lib/breg/data/RegistrationProfile.properties /tmp
vi /tmp/ RegistrationProfile.properties

Fill in the appropriate settings, then run the following command:

# /usr/sbin/sconadm register -a -r /tmp/RegistrationProfile.properties
sconadm is running
Authenticating user …
finish registration!

Note: If you can’t find /usr/lib/breg/data/RegistrationProfile.properties, just create a file in /tmp with the following values: (since it has your Sun Online password in it, make sure you set the file permissions to 400)

userName=
password=
hostName=
subscriptionKey= (if you don’t include this you only get security updates)
portalEnabled=false
proxyHostName=
proxyPort=
proxyUserName=
proxyPassword=

Now you can update your system using the smpatch command which will download and install the updates for you:

# smpatch analyze
119253-24 SunOS 5.10_x86: System Administration Applications Patch
124631-15 SunOS 5.10_x86: System Administration Applications, Network, and Core Libraries Patch
121431-22 SunOS 5.8_x86 5.9_x86 5.10_x86: Live Upgrade Patch
119535-13 SunOS 5.10_x86: Flash Archive Patch
119255-52 SunOS 5.10_x86: Install and Patch Utilities Patch
125387-04 SunOS 5.10_x86: aac driver patch
119813-07 X11 6.6.2_x86: Freetype patch
127887-05 SunOS 5.10_x86: ipf patch
126267-01 SunOS 5.10_x86: ibd patch
126648-02 SunOS 5.10_x86: InfiniBand patch
128029-04 SunOS 5.10_x86: e1000g patch

# smpatch update
119253-24 has been validated.
124631-15 has been validated.
121431-22 has been validated.
119535-13 has been validated.
119255-52 has been validated.
125387-04 has been validated.
119813-07 has been validated.
127887-05 has been validated.
126267-01 has been validated.
126648-02 has been validated.
128029-04 has been validated.

Installing patches from /var/sadm/spool…
119253-24 has been applied.
124631-15 has been applied.
NOTICE: Patch 121431-22 cannot be installed because it is typed as “interactive” which is prohibited by policy.
119535-13 has been applied.
119255-52 has been applied.
NOTICE: Update 125387-04 cannot be applied at this time since it is typed as “single user” which is disallowed by installation policy.
NOTICE: Patch 125387-04 cannot be installed until the next system shutdown.
119813-07 has been applied.
NOTICE: Update 127887-05 cannot be applied at this time since it is typed as “reboot immediate” which is disallowed by installation policy.
NOTICE: Patch 127887-05 cannot be installed until the next system shutdown.
126267-01 has been applied.
126648-02 has been applied.
128029-04 has been applied.

ID’s of the updates that are disallowed by installation policy have been
written to file
/var/sadm/spool/disallowed_patch_list

One or more updates that you installed requires a system shutdown to activate it. To initiate the system shutdown, you must use one of the following commands:
o Drop to the firmware prompt – init 0 or shutdown -i 0
o Power down the system – init 5 or shutdown -i 5
o Restart the system – init 6 or shutdown -i 6

Reboot to install additional patches (obviously during a maintenance window):

# init 6

Here’s what you will see on the console during the reboot:

Patches on the console

Minimal install of Solaris 10

If you have ever tried to install an instance of Solaris 10 without using one of their default (and highly bloated) options, you know what a pain it is to end up with something you want. Here’s what I found to be usable on Solaris 10 8/07 (Note: I used another installation of CUPS, so you may want to keep the printing packages):

– Selecting cluster (SUNWCall)
– Deselecting package (SUNWsmbar)
– Deselecting package (SUNWsmbau)
– Deselecting package (SUNWsmbac)
– Deselecting package (SUNWjavaapps)
– Deselecting package (SUNWadmj)
– Deselecting package (SUNWapch2r)
– Deselecting package (SUNWapch2u)
– Deselecting package (SUNWapch2d)
– Deselecting package (SUNWapchr)
– Deselecting package (SUNWapchu)
– Deselecting package (SUNWapchd)
– Deselecting package (SUNWauda)
– Deselecting package (SUNWaudh)
– Deselecting package (SUNWaudf)
– Deselecting package (SUNWadixp)
– Deselecting package (SUNWvia823x)
– Deselecting package (SUNWaudiohd)
– Deselecting package (SUNWad810)
– Deselecting package (SUNWaudit)
– Deselecting package (SUNWbind)
– Deselecting package (SUNWbindr)
– Deselecting package (SUNWbsr)
– Deselecting package (SUNWbsu)
– Deselecting package (SUNWmkcd)
– Deselecting package (SUNWdtdem)
– Deselecting package (SUNWdtab)
– Deselecting package (SUNWdthed)
– Deselecting package (SUNWdtinc)
– Deselecting package (SUNWdtmad)
– Deselecting package (SUNWdtma)
– Deselecting package (SUNWdtmaz)
– Deselecting package (SUNWdtwm)
– Deselecting package (SUNWdtdst)
– Deselecting package (SUNWdtscm)
– Deselecting package (SUNWdthe)
– Deselecting package (SUNWdthev)
– Deselecting package (SUNWdticn)
– Deselecting package (SUNWdthez)
– Deselecting package (SUNWdtjxt)
– Deselecting package (SUNWpdas)
– Deselecting package (SUNWdtim)
– Deselecting package (SUNWdtezt)
– Deselecting package (SUNWscgui)
– Deselecting package (SUNWmfman)
– Deselecting package (SUNWdtbas)
– Deselecting package (SUNWdtdmr)
– Deselecting package (SUNWdtdmn)
– Deselecting package (SUNWdtdte)
– Deselecting package (SUNWdtlog)
– Deselecting package (SUNWdhcsr)
– Deselecting package (SUNWdhcsu)
– Deselecting package (SUNWdhcsb)
– Deselecting package (SUNWdhcm)
– Deselecting package (SUNWdvdrw)
– Deselecting package (SUNWevolution)
– Deselecting package (SUNWevolution-root)
– Deselecting package (SUNWevolution-share)
– Deselecting package (SUNWevolution-libs)
– Deselecting package (SUNWevolution-libs-share)
– Deselecting package (SUNWevolution-exchange)
– Deselecting package (SUNWevolution-exchange-root)
– Deselecting package (SUNWevolution-exchange-share)
– Deselecting package (SUNWgnutls)
– Deselecting package (SUNWlibgcrypt)
– Deselecting package (SUNWgnome-pilot)
– Deselecting package (SUNWgnome-pilot-root)
– Deselecting package (SUNWgnome-pilot-share)
– Deselecting package (SUNWevolution-socs-connect)
– Deselecting package (SUNWevolution-socs-connect-share)
– Deselecting package (SUNWevolution-devel)
– Deselecting package (SUNWevolution-devel-share)
– Deselecting package (SUNWevolution-libs-devel)
– Deselecting package (SUNWgnutls-devel)
– Deselecting package (SUNWlibgcrypt-devel)
– Deselecting package (SUNWgnome-pilot-devel)
– Deselecting package (SUNWgnome-pilot-devel-share)
– Deselecting package (SUNWftpr)
– Deselecting package (SUNWftpu)
– Deselecting package (SUNWfsexam)
– Deselecting package (SUNWfdl)
– Deselecting package (SUNWfsexam-root)
– Deselecting package (SUNWgnome-a11y-libs)
– Deselecting package (SUNWgnome-a11y-libs-share)
– Deselecting package (SUNWgnome-a11y-base-libs)
– Deselecting package (SUNWgnome-a11y-poke)
– Deselecting package (SUNWgnome-a11y-poke-share)
– Deselecting package (SUNWgnome-a11y-gok)
– Deselecting package (SUNWgnome-a11y-gok-root)
– Deselecting package (SUNWgnome-a11y-gok-share)
– Deselecting package (SUNWgnome-a11y-reader)
– Deselecting package (SUNWgnome-a11y-reader-root)
– Deselecting package (SUNWgnome-a11y-reader-share)
– Deselecting package (SUNWgnome-a11y-speech)
– Deselecting package (SUNWgnome-a11y-speech-share)
– Deselecting package (SUNWgnome-a11y-libs-devel)
– Deselecting package (SUNWgnome-a11y-libs-devel-share)
– Deselecting package (SUNWgnome-a11y-base-devel-share)
– Deselecting package (SUNWgnome-a11y-base-devel)
– Deselecting package (SUNWgnome-a11y-reader-devel)
– Deselecting package (SUNWgnome-a11y-speech-devel)
– Deselecting package (SUNWapoc-adapter-gconf)
– Deselecting package (SUNWgnome-cd-burner)
– Deselecting package (SUNWgnome-cd-burner-root)
– Deselecting package (SUNWgnome-cd-burner-share)
– Deselecting package (SUNWgnome-cd-root)
– Deselecting package (SUNWgnome-cd)
– Deselecting package (SUNWgnome-cd-share)
– Deselecting package (SUNWgnome-camera)
– Deselecting package (SUNWgnome-camera-share)
– Deselecting package (SUNWgnome-display-mgr)
– Deselecting package (SUNWgnome-display-mgr-root)
– Deselecting package (SUNWgnome-display-mgr-share)
– Deselecting package (SUNWgnome-img-editor)
– Deselecting package (SUNWgnome-img-editor-root)
– Deselecting package (SUNWgnome-img-editor-share)
– Deselecting package (SUNWgnome-jdshelp)
– Deselecting package (SUNWgnome-jdshelp-share)
– Deselecting package (SUNWgnome-media-player)
– Deselecting package (SUNWgnome-media-player-root)
– Deselecting package (SUNWgnome-media-player-share)
– Deselecting package (SUNWgnome-im-client)
– Deselecting package (SUNWgnome-im-client-share)
– Deselecting package (SUNWgnome-pdf-viewer)
– Deselecting package (SUNWgnome-pdf-viewer-root)
– Deselecting package (SUNWgnome-pdf-viewer-share)
– Deselecting package (SUNWgnome-perf-meter-root)
– Deselecting package (SUNWgnome-perf-meter)
– Deselecting package (SUNWgnome-perf-meter-share)
– Deselecting package (SUNWgnome-project)
– Deselecting package (SUNWgnome-project-share)
– Deselecting package (SUNWgnome-spell)
– Deselecting package (SUNWgnome-spell-share)
– Deselecting package (SUNWgnome-fonts)
– Deselecting package (SUNWgnome-archive-mgr-root)
– Deselecting package (SUNWgnome-archive-mgr)
– Deselecting package (SUNWgnome-archive-mgr-share)
– Deselecting package (SUNWgnome-calculator)
– Deselecting package (SUNWgnome-calculator-root)
– Deselecting package (SUNWgnome-calculator-share)
– Deselecting package (SUNWgnome-character-map)
– Deselecting package (SUNWgnome-character-map-share)
– Deselecting package (SUNWgnome-config-editor)
– Deselecting package (SUNWgnome-config-editor-share)
– Deselecting package (SUNWgnome-dictionary)
– Deselecting package (SUNWgnome-dictionary-root)
– Deselecting package (SUNWgnome-dictionary-share)
– Deselecting package (SUNWgnome-search-tool-root)
– Deselecting package (SUNWgnome-dialog)
– Deselecting package (SUNWgnome-dialog-share)
– Deselecting package (SUNWgnome-hex-editor-devel)
– Deselecting package (SUNWgnome-hex-editor-root)
– Deselecting package (SUNWgnome-hex-editor)
– Deselecting package (SUNWgnome-hex-editor-share)
– Deselecting package (SUNWgnome-img-viewer-root)
– Deselecting package (SUNWgnome-img-viewer)
– Deselecting package (SUNWgnome-img-viewer-share)
– Deselecting package (SUNWgnome-internet-applets-root)
– Deselecting package (SUNWgnome-internet-applets)
– Deselecting package (SUNWgnome-internet-applets-share)
– Deselecting package (SUNWgnome-intranet-applets-root)
– Deselecting package (SUNWgnome-intranet-applets)
– Deselecting package (SUNWgnome-intranet-applets-share)
– Deselecting package (SUNWgnome-mm-applets-root)
– Deselecting package (SUNWgnome-mm-applets)
– Deselecting package (SUNWgnome-mm-applets-share)
– Deselecting package (SUNWgnome-utility-applets-root)
– Deselecting package (SUNWgnome-utility-applets)
– Deselecting package (SUNWgnome-utility-applets-share)
– Deselecting package (SUNWgnome-ps-viewer-root)
– Deselecting package (SUNWgnome-ps-viewer)
– Deselecting package (SUNWgnome-ps-viewer-share)
– Deselecting package (SUNWgnome-sound-recorder-root)
– Deselecting package (SUNWgnome-sound-recorder)
– Deselecting package (SUNWgnome-sound-recorder-share)
– Deselecting package (SUNWgnome-media-root)
– Deselecting package (SUNWgnome-media-share)
– Deselecting package (SUNWgnome-media)
– Deselecting package (SUNWgnome-sys-suspend)
– Deselecting package (SUNWgnome-sys-suspend-share)
– Deselecting package (SUNWgnome-terminal-root)
– Deselecting package (SUNWgnome-terminal)
– Deselecting package (SUNWgnome-terminal-share)
– Deselecting package (SUNWgnome-text-editor-root)
– Deselecting package (SUNWgnome-text-editor)
– Deselecting package (SUNWgnome-text-editor-share)
– Deselecting package (SUNWaspell)
– Deselecting package (SUNWaspell-en)
– Deselecting package (SUNWaspell-en-share)
– Deselecting package (SUNWaspell-share)
– Deselecting package (SUNWgnome-base-libs-root)
– Deselecting package (SUNWgnome-base-libs)
– Deselecting package (SUNWgnome-base-libs-share)
– Deselecting package (SUNWogg-vorbis)
– Deselecting package (SUNWlibpopt)
– Deselecting package (SUNWlibexif)
– Deselecting package (SUNWgnome-text-editor-devel)
– Deselecting package (SUNWgnome-component-devel)
– Deselecting package (SUNWgnome-component-devel-share)
– Deselecting package (SUNWgnome-camera-devel)
– Deselecting package (SUNWgnome-img-editor-devel)
– Deselecting package (SUNWgnome-img-editor-devel-share)
– Deselecting package (SUNWgnome-project-devel)
– Deselecting package (SUNWgnome-project-devel-share)
– Deselecting package (SUNWgnome-ui-designer-share)
– Deselecting package (SUNWgnome-ui-designer)
– Deselecting package (SUNWgnome-vfs-devel)
– Deselecting package (SUNWgnome-vfs-devel-share)
– Deselecting package (SUNWgnome-audio-devel-share)
– Deselecting package (SUNWgnome-audio-devel)
– Deselecting package (SUNWgnome-libs-devel)
– Deselecting package (SUNWgnome-libs-devel-share)
– Deselecting package (SUNWgnome-config-devel)
– Deselecting package (SUNWgnome-config-devel-share)
– Deselecting package (SUNWgnome-desktop-prefs-devel)
– Deselecting package (SUNWgnome-panel-devel)
– Deselecting package (SUNWgnome-panel-devel-share)
– Deselecting package (SUNWgnome-print-devel)
– Deselecting package (SUNWgnome-print-devel-share)
– Deselecting package (SUNWgnome-media-devel-share)
– Deselecting package (SUNWgnome-media-devel)
– Deselecting package (SUNWgnome-terminal-devel)
– Deselecting package (SUNWgnome-terminal-devel-share)
– Deselecting package (SUNWgnome-wm-devel)
– Deselecting package (SUNWgnome-file-mgr-devel)
– Deselecting package (SUNWgnome-games)
– Deselecting package (SUNWgnome-games-root)
– Deselecting package (SUNWgnome-games-share)
– Deselecting package (SUNWgnome-fun-applets-root)
– Deselecting package (SUNWgnome-fun-applets)
– Deselecting package (SUNWgnome-fun-applets-share)
– Deselecting package (SUNWaspell-devel)
– Deselecting package (SUNWopenjade)
– Deselecting package (SUNWopenjade-devel)
– Deselecting package (SUNWopenjade-root)
– Deselecting package (SUNWopenjade-share)
– Deselecting package (SUNWgnome-base-libs-devel-share)
– Deselecting package (SUNWgnome-base-libs-devel)
– Deselecting package (SUNWgnome-common-devel)
– Deselecting package (SUNWgnome-common-devel-share)
– Deselecting package (SUNWogg-vorbis-devel-share)
– Deselecting package (SUNWogg-vorbis-devel)
– Deselecting package (SUNWopensp)
– Deselecting package (SUNWopensp-devel)
– Deselecting package (SUNWopensp-root)
– Deselecting package (SUNWopensp-share)
– Deselecting package (SUNWPython-devel)
– Deselecting package (SUNWperl-xml-parser)
– Deselecting package (SUNWperl-xml-parser-devel-share)
– Deselecting package (SUNWlibpopt-devel)
– Deselecting package (SUNWlibpopt-devel-share)
– Deselecting package (SUNWlibexif-devel)
– Deselecting package (SUNWgnome-component-root)
– Deselecting package (SUNWgnome-component)
– Deselecting package (SUNWgnome-vfs-root)
– Deselecting package (SUNWgnome-vfs)
– Deselecting package (SUNWgnome-vfs-share)
– Deselecting package (SUNWgnome-xml-root)
– Deselecting package (SUNWgnome-xml-share)
– Deselecting package (SUNWgnome-audio-share)
– Deselecting package (SUNWgnome-audio-root)
– Deselecting package (SUNWgnome-audio)
– Deselecting package (SUNWgnome-config-root)
– Deselecting package (SUNWgnome-config)
– Deselecting package (SUNWgnome-config-share)
– Deselecting package (SUNWgnome-desktop-prefs-root)
– Deselecting package (SUNWgnome-desktop-prefs)
– Deselecting package (SUNWgnome-desktop-prefs-share)
– Deselecting package (SUNWgnome-search-tool)
– Deselecting package (SUNWgnome-search-tool-share)
– Deselecting package (SUNWgnome-freedb-libs-root)
– Deselecting package (SUNWgnome-freedb-libs)
– Deselecting package (SUNWgnome-freedb-libs-share)
– Deselecting package (SUNWgnome-help-viewer)
– Deselecting package (SUNWgnome-help-viewer-share)
– Deselecting package (SUNWgnome-libs-root)
– Deselecting package (SUNWgnome-libs)
– Deselecting package (SUNWgnome-libs-share)
– Deselecting package (SUNWgnome-panel-root)
– Deselecting package (SUNWgnome-panel)
– Deselecting package (SUNWgnome-panel-share)
– Deselecting package (SUNWgnome-print-root)
– Deselecting package (SUNWgnome-print)
– Deselecting package (SUNWgnome-print-share)
– Deselecting package (SUNWgnome-removable-media)
– Deselecting package (SUNWgnome-removable-media-share)
– Deselecting package (SUNWgnome-session-root)
– Deselecting package (SUNWgnome-session)
– Deselecting package (SUNWgnome-session-share)
– Deselecting package (SUNWgnome-themes-share)
– Deselecting package (SUNWgnome-themes)
– Deselecting package (SUNWgnome-user-docs)
– Deselecting package (SUNWgnome-wm-root)
– Deselecting package (SUNWgnome-wm)
– Deselecting package (SUNWgnome-wm-share)
– Deselecting package (SUNWgnome-file-mgr-root)
– Deselecting package (SUNWgnome-file-mgr)
– Deselecting package (SUNWgnome-file-mgr-share)
– Deselecting package (SUNWPython-share)
– Deselecting package (SUNWPython)
– Deselecting package (SUNWgnome-dtlogin-integration)
– Deselecting package (SUNWGtkr)
– Deselecting package (SUNWGtku)
– Deselecting package (SUNWxilh)
– Deselecting package (SUNWscsa1394)
– Deselecting package (SUNWav1394)
– Deselecting package (SUNWfwdc)
– Deselecting package (SUNWipplu)
– Deselecting package (SUNWipplr)
– Deselecting package (SUNWj3irt)
– Deselecting package (SUNWjmfmp3)
– Deselecting package (SUNWant)
– Deselecting package (SUNWjaf)
– Deselecting package (SUNWjai)
– Deselecting package (SUNWjai-imageio)
– Deselecting package (SUNWjdsrm)
– Deselecting package (SUNWjmail)
– Deselecting package (SUNWjmf)
– Deselecting package (SUNWjre-config)
– Deselecting package (SUNWjre-config-plugin)
– Deselecting package (SUNWjsnmp)
– Deselecting package (SUNWj3dmo)
– Deselecting package (SUNWj3dev)
– Deselecting package (SUNWj3man)
– Deselecting package (SUNWj5dmo)
– Deselecting package (SUNWj5dev)
– Deselecting package (SUNWj5cfg)
– Deselecting package (SUNWj5man)
– Deselecting package (SUNWjhdem)
– Deselecting package (SUNWjhdev)
– Deselecting package (SUNWjhdoc)
– Deselecting package (SUNWjhrt)
– Deselecting package (SUNWj3cfg)
– Deselecting package (SUNWj5dmx)
– Deselecting package (SUNWj5dvx)
– Deselecting package (SUNWj5rtx)
– Deselecting package (SUNWpsm-lpd)
– Deselecting package (SUNWpapi)
– Deselecting package (SUNWimagick)
– Deselecting package (SUNWippcore)
– Deselecting package (SUNWlpmsg)
– Deselecting package (SUNWpsf)
– Deselecting package (SUNWpcr)
– Deselecting package (SUNWpcu)
– Deselecting package (SUNWpsr)
– Deselecting package (SUNWpsu)
– Deselecting package (SUNWppm)
– Deselecting package (SUNWa2psr)
– Deselecting package (SUNWa2psu)
– Deselecting package (SUNWffiltersr)
– Deselecting package (SUNWffiltersu)
– Deselecting package (SUNWfppd)
– Deselecting package (SUNWgimpprint)
– Deselecting package (SUNWhpijs)
– Deselecting package (SUNWpsutils)
– Deselecting package (SUNWmp)
– Deselecting package (SUNWmipr)
– Deselecting package (SUNWmipu)
– Deselecting package (SUNWmfdev)
– Deselecting package (SUNWflash-player-plugin)
– Deselecting package (SUNWmozilla)
– Deselecting package (SUNWmozapoc-adapter)
– Deselecting package (SUNWmozchat)
– Deselecting package (SUNWmozdom-inspector)
– Deselecting package (SUNWmozgm)
– Deselecting package (SUNWmozjs-debugger)
– Deselecting package (SUNWmozmail)
– Deselecting package (SUNWmoznspr)
– Deselecting package (SUNWmoznss)
– Deselecting package (SUNWmozpsm)
– Deselecting package (SUNWmozspell)
– Deselecting package (SUNWrealplayer)
– Deselecting package (SUNWmozilla-devel)
– Deselecting package (SUNWmoznspr-devel)
– Deselecting package (SUNWmoznss-devel)
– Deselecting package (SUNWncft)
– Deselecting package (SUNWprd)
– Deselecting package (SUNWtlsd)
– Deselecting package (SUNWosdem)
– Deselecting package (SUNWocfd)
– Deselecting package (SUNWocfh)
– Deselecting package (SUNWsfwdemo)
– Deselecting package (SUNWsfwhea)
– Deselecting package (SUNWolrte)
– Deselecting package (SUNWpcelx)
– Deselecting package (SUNWpsdpr)
– Deselecting package (SUNWpcmci)
– Deselecting package (SUNWpcmcu)
– Deselecting package (SUNWpcmem)
– Deselecting package (SUNWpcser)
– Deselecting package (SUNWpng)
– Deselecting package (SUNWpng-devel)
– Deselecting package (SUNWpng-devel-share)
– Deselecting package (SUNWpostgr-tcl)
– Deselecting package (SUNWpostgr-contrib)
– Deselecting package (SUNWpostgr-docs)
– Deselecting package (SUNWpostgr-jdbc)
– Deselecting package (SUNWpostgr)
– Deselecting package (SUNWpostgr-server-data)
– Deselecting package (SUNWpostgr-server)
– Deselecting package (SUNWpostgr-libs)
– Deselecting package (SUNWpostgr-82-jdbc)
– Deselecting package (SUNWpostgr-82-libs)
– Deselecting package (SUNWpostgr-82-client)
– Deselecting package (SUNWpostgr-82-contrib)
– Deselecting package (SUNWpostgr-82-server)
– Deselecting package (SUNWpostgr-82-server-data-root)
– Deselecting package (SUNWpostgr-82-docs)
– Deselecting package (SUNWpostgr-82-tcl)
– Deselecting package (SUNWpostgr-82-pl)
– Deselecting package (SUNWpostgr-82-devel)
– Deselecting package (SUNWpostgr-devel)
– Deselecting package (SUNWpostgr-pl)
– Deselecting package (SUNWpmowm)
– Deselecting package (SUNWpmowr)
– Deselecting package (SUNWpmowu)
– Deselecting package (SUNWctlu)
– Deselecting package (SUNWrmwbr)
– Deselecting package (SUNWrmwbu)
– Deselecting package (SUNWrmui)
– Deselecting package (SUNWfirefox)
– Deselecting package (SUNWfirefox-apoc-adapter)
– Deselecting package (SUNWthunderbird)
– Deselecting package (SUNWfirefox-devel)
– Deselecting package (SUNWmddr)
– Deselecting package (SUNWsndmu)
– Deselecting package (SUNWsndmr)
– Deselecting package (SUNWserr)
– Deselecting package (SUNWseru)
– Deselecting package (SUNWserweb)
– Deselecting package (SUNWmysqlr)
– Deselecting package (SUNWmysqlt)
– Deselecting package (SUNWmysqlu)
– Deselecting package (SUNWdmgtu)
– Deselecting package (SUNWdmgtr)
– Deselecting package (SUNWfsmgtr)
– Deselecting package (SUNWfsmgtu)
– Deselecting package (SUNWdclnt)
– Deselecting package (SUNWmga)
– Deselecting package (SUNWpmgr)
– Deselecting package (SUNWmcc)
– Deselecting package (SUNWmccom)
– Deselecting package (SUNWmc)
– Deselecting package (SUNWwbmc)
– Deselecting package (SUNWmcdev)
– Deselecting package (SUNWmcex)
– Deselecting package (SUNWlvmr)
– Deselecting package (SUNWlvma)
– Deselecting package (SUNWlvmg)
– Deselecting package (SUNWscplp)
– Deselecting package (SUNWsogm)
– Deselecting package (SUNWsom)
– Deselecting package (SUNW1394)
– Deselecting package (SUNW1394h)
– Deselecting package (SUNWfwdcu)
– Deselecting package (SUNWglow)
– Deselecting package (SUNWapcj)
– Deselecting package (SUNWapoc)
– Deselecting package (SUNWapmsc)
– Deselecting package (SUNWapdc)
– Deselecting package (SUNWapbas)
– Deselecting package (SUNWapdc-root)
– Deselecting package (SUNWasjavadb)
– Deselecting package (SUNWascmn)
– Deselecting package (SUNWasr)
– Deselecting package (SUNWasu)
– Deselecting package (SUNWasac)
– Deselecting package (SUNWasdem)
– Deselecting package (SUNWasjdoc)
– Deselecting package (SUNWasman)
– Deselecting package (SUNWasut)
– Deselecting package (SUNWiqu)
– Deselecting package (SUNWiquc)
– Deselecting package (SUNWiqjx)
– Deselecting package (SUNWiqum)
– Deselecting package (SUNWiqfs)
– Deselecting package (SUNWiqdoc)
– Deselecting package (SUNWiqr)
– Deselecting package (SUNWswupcl)
– Deselecting package (SUNWswupclr)
– Deselecting package (SUNWmcos)
– Deselecting package (SUNWmcosx)
– Deselecting package (SUNWjato)
– Deselecting package (SUNWjatodmo)
– Deselecting package (SUNWjatodoc)
– Deselecting package (SUNWmcon)
– Deselecting package (SUNWmconr)
– Deselecting package (SUNWmctag)
– Deselecting package (SUNWlxml-python)
– Deselecting package (SUNWlxsl-python)
– Deselecting package (SUNWtcatu)
– Deselecting package (SUNWtcatr)
– Deselecting package (SUNWtltkm)
– Deselecting package (SUNWtltk)
– Deselecting package (SUNWtltkd)
– Deselecting package (SUNWjdsver)
– Deselecting package (SUNWwbpro)
– Deselecting package (SUNWwbdev)
– Deselecting package (SUNWwbdoc)
– Deselecting package (SUNWwbapi)
– Deselecting package (SUNWmgapp)
– Deselecting package (SUNWwbcor)
– Deselecting package (SUNWwbcou)
– Deselecting package (SUNWwebminr)
– Deselecting package (SUNWwebminu)
– Deselecting package (SUNWxwssu)
– Deselecting package (SUNWxwpls)
– Deselecting package (SUNWxwscf)
– Deselecting package (SUNWxwfa)
– Deselecting package (SUNWxwdem)
– Deselecting package (SUNWxf86)
– Deselecting package (SUNWxwsvr)
– Deselecting package (SUNWxscreensaver-hacks-gl)
– Deselecting package (SUNWxscreensaver-hacks)
– Deselecting package (SUNWzfsgr)
– Deselecting package (SUNWzfsgu)
– Deselecting package (SUNWdtct)
– Deselecting package (SUNWgscr)
– Deselecting package (SUNWjpg)
– Deselecting package (SUNWjpg-devel)
– Deselecting package (SUNWjpg-devel-share)
– Deselecting package (SUNWpltlk)
– Deselecting package (SUNWcdrw)

vi – changing case

As most system administrators, I use the vi text editor a ton in my job. So I am familiar with all the common commands you can run. Today I was wondering if it was possible to change lower case to upper case letters and the opposite, from upper case to lower case letters.

Here’s how you do it:

change all lower case to upper case (CAPITAL LETTERS):

:%s/^.*$/U&/g

change all upper case to lower case (small letters):

:%s/^.*$/L&/g

Of course, the % is the entire document, the s///g is search and replace the entire line, ^.*$ matches everything, and the important part L& converts to lower case and U& converts to upper case.