Changeset 3271


Ignore:
Timestamp:
Apr 29, 2014, 9:23:09 PM (5 years ago)
Author:
bruno
Message:
  • Rename the conf file mondo-restore.cfg into mondorestore.cfg for homogeneity (continued)
Location:
branches/3.2
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/rootfs/usr/sbin/find-and-mount-cdrom

    r3216 r3271  
    77    for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do
    88        [ ! "$SECOND_TRY" ] && LogIt "Trying $device"
    9         if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     9        if [ "`grep "using-cdstream yes" /tmp/mondorestore.cfg 2> /dev/null`" ]; then
    1010            pwd=`pwd`
    1111            cd $GROOVY
     
    7676fi
    7777[ "$1" = "--second-try" ] && exit 1;
    78 if [ "`grep "using-cdstream yes" /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     78if [ "`grep "using-cdstream yes" /tmp/mondorestore.cfg 2> /dev/null`" ] ; then
    7979    LogIt "Because you are using cdstream, I won't try to mount CD."
    8080    exit 0
  • branches/3.2/mindi/rootfs/usr/sbin/hack-cfg-if-necessary

    r3216 r3271  
    1616LogIt "OK, we've found /mnt/cdrom/archives/*; great."
    1717
    18 if ! grep "backup-media-type iso" /tmp/mondo-restore.cfg 2> /dev/null ; then
     18if ! grep "backup-media-type iso" /tmp/mondorestore.cfg 2> /dev/null ; then
    1919    LogIt "Config file is fine, BTW."
    2020    exit 0
    2121fi
    2222
    23 LogIt "Re-jigging mondo-restore.cfg because you backed up to ISOs and then burned them to CDs" 1
    24 sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondo-restore.cfg
     23LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1
     24sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondorestore.cfg
    2525LogIt "Done re-jigging. Yay."
    2626exit 0
  • branches/3.2/mindi/rootfs/usr/sbin/post-init

    r3216 r3271  
    6262
    6363mondoopt=""
    64 if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2> /dev/null`" ]; then
     64if [ "`grep -i 'obdr ' /tmp/mondorestore.cfg 2> /dev/null`" ]; then
    6565    mondoopt="$mondoopt -o -d $TAPEDEV"
    6666fi
     
    7777    mondorestore $mondoopt -Z nuke
    7878elif [ "$expert" ] ; then
    79     if [ "`grep tapedev /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     79    if [ "`grep tapedev /tmp/mondorestore.cfg 2> /dev/null`" ] ; then
    8080    LogIt "-------------------TAPE MODE-------------------" 1
    8181    loc=`which mondorestore 2> /dev/null`
     
    9090            fi
    9191    fi
    92     elif [ "`grep using-cdstream /tmp/mondo-restore.cfg 2> /dev/null`" ] ; then
     92    elif [ "`grep using-cdstream /tmp/mondorestore.cfg 2> /dev/null`" ] ; then
    9393        LogIt "------------------CDSTREAM MODE------------------" 1
    9494        loc=`which mondorestore 2> /dev/null`
  • branches/3.2/mindi/rootfs/usr/sbin/start-netfs

    r3261 r3271  
    1111
    1212# Get info from config file
    13 ipdev=`grep netfs-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    14 hwaddr=`grep netfs-client-hwaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    15 ipaddress=`grep netfs-client-ipaddr /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    16 ipnetmask=`grep netfs-client-netmask /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    17 ipbroadcast=`grep netfs-client-broadcast /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    18 ipgateway=`grep netfs-client-defgw /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    19 proto=`grep netfs-proto /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    20 iproute=`grep netfs-route /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     13ipdev=`grep netfs-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     14hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     15ipaddress=`grep netfs-client-ipaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     16ipnetmask=`grep netfs-client-netmask /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     17ipbroadcast=`grep netfs-client-broadcast /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     18ipgateway=`grep netfs-client-defgw /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     19proto=`grep netfs-proto /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     20iproute=`grep netfs-route /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    2121ipconf=""
    2222pre=""
    2323post=""
    24 export netfsmount=`grep netfs-server-mount /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
    25 export imgname=`grep iso-prefix /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     24export netfsmount=`grep netfs-server-mount /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
     25export imgname=`grep iso-prefix /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    2626if [ "$imgname" = "" ]; then
    2727    export imgname="mondorescue"
    2828fi
    29 export dirimg=`grep netfs-server-path /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     29export dirimg=`grep netfs-server-path /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    3030if [ "$dirimg" = "" ]; then
    3131    export dirimg="/"
     
    7070
    7171        # If same system, map to the right MAC address
    72         hwaddr_found=`ifconfig $ipdev | /bin/grep HWaddr | awk '{print $NF}'`
    73         if [ "$hwaddr" != "$hwaddr_found" ]; then
    74             ipdev_new=`ifconfig -a | /bin/grep $hwaddr | awk '{print $1}'`
    75             if [ "$ipdev_new" != "" ]; then
    76                 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)"
    77                 ipdev=$ipdev_new
    78             else
    79                 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address"
     72        if [ "$hwaddr" != "" ]; then
     73            hwaddr_found=`ifconfig $ipdev | grep HWaddr | awk '{print $NF}'`
     74            if [ "$hwaddr" != "$hwaddr_found" ]; then
     75                ipdev_new=`ifconfig -a | grep $hwaddr | awk '{print $1}'`
     76                if [ "$ipdev_new" != "" ]; then
     77                    LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)"
     78                    ipdev=$ipdev_new
     79                else
     80                    LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address"
     81                fi
    8082            fi
    8183        fi
     
    118120    elif [ "$proto" != "" ]; then
    119121        if [ -x /sbin/rpcbind ]; then
    120             "Starting rpcbind daemon..."
     122            echo "Starting rpcbind daemon..."
    121123            /sbin/rpcbind -w &
    122124        fi
  • branches/3.2/mindi/rootfs/usr/sbin/start-usb

    r3216 r3271  
    77
    88# Get info from config file
    9 MRUSBDEV=`grep usb-dev /tmp/mondo-restore.cfg 2> /dev/null | cut -d' ' -f2-`
     9MRUSBDEV=`grep usb-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-`
    1010
    1111# info from cmdline are predominent
  • branches/3.2/mondo/src/common/libmondo-devices.c

    r3263 r3271  
    23272327                paranoid_fclose(fin);
    23282328            } else {
    2329                 if (does_file_exist("/tmp/mondo-restore.cfg")) {
    2330                     read_cfg_var("/tmp/mondo-restore.cfg", "media-dev", bkpinfo->media_device);
     2329                if (does_file_exist("/tmp/mondorestore.cfg")) {
     2330                    read_cfg_var("/tmp/mondorestore.cfg", "media-dev", bkpinfo->media_device);
    23312331                }
    23322332            }
  • branches/3.2/mondo/src/common/libmondo-filelist.c

    r3238 r3271  
    698698
    699699    strcpy(val_sz,"");
    700     mr_asprintf(cfg_fname, "%s/mondo-restore.cfg", bkpinfo->tmpdir);
     700    mr_asprintf(cfg_fname, "%s/mondorestore.cfg", bkpinfo->tmpdir);
    701701    read_cfg_var(cfg_fname, "last-filelist-number", val_sz);
    702702    mr_free(cfg_fname);
  • branches/3.2/mondo/src/common/libmondo-stream.c

    r3194 r3271  
    871871        // FIXME
    872872    }
    873     mr_asprintf(tmp, "tar -zxf %s ./tmp/mondo-restore.cfg 2> /dev/null", outfname);
     873    mr_asprintf(tmp, "tar -zxf %s ./tmp/mondorestore.cfg 2> /dev/null", outfname);
    874874    paranoid_system(tmp);
    875875    mr_free(tmp);
    876876
    877     paranoid_system("cp -f tmp/mondo-restore.cfg . 2> /dev/null");
     877    paranoid_system("cp -f tmp/mondorestore.cfg . 2> /dev/null");
    878878    if (chdir(old_cwd)) {
    879879        // FIXME
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3263 r3271  
    2929
    3030/**
    31  * The mondo-restore.cfg stub (appended to the directory where all.tar.gz was unpacked).
     31 * The mondorestore.cfg stub (appended to the directory where all.tar.gz was unpacked).
    3232 */
    33 #define MONDO_CFG_FILE_STUB "tmp/mondo-restore.cfg"
     33#define MONDO_CFG_FILE_STUB "tmp/mondorestore.cfg"
    3434/**
    3535 * The i-want-my-lvm stub
     
    170170
    171171/**
    172 * Extract @c mondo-restore.cfg and @c mountlist.txt from @p ramdisk_fname.
     172* Extract @c mondorestore.cfg and @c mountlist.txt from @p ramdisk_fname.
    173173* @param bkpinfo The backup information structure. @c tmpdir is the only field used.
    174174* @param ramdisk_fname The filename of the @b compressed ramdisk to look in.
     
    180180
    181181/**
    182 * Keep trying to get mondo-restore.cfg from the archive, until the user gives up.
     182* Keep trying to get mondorestore.cfg from the archive, until the user gives up.
    183183*/
    184184void get_cfg_file_from_archive_or_bust()
     
    628628/**
    629629* Fill out @p bkpinfo based on @p cfg_file.
    630 * @param cfg_file The mondo-restore.cfg file to read into @p bkpinfo.
     630* @param cfg_file The mondorestore.cfg file to read into @p bkpinfo.
    631631* @param bkpinfo The backup information structure to fill out with information
    632632* from @p cfg_file.
     
    20222022
    20232023/**
    2024  * Extract mondo-restore.cfg and the mountlist from the tape inserted
     2024 * Extract mondorestore.cfg and the mountlist from the tape inserted
    20252025 * to the ./tmp/ directory.
    20262026 * @param dev The tape device to read from.
     
    21572157            mr_free(tmp);
    21582158
    2159             if (!does_file_exist("tmp/mondo-restore.cfg")) {
     2159            if (!does_file_exist("tmp/mondorestore.cfg")) {
    21602160                log_to_screen("Cannot find config info on media");
    21612161                return (1);
     
    22362236    }
    22372237
    2238     log_to_screen("Recovered mondo-restore.cfg");
     2238    log_to_screen("Recovered mondorestore.cfg");
    22392239    if (!does_file_exist(MOUNTLIST_FNAME_STUB)) {
    22402240        log_to_screen("...but not mountlist.txt - a pity, really...");
Note: See TracChangeset for help on using the changeset viewer.