Changeset 2436 in MondoRescue
- Timestamp:
- Sep 29, 2009, 1:48:32 AM (15 years ago)
- Location:
- branches/2.2.9
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi/deplist.d/base.conf
r2409 r2436 32 32 33 33 /usr/bin/bzip2 34 # is a link => No additional place 34 35 /usr/bin/bunzip2 35 36 /usr/bin/lzop 37 /usr/bin/lzma 36 38 39 /bin/bash 37 40 /bin/date 38 41 /sbin/ctrlaltdel -
branches/2.2.9/mindi/deplist.d/minimal.conf
r2433 r2436 7 7 8 8 # Base Unix commands 9 /bin/bash10 9 /bin/mt 11 10 /bin/awk … … 18 17 19 18 # Compression 20 /bin/gunzip21 19 /bin/gzip 22 20 … … 34 32 /sbin/mount.fuse 35 33 /usr/bin/fusermount 34 /usr/bin/ssh 36 35 # Required by ssh as dlopened 37 36 /usr/lib/libnss_compat.so -
branches/2.2.9/mindi/deplist.d/net.conf
r2410 r2436 6 6 # SSH support 7 7 /usr/sbin/sshd 8 /usr/bin/ssh9 8 /usr/bin/scp 10 9 -
branches/2.2.9/mindi/mindi
r2432 r2436 2256 2256 # We want to use the real mount and all the supported variants (nfs, cifs, ...) 2257 2257 rm -f bin/mount $MINDI_TMP/busy.lis 2258 mountlis=`grep -E "mount|fuse|ssh " $DEPLIST_FILE $DEPLIST_DIR/* | cut -d: -f2`2258 mountlis=`grep -E "mount|fuse|ssh|libnss" $DEPLIST_FILE $DEPLIST_DIR/* | cut -d: -f2` 2259 2259 for f in $MINDI_LIB/rootfs/bin/busybox $mountlis ; do 2260 2260 if [ -f $f ]; then -
branches/2.2.9/mondo/src/common/libmondo-devices.c
r2434 r2436 1550 1550 int i = 0; 1551 1551 int mount_cnt = 0; 1552 int lastpos = 0; 1552 1553 char *mounted_file_system = NULL; 1553 1554 char *command = NULL; … … 1580 1581 1581 1582 log_msg (5, "mounted_file_system: %s", mounted_file_system); 1582 if ((token = strtok(mounted_file_system, token_chars)) == NULL) {1583 if ((token = mr_strtok(mounted_file_system, token_chars, &lastpos)) == NULL) { 1583 1584 log_msg (4, "Could not get the list of mounted file systems"); 1584 1585 paranoid_free(mounted_file_system); … … 1597 1598 strcpy(DSFptr->device, token); 1598 1599 mr_free(token); 1599 if ((token = strtok(NULL, token_chars)) == NULL) {1600 if ((token = mr_strtok(mounted_file_system, token_chars, &lastpos)) == NULL) { 1600 1601 log_msg (5, "Ran out of entries on the mounted file systems list"); 1601 paranoid_free(mounted_file_system);1602 mr_free(mounted_file_system); 1602 1603 mr_free(token); 1603 1604 return (1); … … 1606 1607 strcpy(DSFptr->mount_point, token); 1607 1608 mr_free(token); 1608 token = strtok(NULL, token_chars);1609 } 1610 paranoid_free(mounted_file_system);1609 token = mr_strtok(mounted_file_system, token_chars, &lastpos); 1610 } 1611 mr_free(mounted_file_system); 1611 1612 } 1612 1613 /******** … … 1644 1645 char *mount_list = NULL; 1645 1646 char *token = NULL; 1647 char *ndsf = NULL; 1646 1648 char token_chars[] =" \t\r\f\a\0"; 1647 1649 MOUNTED_FS_STRUCT *DSFptr = NULL; … … 1693 1695 if (!strlen(partition_list)) { 1694 1696 /* There were no partitions on the disk */ 1695 log_msg(4, "Cannot find any partitions on device special file %s", dsf); 1696 return (-2); 1697 } 1698 1699 /* Fill the partition list */ 1700 i = 0; 1701 lastpos = 0; 1702 while ((token = mr_strtok(partition_list, token_chars, &lastpos)) != NULL) { 1703 log_msg (5, "Found partition: %s", token); 1704 strcpy(partitions[i++], token); 1705 mr_free(token); 1706 } 1707 paranoid_free(partition_list); 1697 log_msg(4, "No partitions on device special file %s", dsf); 1698 log_msg(4, "I guess it's a partiion itself"); 1699 strcpy(partitions[0], dsf); 1700 ndsf = truncate_to_drive_name(dsf); 1701 } else { 1702 /* Fill the partition list */ 1703 i = 0; 1704 lastpos = 0; 1705 while ((token = mr_strtok(partition_list, token_chars, &lastpos)) != NULL) { 1706 log_msg (5, "Found partition: %s", token); 1707 strcpy(partitions[i++], token); 1708 mr_free(token); 1709 } 1710 mr_asprintf(ndsf, "%s", dsf); 1711 } 1712 mr_free(partition_list); 1708 1713 1714 /* For the rest ndsf is the new dsf to deal with */ 1709 1715 /******** 1710 1716 * At this point, we have a list of all of the partitions on the dsf. Now try to … … 1740 1746 /* See if it's swap. If it is, ignore it. */ 1741 1747 mr_asprintf(&command, "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'", 1742 dsf, partitions[i]);1748 ndsf, partitions[i]); 1743 1749 log_msg(4, " Running: %s", command); 1744 1750 mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command)); … … 1770 1776 log_msg(4, " It's not mounted. Checking to see if it's LVM..."); 1771 1777 /* Get the partition ID; 8e for LVM */ 1772 mr_asprintf(&command, "parted2fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);1778 mr_asprintf(&command, "parted2fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", ndsf, partitions[i]); 1773 1779 log_msg(4, " Running: %s", command); 1774 1780 mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command)); … … 1809 1815 *******/ 1810 1816 paranoid_free(mount_list); 1817 1811 1818 mr_asprintf(&command, "%s", "cat /proc/mdstat|grep -iv Personal|awk '{if($0~\"^.*[ ]+:\"){printf(\"/dev/%s \", $1)}}END{print \"\"}'"); 1812 1819 log_msg (5, "Running: %s", command); … … 1890 1897 } 1891 1898 paranoid_free(tmp); 1892 } 1893 paranoid_free(partition_list); 1894 paranoid_free(mount_list); 1899 paranoid_free(mount_list); 1900 } 1895 1901 1896 1902 /* Determine how much memory to allocate for included_dsf_list and excluded_dsf_list */ … … 1911 1917 while (DSFptr != NULL) { 1912 1918 if (DSFptr->check) { 1913 log_msg (5, "%s is mounted on %s and is on disk %s\n", DSFptr->device, DSFptr->mount_point, dsf);1919 log_msg (5, "%s is mounted on %s and is on disk %s\n", DSFptr->device, DSFptr->mount_point, ndsf); 1914 1920 strcat(*included_dsf_list, DSFptr->mount_point); 1915 1921 strcat(*included_dsf_list, " "); 1916 1922 } else { 1917 log_msg (4, "%s is mounted on %s and is NOT on disk %s\n", DSFptr->device, DSFptr->mount_point, dsf);1923 log_msg (4, "%s is mounted on %s and is NOT on disk %s\n", DSFptr->device, DSFptr->mount_point, ndsf); 1918 1924 strcat(*excluded_dsf_list, DSFptr->mount_point); 1919 1925 strcat(*excluded_dsf_list, " "); … … 1921 1927 DSFptr = DSFptr->next; 1922 1928 } 1929 mr_free(ndsf); 1930 1923 1931 log_msg (5, "included_dsf_list: %s", *included_dsf_list); 1924 1932 log_msg (5, "excluded_dsf_list: %s", *excluded_dsf_list); -
branches/2.2.9/mondo/src/common/libmondo-filelist.c
r2418 r2436 1350 1350 /* dir is needed when we pass it to the shell */ 1351 1351 dir = mr_stresc(dir1, "`$\\\"(){}'[]&*?|!#~", '\\'); 1352 p = strrchr(dir , '/');1352 p = strrchr(dir1, '/'); 1353 1353 if (p) { 1354 1354 if (!strcmp(p, "/.") || !strcmp(p, "/..")) { … … 1404 1404 g_skeleton_filelist, g_skeleton_filelist); 1405 1405 // log_msg(6, "fsm = %s", find_skeleton_marker); 1406 run_program_and_log_output(find_skeleton_marker, 8);1406 paranoid_system(find_skeleton_marker); 1407 1407 time(&this_time); 1408 1408 if (this_time != last_time) { … … 1434 1434 paranoid_free(tmp); 1435 1435 } else if (strstr(skip_these, new_with_spaces)) { 1436 log_msg(10, "Found dir ***%s**** excluded", dir1); 1436 1437 fprintf(fout, "%s\n", dir1); // if excluded dir then print dir ONLY 1437 1438 } else { 1439 log_msg(10, "Found dir ***%s**** parsed", dir1); 1438 1440 fprintf(fout, "%s\n", dir1); 1439 1441 while ((dit = readdir(dip)) != NULL) { … … 1448 1450 if (strstr(skip_these, new_with_spaces)) { 1449 1451 fprintf(fout, "%s\n", new); 1452 log_msg(10, "Found child dir ***%s**** excluded", new); 1450 1453 paranoid_free(new_with_spaces); 1451 1454 } else { … … 1454 1457 if (!S_ISLNK(statbuf.st_mode) 1455 1458 && S_ISDIR(statbuf.st_mode)) { 1459 log_msg(10, "Found child dir ***%s**** parsed", new); 1456 1460 open_and_list_dir(new, skip_these, fout, 1457 1461 time_of_last_full_backup); … … 1460 1464 || time_of_last_full_backup < 1461 1465 statbuf.st_ctime) { 1466 log_msg(10, "Found child file ***%s**** parsed", new); 1462 1467 fprintf(fout, "%s\n", new); 1463 1468 if ((counter++) > 128) {
Note:
See TracChangeset
for help on using the changeset viewer.