Changeset 2426 in MondoRescue for branches/2.2.9/mondo/src/common
- Timestamp:
- Sep 25, 2009, 7:42:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-cli.c
r2424 r2426 482 482 } 483 483 /* test for protocol */ 484 p = str chr(bkpinfo->netfs_mount, ':');484 p = strstr(bkpinfo->netfs_mount, "://"); 485 485 if (p == NULL) { 486 /* protocol not found abort */ 487 fatal_error("No protocol specified for remote share mount. Please do man mondoarchive as syntax changed"); 486 /* protocol not found assuming NFS for compatibility */ 487 mr_asprintf(&q,"nfs"); 488 489 p = strchr(bkpinfo->netfs_mount, ':'); 490 if (p == NULL) { 491 fatal_error("No protocol specified for remote share mount, nor any old NFS syntax found.\nPlease do man mondoarchive as syntax changed"); 492 } 493 /* p points on to the string server:/path */ 494 p = bkpinfo->netfs_mount; 495 488 496 } else { 489 /* Proto found. Store the 2 values */ 490 p++; 491 if (*p != '/') { 492 fatal_error("No protocol correctly specified for remote share mount. Use protocol://server:share"); 493 } 494 p++; 495 if (*p != '/') { 496 fatal_error("No protocol correctly specified for remote share mount. Use protocol://server:share"); 497 } 498 p++; 499 /* p points on to the string server:/path */ 500 strcpy(tmp,p); 501 502 /* going back to protocol */ 503 p--; 504 p--; 505 p--; 497 /* Isolate the protocol */ 506 498 *p = '\0'; 507 499 mr_asprintf(&q,"%s",bkpinfo->netfs_mount); 508 bkpinfo->netfs_proto = q; 509 strcpy(bkpinfo->netfs_mount,tmp); 510 } 500 501 /* Skip proto now */ 502 p++; 503 p++; 504 p++; 505 } 506 /* whatever done before proto is pointed to by q */ 507 bkpinfo->netfs_proto = q; 508 509 /* p points on to the string server:/path */ 510 /* Store the 2 values */ 511 strcpy(bkpinfo->netfs_mount,p); 512 511 513 /* test if we specified a user */ 512 514 p = strchr(bkpinfo->netfs_mount, '@');
Note:
See TracChangeset
for help on using the changeset viewer.