Changeset 3107 in MondoRescue for branches/3.0/mondo
- Timestamp:
- May 5, 2013, 4:23:30 AM (11 years ago)
- Location:
- branches/3.0/mondo
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/libmondo-cli.c
r3098 r3107 536 536 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 537 537 sprintf(tmp, "sshfs %s@%s", bkpinfo->netfs_user, bkpinfo->netfs_mount); 538 } else if (strstr(bkpinfo->netfs_proto, "smbfs")) {539 sprintf(tmp, "mount -t cifs %s -o user=%s", bkpinfo->netfs_mount, bkpinfo->netfs_user);540 538 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 541 539 sprintf(tmp, "mount %s@%s", bkpinfo->netfs_user, bkpinfo->netfs_mount); … … 547 545 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 548 546 sprintf(tmp, "sshfs %s", bkpinfo->netfs_mount); 549 } else if (strstr(bkpinfo->netfs_proto, "smbfs")) {550 sprintf(tmp, "mount -t cifs %s", bkpinfo->netfs_mount);551 547 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 552 548 sprintf(tmp, "mount %s", bkpinfo->netfs_mount); -
branches/3.0/mondo/src/common/libmondo-devices.c
r3099 r3107 2174 2174 { 2175 2175 char *tmp = NULL; 2176 char *tmpro = NULL;2177 2176 char *tmp1 = NULL; 2178 2177 char *mds = NULL; … … 2529 2528 strcpy(tmp1, bkpinfo->netfs_proto); 2530 2529 if (!popup_and_get_string 2531 ("Network protocol", "Which protocol should I use (nfs/sshfs /smbfs) ?",2530 ("Network protocol", "Which protocol should I use (nfs/sshfs) ?", 2532 2531 tmp1, MAX_STR_LEN)) { 2533 2532 log_to_screen("User has chosen not to backup the PC"); … … 2568 2567 sprintf(command, "mkdir -p %s", bkpinfo->isodir); 2569 2568 run_program_and_log_output(command, 5); 2570 2571 2569 if (bkpinfo->restore_data) { 2572 /* mount th FS read-only in restore mode to avoid any erase of whatever */ 2573 mr_asprintf(&tmpro, "-o ro"); 2570 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2571 mr_asprintf(&tmp, "sshfs -o ro"); 2572 } else { 2573 mr_asprintf(&tmp, "mount -t %s -o nolock,ro", bkpinfo->netfs_proto); 2574 } 2574 2575 } else { 2575 mr_asprintf(&tmpro, ""); 2576 } 2577 2578 /* Build the mount string */ 2579 if (strstr(bkpinfo->netfs_proto, "smbfs")) { 2580 mr_asprintf(&tmp, "mount -t cifs %s %s %s",bkpinfo->netfs_mount, bkpinfo->isodir,tmpro); 2581 if (bkpinfo->netfs_user) { 2582 mr_strcat(tmp, " -o user=%s", bkpinfo->netfs_user); 2576 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2577 mr_asprintf(&tmp, "sshfs"); 2578 } else { 2579 mr_asprintf(&tmp, "mount -t %s -o nolock", bkpinfo->netfs_proto); 2583 2580 } 2584 else { 2585 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2586 mr_asprintf(&tmp, "sshfs %s ",tmpro); 2587 } else { 2588 mr_asprintf(&tmp, "mount -t %s -o nolock %s ", bkpinfo->netfs_proto,tmpro); 2589 } 2590 if (bkpinfo->netfs_user) { 2591 mr_strcat(tmp, "%s@", bkpinfo->netfs_user); 2592 } 2593 mr_strcat(tmp, "%s %s", bkpinfo->netfs_mount, bkpinfo->isodir); 2594 } 2581 } 2582 mr_strcat(tmp, " "); 2583 if (bkpinfo->netfs_user) { 2584 mr_strcat(tmp, "%s@", bkpinfo->netfs_user); 2585 } 2586 mr_strcat(tmp, "%s %s", bkpinfo->netfs_mount, bkpinfo->isodir); 2595 2587 run_program_and_log_output(tmp, 3); 2596 2588 mr_free(tmp); … … 2598 2590 malloc_string(g_selfmounted_isodir); 2599 2591 strcpy(g_selfmounted_isodir, bkpinfo->isodir); 2600 }2601 2592 } 2602 2593 if (!is_this_device_mounted(bkpinfo->netfs_mount)) { -
branches/3.0/mondo/src/mondorestore/mondorestore.c
r3098 r3107 3134 3134 bkpinfo->netfs_mount); 3135 3135 } 3136 } else { 3137 if (strstr(bkpinfo->netfs_proto, "smbfs")) { 3138 if (bkpinfo->netfs_user) { 3139 sprintf(tmp, "mount -t cifs %s /tmp/isodir -o user=%s,nolock,ro ", 3140 bkpinfo->netfs_mount,bkpinfo->netfs_user); 3141 } else { 3142 sprintf(tmp, "mount -t cifs %s /tmp/isodir -o nolock,ro ", 3143 bkpinfo->netfs_mount); 3144 } 3136 } else { 3137 if (bkpinfo->netfs_user) { 3138 sprintf(tmp, "mount %s@%s -o nolock,ro /tmp/isodir", 3139 bkpinfo->netfs_user,bkpinfo->netfs_mount); 3145 3140 } else { 3146 if (bkpinfo->netfs_user) { 3147 sprintf(tmp, "mount %s@%s -o nolock,ro /tmp/isodir", 3148 bkpinfo->netfs_user,bkpinfo->netfs_mount); 3149 } else { 3150 sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir", 3151 bkpinfo->netfs_mount); 3152 } 3141 sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir", 3142 bkpinfo->netfs_mount); 3153 3143 } 3154 3144 } -
branches/3.0/mondo/test/Makefile.am
r3100 r3107 2 2 3 3 ## The program 4 sbin_PROGRAMS = mrtest_mountlist mrtest_truncname mrtest_stresc4 sbin_PROGRAMS = mrtest_mountlist mrtest_truncname 5 5 mrtest_mountlist_SOURCES = test-mountlist.c ${top_builddir}/src/mondorestore/mondo-prep.c ${top_builddir}/src/mondorestore/mondo-rstr-newt.c ${top_builddir}/src/mondorestore/mondo-rstr-tools.c 6 6 mrtest_mountlist_LDADD = ${top_builddir}/src/common/libmondo.a ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@ 7 7 mrtest_truncname_SOURCES = test-truncname.c ${top_builddir}/src/common/libmondo-string.c 8 8 mrtest_truncname_LDADD = ${top_builddir}/src/common/libmondo.a ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@ 9 mrtest_stresc_SOURCES = test-mr_stresc.c10 mrtest_stresc_LDADD = ${top_builddir}/src/lib/libmr.a @MONDORESTORE_STATIC@
Note:
See TracChangeset
for help on using the changeset viewer.