[K12OSN] smbldap-installer reinstall failure (Robert Moskowitz) & (Roger)

Dan Young dyoung at mesd.k12.or.us
Wed Aug 9 18:19:46 UTC 2006


Robert Moskowitz wrote:
> Matt Oquist wrote:
>>> From: Roger <roger.in.eugene at gmail.com>
>>> Subject: Re: [K12OSN] smbldap-installer reinstall failure
>>> Oops.
>>> You removed *all* the logrotate files.   Any logs that get rotated had
>>> their definitions in that directory. (well, most anyway). What the
>>> script was going to do was overwrite the one.
>>>     
>>
>> Yes.
>>
>>  
>>> A more appropriate means of removal was probably
>>> rm  /etc/logrotate.d/smbldap-ldif-backups
>>>     
>>
>> Yes.
>>
>>  
>>> Be wary of "-rf" with "rm" unless you are absolutely sure of  what
>>> will happen.
>>> Is this a redhat box?   redhat has a means of working with the package
>>> manager to verify existance of files from the packages.  Not sure if
>>> you could use that to figure out what *used* to be there.
>>> Debian may have a similar feature.
>>>     
>>
>> I'm sure there's a better way to do it, but my ham-fisted and
>> blundering approach would be to use 'dpkg -S' on a similar box to
>> figure out which packages have files under /etc/logrotate.d, and then
>> go to your smbldap box and do an 'apt-get install --reinstall' for
>> each one of those packages.
>>   
> I have to figure out what I have is a similar box (hey anyone out there
> in Centos with a similar box?).  Then I would do yum whatever?  As I
> don't have apt...

This is what I would do. YMMV.

rpm -Va | grep '/etc/logrotate.d' | grep 'missing' > /tmp/logr-files
for e in $(cat /tmp/logr-files); do rpm -qf $e; done > /tmp/logr-rpms
less /tmp/logr-rpms

That will verify all installed RPMs and tell you what files are missing,
then tell you what RPM package the missing file belongs to. For each of
those, you'll need to reinstall the package.

yum install yum-utils   # to get the handy yumdownloader tool
mkdir /tmp/logrotate; cd /tmp/logrotate
for $e in $(cat /tmp/logrotate); do yumdownloader $e; done
rpm -ivh --replacepkgs *.rpm

-- 
Dan Young <dyoung at mesd.k12.or.us>
Multnomah ESD - Technology Services
503-257-1562




More information about the K12OSN mailing list