Link to home
Start Free TrialLog in
Avatar of PsiCop
PsiCopFlag for United States of America

asked on

Removing the sendmail package entries

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?
Avatar of jlevie
jlevie

No. But you can save a copy of /etc/mail, remove the Sun packages, reinstall Sendmail, and restore.
Avatar of PsiCop

ASKER

If I remove the Sun packages, what exactly is removed?
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
Avatar of PsiCop

ASKER

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.
don't think so....
Avatar of PsiCop

ASKER

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?
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
Avatar of PsiCop

ASKER

*nods* Always make a backup! :-)
Avatar of PsiCop

ASKER

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.
PAQ is fine with me
OK with me
ASKER CERTIFIED SOLUTION
Avatar of ee_ai_construct
ee_ai_construct
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial