D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
src
/
nrpe-2.15
/
package
/
solaris
/
pkg
/
Filename :
r.config
back
Copy
#!/usr/bin/sh compare_cksum() { destfile=$1 cksumfile=$2 installed_cksum=`/usr/bin/tail -1 $cksumfile | /usr/bin/awk '{print $1}'` current_cksum=`/usr/bin/cksum $destfile | /usr/bin/awk '{print $1}'` test $installed_cksum = $current_cksum } while read path ; do destpath=`echo $path | /usr/bin/sed -e 's/\/[^/]*$//'` destbase=`/usr/bin/basename $path` cksumfile="${destpath}/.${destbase}.cksum" if [ -f $path ] ; then if [ -f $cksumfile ] ; then compare_cksum $path $cksumfile if [ $? -eq 0 ] ; then /usr/bin/rm -f $path $cksumfile else echo "$path has been modified since it was installed -- " echo " leaving it in place." fi else echo "$path may have been modified since it was installed -- " echo " leaving it in place." fi fi done if [ "$1" = "ENDOFCLASS" ] ; then exit 0 fi