This page is the top level of my Solaris site. [There is also a
mirror site available]
At this level, you can find architecture-neutral Solaris hints and scripts.
Also available:
Table of Contents
Outside links
I maintain a page with critical information and tools written by other
people. Everything else on bolthole.com is written by me, Philip Brown.
Sunscreen GUI
For years now, sun has had a robust firewall product, with a lousy GUI.
It seems sun is planning to keep the product, and integrate it with the
OS... but not improve the GUI?!?!?!
So, that has lead me to try to write
an improved standalone GUI for sunscreen.
Help on it is welcomed.
Informational documents
Informational in-line quickies...
- To turn off CD (auto-run,volstart, auto-irritation) globally,
you can either do
chmod 0444 /usr/dt/bin/sdtvolcheck
, or create a
/etc/dt/config/sessionetc
file that does nothing. (since
/usr/dt/config/sessionetc seems to do nothing except start sdtvolcheck)
- To share a terminal between multiple users, you can use "GNU screen",
as follows:
user1$ screen
user1$ (screen-escape):multiuser on
user1$ (screen-escape):acladd user2
user2$ screen -x user1
If you are only sharing with yourself, you dont have to do the escape
stuff.
See also this page on
screen multiuser mode. It has lots of extra info. Such as, you may have
to make your screen executable setuid root for multiuser mode to work with
others.
- Put
set md:mirrored_root_flag=1
in /etc/system,
if using ODS4.2.1 or later, and you have mirrored root disks and
only two controllers. This forces allowing boot with "only" 50%
metadbs available.
- If you want an "#ifdef solaris", the portable way is
#if defined (__SVR4) && defined (__sun)
This should work on gcc, sun cc, and lots o other compilers, on both sparc
and intel.
If for some reason, you want to know that Sun forte CC (c++) compiler
is being used, something that seems to work is
#if defined(__SUNPRO_CC)
Whereas for forte cc (regular C), you can use
#if defined(__SUNPRO_C)
- Use "gcc -Wall -O -Wno-unknown-pragmas" if you want a 'lint' type
level of warnings while you compile. The pragmas bit is to stop
warning about suns stupid pragmas in X headers.
-
perl -MCPAN -e 'install Bundle::libnet'
- alias man='GROFF_NO_SGR= TCAT="less -s" TROFF="groff -Tascii" man
-t'
Also useful may be "groff -m doc -Tascii -P cuob"
- Put "BROWSER=netscape6; export BROWSER" in $HOME/.dtprofile (or
=mozilla if you prefer)
- If netscape or mozilla mail client does not remove a message from
view after clicking delete, then edit your preferences file, and
change 'delete_model' from 0 to 1.
- If you dont have the file already, drop
xterm-color in
/usr/share/lib/terminfo/x/xterm-color. Then when/if you use
a color-supporting xterm, you will be able to correctly set
TERM=xterm-color and actually have it work properly.
(This actually works better for dtterm color than its own "dtterm" TERM
setting?!!)
- "/bin/priocntl -e -c FX -m 0 -p 0 /path/to/prog"
This will start a program (such as a browser) to be at a low priority,
so as to not hog your machine if it goes wild.
- Putting
ssd_max_xfer_size=0x800000;
at the bottom of /kernel/drv/ssd.conf, will increase your fibre-channel
disk large I/O throughput, where ye olde maxphys no longer seems to have
any effect.
- Allow a non-root user to run a web server on port 80 in solaris 10:
usermod -K defaultpriv=basic,net_privaddr SomeUser
. Note that
this will technically allow SomeUser the ability to run things on ANY
port. It removes the "only root can use ports less than 1024"
restriction for that user.
SCCS related scripts and tips
- A tutorial on korn shell, a portable
shell for shellscripts.
- NEdit SCCS macros, to make the development
cycle easier.
- sccslntree script
- "frz" and "unfrz". Scripts to
take checkpoints, or "freezepoints", of SCCS-controlled files. They save
and restore revision numbers of the file(s). Unfortunately, only in the
current directory, for right now.
Portable scripts that run on sparc AND intel
- configppp.sh automates PPP dialout to an
ISP
- configdns.sh automates setting up a caching
DNS server
- sendmail.txt is a sample sendmail m4 config
for your domain or subdomain
- syscheck.ksh is a tunable systems health
check script you can put in cron, to email you if you are running out
of resources
- metatree.sh gives you an indented text representation of
SDS metadevices
- patchcompare can be put in an NFS-shared
directory filled with patch directories. Running it will show you
which patches are missing on a machine, but ignore patches that
are for packages that are not present on the machine.
- patchupdate works in conjunction with
patchcompare, to install only the patches that are needed on a machine.
Note that you must have an up-to-date patch_order file in the
directory for it to work.
- randomsleep is a quickie ksh utility that
sleeps for a random amount of time. Useful if you have a whole bunch
of machines that usually do things at the same time, and you'd like
them a little less synchronized
- netlp is a wrapper to replace /bin/lp, lpsched,
cups, and the whole ludicriously complicated layercake standing between
you and a networked postscript printer. It condenses /bin/lp, and
"netstandard", into a short script to directly call netpr and dump a
postscript file to a reasonably intelligent networked printer. Set dest
with -d, or LPDEST or PRINTER vars. Requires /usr/lib/lp/bin/netpr.
- update.netgroup.sh Updates an LDAP
netgroup map, from a NIS map, with the help of the
PADL LDAP Migration tools
quotecheck.y isnt a script, but it IS a
portable way to find mismatched quotes in a shellscript. Read the file for
directions on how to compile this lex program.
Fun with packaging
Speaking of packaging, if you ever need to extract something from an RPM
package (Like from a source RPM, an "RPMS"), you can use the following:
rpm2cpio file.rpm |cpio -ivd
This will extract the files into the current directory
Solaris Driver Developer resources
This information is now in its own area of my site,
the
driver section
PS:If you're looking to hire an after-hours solaris consultant in the
greater Los Angeles area, you can
look at my
resume :-)