Changeset 1564 in MondoRescue


Ignore:
Timestamp:
Jul 25, 2007, 11:04:05 AM (17 years ago)
Author:
Bruno Cornec
Message:

Improve ia64 support for SLES

(merge -r1562:1563 $SVN_M/branches/2.2.5)

Location:
branches/stable/mondo/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/libmondo-archive.c

    r1543 r1564  
    734734    } else if (bkpinfo->boot_loader == 'E') {
    735735        strcpy(bootldr_str, "ELILO");
    736         /* BERLIOS: fix it for SuSE, Debian, Mandrake, ... */
     736        /* BERLIOS: fix it for Debian, Mandrake, ... */
    737737        if (!does_file_exist("/etc/elilo.conf")
    738738            && does_file_exist("/boot/efi/efi/redhat/elilo.conf")) {
    739739            run_program_and_log_output
    740740                ("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",
    741747                 5);
    742748        }
  • branches/stable/mondo/src/restore-scripts/mondo/stabelilo-me

    r567 r1564  
    2020
    2121
     22LocateOldElilo() {
     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
    2257LocateOldFstab() {
    2358    old_fstab=""
    24     old_eliloconf=""
    2559    if [ -f "/mnt/RESTORING/etc/fstab" ] ; then
    2660        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
    3163    elif [ -f "/mnt/cdrom/archives/CUCKOO" ] ; then
    3264        LogIt "Because I'm cuckoo, I'll stop searching." 2
     
    3870    where_they_live=""
    3971    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" ] ; then
    45         if [ "$where_they_live" != "" ] ; then
    46         LogIt "Two directories found! One is $where_they_live, the other $curr_dir" 1
    47         LogIt "I don't know which to choose. I'll abort the search." 1
    48         return 1
    49         fi
    50         where_they_live=$curr_dir
    51     fi
     72        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
    5284    done
    5385    if [ "$where_they_live" = "" ] ; then
    54     LogIt "Cannot find any folder which holds fstab _and_ inetd.conf" 1
    55     return 1
     86        LogIt "Cannot find any folder which holds fstab _and_ inetd.conf" 1
     87        return 1
    5688    fi
    57     ### Will NOT work for ELILO
    58     ###old_eliloconf=$where_they_live/elilo.conf
    59     old_eliloconf=/boot/efi/efi/redhat/elilo.conf
    6089    old_fstab=$where_they_live/fstab
    61     LogIt "LILO and fstab found." 2
     90    LogIt "fstab found." 2
    6291    return 0
    6392}
    64 
    6593
    6694
     
    96124LogIt "stabelilo-me --- starting"
    97125LocateOldFstab
     126LocateOldElilo
    98127old_mountlist=/tmp/mountlist.original
    99128new_mountlist=/tmp/mountlist.txt
Note: See TracChangeset for help on using the changeset viewer.