- Timestamp:
- Sep 30, 2006, 1:19:52 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/mindi
r860 r861 526 526 resolved=$vanilla_lib_name 527 527 echo "Adding $resolved to filelist" >> $LOGFILE 528 while [ -h "$resolved" ] ; do 529 resolved=`readlink $resolved` 530 echo "Adding $resolved to filelist" >> $LOGFILE 531 done 528 resolved=`ReadAllLink $resolved` 529 echo "Adding $resolved to filelist" >> $LOGFILE 532 530 mkdir -p $outdir$optimized_lib_name > /dev/null 2> /dev/null 533 531 rmdir $outdir$optimized_lib_name > /dev/null 2> /dev/null … … 740 738 noof_lines=$2 741 739 while [ "$incoming" != "" ] ; do 742 if echo "$incoming" | grep -x " *#.*" &> /dev/null ; then743 # echo "Skipping '$incoming'"744 incoming=`ReadLine`745 continue746 fi747 if [ "$incoming" = "LVMFILES:" ] ; then748 break749 fi750 # echo "Processing '$incoming'."751 # sleep 1740 if echo "$incoming" | grep -x " *#.*" &> /dev/null ; then 741 # echo "Skipping '$incoming'" 742 incoming=`ReadLine` 743 continue 744 fi 745 if [ "$incoming" = "LVMFILES:" ] ; then 746 break 747 fi 748 # echo "Processing '$incoming'." 749 # sleep 1 752 750 filelist=`GenerateListForFile "$incoming"` 753 751 r=$? 754 752 [ "$r" -ne "0" ] && LogIt "$incoming not found\n" 755 753 res=$(($res+$r)) 756 # echo "'$incoming' generates filelist '$filelist'" >> $LOGFILE754 # echo "'$incoming' generates filelist '$filelist'" >> $LOGFILE 757 755 for fname in $filelist ; do 758 [ "$fname" != "" ] && echo "$fname" >> $tempfile 759 done 760 progress=$(($progress+1)) 761 echo -en "\r\t\t\t\t\t\t\t\t" 762 i=$(($progress*100)) 763 i=$(($i/$noof_lines)) 764 echo -en "$i" 765 echo -en "%" 766 modres=$(($progress%4)) 767 [ "$modres" -eq "0" ] && echo -en "\t/" 768 [ "$modres" -eq "1" ] && echo -en "\t-" 769 [ "$modres" -eq "2" ] && echo -en "\t\\" 770 [ "$modres" -eq "3" ] && echo -en "\t|" 771 incoming=`ReadLine` 772 done 773 if [ "$incoming" = "LVMFILES:" ] ; then 774 incoming=`ReadLine` 775 lvmversion="" 776 while [ "$incoming" != "" ] ; do 777 if echo "$incoming" | grep -x " *#.*" &> /dev/null ; then 778 incoming=`ReadLine` 779 continue 780 fi 781 filelist=`GenerateListForFile "$incoming"` 782 for tool in $filelist ; do 783 lvmresolved=`ResolveSoftlink $tool` 784 if [ "$tool" == "$lvmresolved" ]; then 785 echo "$tool" >> $tempfile 786 elif echo "$lvmresolved" | grep "lvmiopversion" &> /dev/null ; then 787 if [ "$lvmversion" = "" ] ; then 788 lvmversion=`$lvmresolved` 789 echo "$lvmresolved" >> $tempfile 790 fi 791 toolstripped=`echo $tool | $AWK -F / '{print $NF;}'` 792 if [ "$lvmversion" == "200" ]; then 793 # pvdata and lvmcreate_initrd don't exist in LVM2 794 case "$toolstripped" in 795 "pvdata") 796 continue 797 ;; 798 "lvmcreate_initrd") 799 continue 800 ;; 801 esac 802 fi 803 toolpath="/sbin/lvm-"$lvmversion"/"$toolstripped 804 if [ -e "$toolpath" ] ; then 805 echo "$toolpath" >> $tempfile 806 echo "$tool" >> $tempfile 807 else 808 toolpath="/lib/lvm-"$lvmversion"/"$toolstripped 809 fi 810 if [ -e "$toolpath" ] ; then 811 echo "$toolpath" >> $tempfile 812 echo "$tool" >> $tempfile 813 else 814 echo "Where are your LVM-Tools? Couldn't find $tool" 815 fi 816 else 817 echo "$tool" >> $tempfile 818 fi 756 [ "$fname" != "" ] && echo "$fname" >> $tempfile 819 757 done 820 758 progress=$(($progress+1)) … … 831 769 incoming=`ReadLine` 832 770 done 771 if [ "$incoming" = "LVMFILES:" ] ; then 772 incoming=`ReadLine` 773 lvmversion="" 774 while [ "$incoming" != "" ] ; do 775 if echo "$incoming" | grep -x " *#.*" &> /dev/null ; then 776 incoming=`ReadLine` 777 continue 778 fi 779 filelist=`GenerateListForFile "$incoming"` 780 for tool in $filelist ; do 781 lvmresolved=`readlink -f $tool` 782 if [ "$tool" == "$lvmresolved" ]; then 783 echo "$tool" >> $tempfile 784 elif echo "$lvmresolved" | grep "lvmiopversion" &> /dev/null ; then 785 if [ "$lvmversion" = "" ] ; then 786 lvmversion=`$lvmresolved` 787 echo "$lvmresolved" >> $tempfile 788 fi 789 toolstripped=`echo $tool | $AWK -F / '{print $NF;}'` 790 if [ "$lvmversion" == "200" ]; then 791 # pvdata and lvmcreate_initrd don't exist in LVM2 792 case "$toolstripped" in 793 "pvdata") 794 continue 795 ;; 796 "lvmcreate_initrd") 797 continue 798 ;; 799 esac 800 fi 801 toolpath="/sbin/lvm-"$lvmversion"/"$toolstripped 802 if [ -e "$toolpath" ] ; then 803 echo "$toolpath" >> $tempfile 804 echo "$tool" >> $tempfile 805 else 806 toolpath="/lib/lvm-"$lvmversion"/"$toolstripped 807 fi 808 if [ -e "$toolpath" ] ; then 809 echo "$toolpath" >> $tempfile 810 echo "$tool" >> $tempfile 811 else 812 echo "Where are your LVM-Tools? Couldn't find $tool" 813 fi 814 else 815 echo "$tool" >> $tempfile 816 fi 817 done 818 progress=$(($progress+1)) 819 echo -en "\r\t\t\t\t\t\t\t\t" 820 i=$(($progress*100)) 821 i=$(($i/$noof_lines)) 822 echo -en "$i" 823 echo -en "%" 824 modres=$(($progress%4)) 825 [ "$modres" -eq "0" ] && echo -en "\t/" 826 [ "$modres" -eq "1" ] && echo -en "\t-" 827 [ "$modres" -eq "2" ] && echo -en "\t\\" 828 [ "$modres" -eq "3" ] && echo -en "\t|" 829 incoming=`ReadLine` 830 done 833 831 fi 834 832 echo -en "$DONE\nMaking complete dependency list" … … 1122 1120 echo "$link `ReadAllLink $link`" 1123 1121 else 1124 echo "$link `dirname $file`/`ReadAllLink $link`" 1122 d=`dirname $file` 1123 echo "$link `ReadAllLink $d/$link`" 1125 1124 fi 1126 1125 } … … 1145 1144 output="$location $output" 1146 1145 if [ -h "$location" ] ; then 1147 output="`ReadAllLink $location` $ location $output"1146 output="`ReadAllLink $location` $output" 1148 1147 fi 1149 1148 done … … 1331 1330 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue 1332 1331 if [ -h "$c_p" ] && [ "`echo "$c_p" | grep -F "/dev/hd"`" = "" ] && [ "`echo "$c_p" | grep -F "/dev/sd"`" = "" ] && [ "`echo "$c_p" | grep -F "/dev/md"`" = "" ] ; then 1333 current_partition=` ResolveSoftlink$c_p`1332 current_partition=`readlink -f $c_p` 1334 1333 [ "`echo "$current_partition" | grep -F "/dev/mapper"`" != "" ] && current_partition="$c_p" 1335 1334 [ "`echo "$useless_dev" | grep -F "$current_partition"`" ] && continue … … 1339 1338 [ "$c_p" = "none" ] && continue 1340 1339 redhat_label="" 1341 absolute_partition=` ResolveSoftlink$c_p`1340 absolute_partition=`readlink -f $c_p` 1342 1341 partition_mountpt=`tr -s '\t' ' ' < $MY_FSTAB | /bin/grep -w "$current_partition" | /bin/grep -vx " *#.*" | $AWK '{print $2}' | head -n1` 1343 1342 … … 2275 2274 # [ "$?" -ne "0" ] && echo "Failed to save $i's MBR to bigdir" >> $LOGFILE 2276 2275 j=$i 2277 [ -h "$j" ] && j=` ResolveSoftlink$j`2276 [ -h "$j" ] && j=`readlink -f $j` 2278 2277 LogIt "Creating /dev/boot_device ($j)\n" 2279 2278 mkdir -p $bigdir/dev … … 2444 2443 return 0 2445 2444 } 2446 2447 2448 2449 2450 ResolveSoftlink() {2451 local resolved new2452 resolved=$12453 while [ -h "$resolved" ] ; do2454 resolved=`readlink -f $resolved`2455 done2456 echo "$resolved"2457 }2458 2459 2460 2445 2461 2446
Note:
See TracChangeset
for help on using the changeset viewer.