Changeset 3098 in MondoRescue
- Timestamp:
- Apr 26, 2013, 8:08:45 PM (12 years ago)
- Location:
- branches/3.0
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/README.pxe
r3036 r3098 11 11 label mondo 12 12 kernel vmlinuz-mondo 13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 selinux=0 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs ] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [hwaddr=M:A:C:A:D:R] [netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] ...13 append initrd=initrd-mondo load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=131072 selinux=0 rw root=/dev/ram iso acpi=off apm=off devfs=nomount exec-shield=0 pxe [proto=nfs|sshfs|smbfs] [prefix=machine] [ipconf=(ipdev:ipadr:netmask:broadcast:gateway|ipdev:dhcp)] [hwaddr=M:A:C:A:D:R] [netfsmount=server:mountpoint] [netfsopt=-o option][netfspath=local_path] [ping=#] ... 14 14 15 15 ipdev is the device name (e.g. eth2) … … 20 20 dhcp is a keyword. Using it will provide all the previous 4 values to activate the LAN interface. 21 21 hwaddr is the MAC address of the device you want to use to restore through 22 proto is the protocol to use for mounting the remote share (default is NFS, sshfs isalso available)22 proto is the protocol to use for mounting the remote share (default is NFS, sshfs and smbfs are also available) 23 23 server is the ip addr of the Remote Network server 24 24 mountpoint is the mount point on the Remote Network server to use (if NFS, should be in /etc/exports of the NFS server) -
branches/3.0/mindi/rootfs/sbin/start-netfs
r2951 r3098 104 104 ln -sf /dev/console /dev/tty 105 105 sshfs -o ro,StrictHostKeyChecking=no $netfsopt $netfsmount /tmp/isodir 106 elif [ "$proto" = "smbfs" ]; then 107 LogIt "Mounting SMBFS share ($netfsmount) on /tmp/isodir..." 108 mount -t cifs $netfsopt $netfsmount /tmp/isodir -o ro 106 109 elif [ "$proto" != "" ]; then 107 110 if [ -x /sbin/rpcbind ]; then -
branches/3.0/mondo-doc/mondoarchive.8
r3068 r3098 127 127 and mondoarchive will try to do its best to support it. 128 128 Other protocols are available such as sshfs for fuse SSH based filesystem 129 mount, with the same syntax e.g. 'sshfs://user@192.168.1.3:/home/nfs' 129 mount, with the same syntax e.g. 'sshfs://user@192.168.1.3:/home/nfs' and 130 smbfs (aka cifs) for SaMBa or Windows based filesystem mount. 130 131 131 132 .TP -
branches/3.0/mondo/src/common/libmondo-cli.c
r3060 r3098 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); 538 540 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 539 541 sprintf(tmp, "mount %s@%s", bkpinfo->netfs_user, bkpinfo->netfs_mount); … … 545 547 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 546 548 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); 547 551 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 548 552 sprintf(tmp, "mount %s", bkpinfo->netfs_mount); -
branches/3.0/mondo/src/common/libmondo-devices.c
r3062 r3098 2174 2174 { 2175 2175 char *tmp = NULL; 2176 char *tmpro = NULL; 2176 2177 char *tmp1 = NULL; 2177 2178 char *mds = NULL; … … 2528 2529 strcpy(tmp1, bkpinfo->netfs_proto); 2529 2530 if (!popup_and_get_string 2530 ("Network protocol", "Which protocol should I use (nfs/sshfs ) ?",2531 ("Network protocol", "Which protocol should I use (nfs/sshfs/smbfs) ?", 2531 2532 tmp1, MAX_STR_LEN)) { 2532 2533 log_to_screen("User has chosen not to backup the PC"); … … 2567 2568 sprintf(command, "mkdir -p %s", bkpinfo->isodir); 2568 2569 run_program_and_log_output(command, 5); 2570 2569 2571 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"); 2574 } 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); 2583 } 2584 else { 2570 2585 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 2571 mr_asprintf(&tmp, "sshfs -o ro");2586 mr_asprintf(&tmp, "sshfs %s ",tmpro); 2572 2587 } else { 2573 mr_asprintf(&tmp, "mount -t %s -o nolock ,ro", bkpinfo->netfs_proto);2588 mr_asprintf(&tmp, "mount -t %s -o nolock %s ", bkpinfo->netfs_proto,tmpro); 2574 2589 } 2575 } else { 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); 2590 if (bkpinfo->netfs_user) { 2591 mr_strcat(tmp, "%s@", bkpinfo->netfs_user); 2580 2592 } 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); 2593 mr_strcat(tmp, "%s %s", bkpinfo->netfs_mount, bkpinfo->isodir); 2594 } 2587 2595 run_program_and_log_output(tmp, 3); 2588 2596 mr_free(tmp); -
branches/3.0/mondo/src/mondorestore/mondorestore.c
r3060 r3098 3134 3134 bkpinfo->netfs_mount); 3135 3135 } 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); 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 } 3140 3145 } else { 3141 sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir", 3142 bkpinfo->netfs_mount); 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 } 3143 3153 } 3144 3154 }
Note:
See TracChangeset
for help on using the changeset viewer.