Solved

Removing the sendmail package entries

Posted on 2004-09-29
13
390 Views
Last Modified: 2013-12-27
The System: Solaris v2.8 w/MU #7 and Recommended Patches from July, 2004; running in SS20

The Issue: When the system was installed, the Solaris v8 sendmail packages were installed by default. I have since installed my own sendmail installation (since v8 ships with sendmail v8.11, which is horribly out-of-date). However, much to my chagrin, when I last applied a Recommended Patches set, it happily overwrote my pristine installation of sendmail v8.12.11 with the older garbage from Sun. All it took to fix was to re-run the sendmail install, but it was still very annoying.

I have identified the package names for sendmail (SUNWsndmr and SUNWsndmu).

1) Can I use pkgrm to remove these without damaging/deleting the sendmail install that I performed?

2) If the answer to 1) is "No", then how can I delete the information that tells a Recommended Patches install script that those packages are installed, so it'll skip any patches to those packages? Can I just delete some lines from some file listing the installed packages? Where?
0
Comment
Question by:PsiCop
  • 5
  • 4
  • 2
  • +1
13 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12185080
No. But you can save a copy of /etc/mail, remove the Sun packages, reinstall Sendmail, and restore.
0
 
LVL 34

Author Comment

by:PsiCop
ID: 12186972
If I remove the Sun packages, what exactly is removed?
0
 
LVL 18

Expert Comment

by:liddler
ID: 12188461
PsiCop,
Try
 pkgchk -l SUNWsndmu |grep Pathname
&
 pkgchk -l SUNWsndmr |grep Pathname
to get a list of the files installed / modified by the package, you then might have to mess about with cut / sed or manually edit the list to remove directories that are only affected like /ust/sbin etc
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 34

Author Comment

by:PsiCop
ID: 12189952
Ah.

Is there anyway to get at the DB that the pkg* tools use and simply delete the entries for SUNWsndmu and SUNWsndmr? I'm thinking if I do that, I won't have to worry about a cluster instal script clobbering me.
0
 
LVL 18

Expert Comment

by:liddler
ID: 12190395
don't think so....
0
 
LVL 34

Author Comment

by:PsiCop
ID: 12191160
Well, as it happened, I went looking at the man pages for the pkg* utilities.

On the page for pkgadd, I found a reference to the directory /var/sadm/install. Checking out the directory, I found the file "contents", which has stuff in it like this:

<SNIP>
/usr/lib/sendmail f none 4555 root bin 761388 52703 1081447323 SUNWsndmu
/usr/lib/smrsh f none 0555 root bin 8012 453 1081447323 SUNWsndmu
/usr/sbin d none 0755 root bin SUNWesu SUNWfns SUNWatfsu SUNWgss SUNWpsu SUNWsadmi SUNWtcxow SUNWbnuu SUNWcpcu SUNWdialh SUNWswmt SUNWaccu SUNWluxop SUNWftpu SUNWsutl SUNWntpu SUNWadmfw SUNWpmu SUNWocf SUNWsasnm SUNWpcu SUNWnisu SUNWadmap SUNWinst SUNWsndmu SUNWauda SUNWcsu SUNWvolu
/usr/sbin/etrn f none 0555 root bin 4453 13596 1081426484 SUNWsndmu
/usr/sbin/makemap f none 0555 root bin 310036 50664 1081447323 SUNWsndmu
<SNIP>

Along with entries concerning a LOT of other packages, including ones I installed myself (e.g. gcc).

Anyway, that seems to me to be the "database" (its a flat text file) of packages installed on the system. Can I just delete the entries concerning SUNWsndmu and SUNWsndmr and thereby "trick" the system into thinking that sendmail is not installed?
0
 
LVL 18

Expert Comment

by:liddler
ID: 12191255
possibly, I've never tried, but I remember doing something similar in osf on a DEC machine years ago.......
Best thing to to is make a copy of the file, delete (or maybe comment out) a line for a package you have a patch for, then try and install the patch
0
 
LVL 34

Author Comment

by:PsiCop
ID: 12191368
*nods* Always make a backup! :-)
0
 
LVL 34

Author Comment

by:PsiCop
ID: 12196354
After some consultation with a guy from Sun, I've confirmed that /var/sadm/install/contents is the "database" that the pkg* and patch* tools use to determine what packages are installed on the system. It is safe to edit this file to remove references to a package that you don't want patched in the future.

Another, perhaps safer, method, would be to edit the "patch_order" file in a given Recommended Patches cluster and remove any patches that you don't want applied. The issue I have with this solution is that if you miss one, you're hosed.

I'm going to ask that this Question be PAQed and my points refunded since I solved it on my own. But I appreciate, as always, your inputs, jlevie and liddler.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12197047
PAQ is fine with me
0
 
LVL 18

Expert Comment

by:liddler
ID: 12197942
OK with me
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 12227086
Question answered by asker or dialog valuable.
Closed, 250 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question