Changeset 1564 in MondoRescue
- Timestamp:
- Jul 25, 2007, 11:04:05 AM (18 years ago)
- Location:
- branches/stable/mondo/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-archive.c
r1543 r1564 734 734 } else if (bkpinfo->boot_loader == 'E') { 735 735 strcpy(bootldr_str, "ELILO"); 736 /* BERLIOS: fix it for SuSE,Debian, Mandrake, ... */736 /* BERLIOS: fix it for Debian, Mandrake, ... */ 737 737 if (!does_file_exist("/etc/elilo.conf") 738 738 && does_file_exist("/boot/efi/efi/redhat/elilo.conf")) { 739 739 run_program_and_log_output 740 740 ("ln -sf /boot/efi/efi/redhat/elilo.conf /etc/elilo.conf", 741 5); 742 } 743 if (!does_file_exist("/etc/elilo.conf") 744 && does_file_exist("/boot/efi/efi/SuSE/elilo.conf")) { 745 run_program_and_log_output 746 ("ln -sf /boot/efi/efi/SuSE/elilo.conf /etc/elilo.conf", 741 747 5); 742 748 } -
branches/stable/mondo/src/restore-scripts/mondo/stabelilo-me
r567 r1564 20 20 21 21 22 LocateOldElilo() { 23 old_eliloconf="" 24 if [ -f "/mnt/RESTORING/boot/efi/efi/redhat/elilo.conf" ] ; then 25 LogIt "elilo.conf found at /mnt/RESTORING/boot/efi/efi/redhat/elilo.conf" 2 26 old_eliloconf="/mnt/RESTORING/boot/efi/efi/redhat/elilo.conf" 27 return 0 28 elif [ -f "/mnt/RESTORING/boot/efi/efi/SuSE/elilo.conf" ] ; then 29 LogIt "elilo.conf found at /mnt/RESTORING/boot/efi/efi/SuSE/elilo.conf" 2 30 old_eliloconf="/mnt/RESTORING/boot/efi/efi/SuSE/elilo.conf" 31 return 0 32 else 33 LogIt "Looking for elilo.conf. Please wait." 2 34 elilo_list=`find /mnt/RESTORING/boot -name elilo.conf 2> /dev/null` 35 fi 36 where_they_live="" 37 for curr_elilo in $elilo_list ; do 38 curr_dir=`dirname $curr_elilo` 39 if [ "$?" -eq "0" ] ; then 40 if [ "$where_they_live" != "" ] ; then 41 LogIt "Two directories found! One is $where_they_live, the other $curr_dir" 1 42 LogIt "I don't know which to choose. I'll abort the search." 1 43 return 1 44 fi 45 where_they_live=$curr_dir 46 fi 47 done 48 if [ "$where_they_live" = "" ] ; then 49 LogIt "Cannot find any folder which holds elilo.conf" 1 50 return 1 51 fi 52 old_eliloconf=$where_they_live/elilo.conf 53 LogIt "ELILO found." 2 54 return 0 55 } 56 22 57 LocateOldFstab() { 23 58 old_fstab="" 24 old_eliloconf=""25 59 if [ -f "/mnt/RESTORING/etc/fstab" ] ; then 26 60 LogIt "No need for fstab search." 2 27 # fstab_list=/mnt/RESTORING/etc/fstab 28 old_fstab=/mnt/RESTORING/etc/fstab 29 old_eliloconf=/mnt/RESTORING/boot/efi/efi/redhat/elilo.conf 30 return 0 61 old_fstab=/mnt/RESTORING/etc/fstab 62 return 0 31 63 elif [ -f "/mnt/cdrom/archives/CUCKOO" ] ; then 32 64 LogIt "Because I'm cuckoo, I'll stop searching." 2 … … 38 70 where_they_live="" 39 71 for curr_fstab in $fstab_list ; do 40 curr_dir=`echo $curr_fstab | gawk '{i=index($0,"/fstab");print substr($0,0,i-1);}'`41 resA=$?42 curr_inetd=`find $curr_dir -name inetd.conf | grep -v "linuxconf"`43 resB=$?44 if [ "$resA" -eq "0" ] ; then45 if [ "$where_they_live" != "" ] ; then46 LogIt "Two directories found! One is $where_they_live, the other $curr_dir" 147 LogIt "I don't know which to choose. I'll abort the search." 148 return 149 fi50 where_they_live=$curr_dir51 fi72 curr_dir=`echo $curr_fstab | gawk '{i=index($0,"/fstab");print substr($0,0,i-1);}'` 73 resA=$? 74 curr_inetd=`find $curr_dir -name inetd.conf | grep -v "linuxconf"` 75 resB=$? 76 if [ "$resA" -eq "0" ] ; then 77 if [ "$where_they_live" != "" ] ; then 78 LogIt "Two directories found! One is $where_they_live, the other $curr_dir" 1 79 LogIt "I don't know which to choose. I'll abort the search." 1 80 return 1 81 fi 82 where_they_live=$curr_dir 83 fi 52 84 done 53 85 if [ "$where_they_live" = "" ] ; then 54 LogIt "Cannot find any folder which holds fstab _and_ inetd.conf" 155 return 186 LogIt "Cannot find any folder which holds fstab _and_ inetd.conf" 1 87 return 1 56 88 fi 57 ### Will NOT work for ELILO58 ###old_eliloconf=$where_they_live/elilo.conf59 old_eliloconf=/boot/efi/efi/redhat/elilo.conf60 89 old_fstab=$where_they_live/fstab 61 LogIt " LILO andfstab found." 290 LogIt "fstab found." 2 62 91 return 0 63 92 } 64 65 93 66 94 … … 96 124 LogIt "stabelilo-me --- starting" 97 125 LocateOldFstab 126 LocateOldElilo 98 127 old_mountlist=/tmp/mountlist.original 99 128 new_mountlist=/tmp/mountlist.txt
Note:
See TracChangeset
for help on using the changeset viewer.