* Stardate: 2003-06-11 00:10
* Incoming subspace signal from "James Sparenberg <[EMAIL PROTECTED]>" :

> All,
> 
>   I've assembled my list of "Things I need and can never remember" on
> the Community Twiki... it's at 
> 
> http://mandrake.vmlinuz.ca/bin/view/Main/QuikTips
> 
> Now if ya'll don't mind, and if you have the time.  Drop on over to the
> page and if you see something I typo'd on or otherwise blew please let
> me know.  

Lately I had very many files missing after a filesystem check of my root partition. I 
executed these commands like on your page:

rpm -Va --nodeps --nomd5 --noscripts | grep missing > missing_files.list 
urpmf [filename]

It took for hours to reinstall all corrupted packages from the CD's, so I've come up 
with a script:

------
#!/bin/bash

RPM_DIR="/mnt/cdrom2/Mandrake/RPMS"

for FILE in ${RPM_DIR}*/*.rpm ; do

    RPM=`rpm -qp --qf "%{NAME} " ${FILE}`

    echo -e "Verifying \"${RPM}\" ..."

    if rpm -V --nodeps --nomd5 ${RPM} | grep "missing  " ; then

        echo -e "\nReinstall \"${RPM}\" ? [Enter/y/n]:"
        read ANSWER
        
        if [ "${ANSWER}" != "n" ]; then

            RPM=`rpm -q ${RPM}`
            rpm -Uvh --force ${RPM_DIR}*/${RPM}*
            echo -e "\n"

        fi

    fi

done

exit 0
---------

This will check all RPMS on the CD's (or in any other folder you specify), and ask to 
install them.

-- 
Best regards, [EMAIL PROTECTED]

* Climate Control Psychedelic Soundscapes - http://go.to/cchq/
* Linux Shell Scripts & RPM Software Packages - http://go.to/conmen/
* Photography Pages - http://home.wanadoo.nl/cchq/photo/photo.html

 10:35:31 up 36 min

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to