Solved

Removing the sendmail package entries

Posted on 2004-09-29
13
402 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

705 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