Solved

Removing the sendmail package entries

Posted on 2004-09-29
13
385 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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…
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.

809 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