Changeset 2224 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-cli.c
- Timestamp:
- Jun 17, 2009, 4:43:35 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-cli.c
r2223 r2224 988 988 strncpy(bkpinfo->nfs_remote_dir, "/", MAX_STR_LEN); 989 989 } 990 /* test if we specified a user for the NFS dialog */ 991 p = strchr(bkpinfo->nfs_mount, '@'); 992 if (p != NULL) { 993 /* User found. Store the 2 values */ 994 p++; 995 /* new NFS mount */ 996 strcpy(tmp,p); 997 p--; 998 *p = '\0'; 999 strcpy(bkpinfo->nfs_user,bkpinfo->nfs_mount); 1000 strcpy(bkpinfo->nfs_mount,tmp); 1001 } 990 1002 sprintf(tmp, "mount | grep -E \"^%s[/]* .*\" | cut -d' ' -f3", 991 1003 bkpinfo->nfs_mount); … … 1136 1148 { 1137 1149 // strncpy(psz, list_of_NFS_devices_and_mounts(), MAX_STR_LEN); 1138 asprintf(&psz, "%s", list_of_NFS_mounts_only());1150 mr_asprintf(&psz, "%s", list_of_NFS_mounts_only()); 1139 1151 if (bkpinfo->exclude_paths[0]) { 1140 1152 strncat(bkpinfo->exclude_paths, " ", 4*MAX_STR_LEN); … … 1228 1240 if ((flag_set['n']) && (! bkpinfo->restore_data)) { 1229 1241 mr_asprintf(&tmp1,"%s/%s/.dummy.txt", bkpinfo->isodir,bkpinfo->nfs_remote_dir); 1230 sprintf(tmp, "echo hi > %s", tmp1); 1242 if (bkpinfo->nfs_user) { 1243 sprintf(tmp, "sudo -u %s echo hi > %s", bkpinfo->nfs_user, tmp1); 1244 } else { 1245 sprintf(tmp, "echo hi > %s", tmp1); 1246 } 1231 1247 if (run_program_and_log_output(tmp, 2)) { 1232 1248 retval++;
Note:
See TracChangeset
for help on using the changeset viewer.