Changeset 3145 in MondoRescue


Ignore:
Timestamp:
Jun 14, 2013, 5:01:17 PM (11 years ago)
Author:
Bruno Cornec
Message:

r5361@localhost: bruno | 2013-06-14 12:18:21 +0200

  • Remove the errctl field used in star and log all star msgs into mondorestore.log
  • Avoids going into acl/xattr handling for star case as it's done natively
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/mondorestore/mondorestore.c

    r3141 r3145  
    17681768//      if (strstr(tarball_fname, ".star."))
    17691769        if (use_star) {
    1770             mr_asprintf(&command, "star -x -force-remove -sparse -U " STAR_ACL_SZ " errctl= file=%s", tarball_fname);
     1770            mr_asprintf(&command, "star -x -force-remove -sparse -U " STAR_ACL_SZ " file=%s", tarball_fname);
    17711771            if (strstr(tarball_fname, ".bz2")) {
    17721772                mr_strcat(command, " -bz");
     
    17991799        }
    18001800
    1801         if (g_getfattr) {
    1802             log_msg(1, "Setting fattr list %s", xattr_fname);
    1803             if (length_of_file(xattr_fname) > 0) {
    1804                 res = set_fattr_list(filelist_subset_fname, xattr_fname);
    1805                 if (res) {
    1806                     log_to_screen
    1807                         ("Errors occurred while setting extended attributes");
    1808                 } else {
    1809                     log_msg(1, "I set xattr OK");
     1801        if (! use_star) {
     1802            if (g_getfattr) {
     1803                log_msg(1, "Setting fattr list %s", xattr_fname);
     1804                if (length_of_file(xattr_fname) > 0) {
     1805                    res = set_fattr_list(filelist_subset_fname, xattr_fname);
     1806                    if (res) {
     1807                        log_to_screen("Errors occurred while setting extended attributes");
     1808                    } else {
     1809                        log_msg(1, "I set xattr OK");
     1810                    }
     1811                    retval += res;
    18101812                }
    1811                 retval += res;
    1812             }
    1813         }
    1814         if (g_getfacl) {
    1815             log_msg(1, "Setting acl list %s", acl_fname);
    1816             if (length_of_file(acl_fname) > 0) {
    1817                 res = set_acl_list(filelist_subset_fname, acl_fname);
    1818                 if (res) {
    1819                     log_to_screen
    1820                         ("Errors occurred while setting access control lists");
    1821                 } else {
    1822                     log_msg(1, "I set ACL OK");
     1813            }
     1814            if (g_getfacl) {
     1815                log_msg(1, "Setting acl list %s", acl_fname);
     1816                if (length_of_file(acl_fname) > 0) {
     1817                    res = set_acl_list(filelist_subset_fname, acl_fname);
     1818                    if (res) {
     1819                        log_to_screen("Errors occurred while setting access control lists");
     1820                    } else {
     1821                        log_msg(1, "I set ACL OK");
     1822                    }
     1823                    retval += res;
    18231824                }
    1824                 retval += res;
    1825             }
    1826         }
    1827         if (retval) {
     1825            }
     1826        } else {
     1827            retval = res;
     1828        }
     1829        // Be verbose for star
     1830        if (retval || use_star) {
    18281831            mr_asprintf(&command, "cat %s >> %s", temp_log, MONDO_LOGFILE);
    18291832            paranoid_system(command);
    18301833            paranoid_free(command);
    18311834
    1832             log_msg(2, "Errors occurred while processing fileset #%d",
    1833                     current_tarball_number);
     1835            if (retval) {
     1836                log_msg(2, "Errors occurred while processing fileset #%d", current_tarball_number);
     1837            }
    18341838        } else {
    18351839            log_msg(2, "Fileset #%d processed OK", current_tarball_number);
Note: See TracChangeset for help on using the changeset viewer.