Solaris hints
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.
Informational documents
Informational in-line quickies...
- To turn a solaris 9 "cd 1 of 1" into two mountable filesystems, do the
following:
mkdir /mnt/s0 /mnt/s1
lofiadm -a cd1.iso
mount -o ro -F hsfs /dev/lofi/1 /mnt/s0
df -k /mnt/s0
dd if=cd1.iso of=/tmp/cd1.s1.img bs=1k iseek=(number of blocks from df)
lofiadm -a /tmp/cd1.s1.img
mount /dev/lofi/2 /mnt/s1
You can now run /mnt/s0/Solaris_9/Tools/setup_install_server
- 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)
- 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.
-
perl -MCPAN -e 'install Bundle::libnet'
SCCS related scripts and tips
- 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
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
First, a quick code hint I dont know where else to put. If you want to have
a section of code specifically for solaris, you can use
# if defined (__SVR4) && defined (__sun)
/* solaris specific code here */
#endif
The rest of this section is now in its own section of my site,
the driver section
PS:If you're looking to hire a sysadmin in the greater Los Angeles area,
you can look at my resume :-)
Written by:Philip Brown
Bolthole Top
Search Bolthole.com