Changeset 801 in MondoRescue
- Timestamp:
- Sep 22, 2006, 1:06:49 AM (18 years ago)
- Location:
- branches/stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/rootfs/sbin/start-nfs
r742 r801 3 3 # $Id$ 4 4 # 5 # This script set up the network + NFS environement if needed.5 # This script setup the network + NFS environment if needed. 6 6 # 7 7 … … 17 17 ipgateway=`grep nfs-client-defgw /tmp/mondo-restore.cfg | cut -d' ' -f2-` 18 18 ipconf="" 19 nfsmount=`grep nfs-server-mount /tmp/mondo-restore.cfg | cut -d' ' -f2-`20 imgname=`grep iso-prefix /tmp/mondo-restore.cfg | cut -d' ' -f2-`19 export nfsmount=`grep nfs-server-mount /tmp/mondo-restore.cfg | cut -d' ' -f2-` 20 export imgname=`grep iso-prefix /tmp/mondo-restore.cfg | cut -d' ' -f2-` 21 21 if [ "$imgname" = "" ]; then 22 imgname="mondorescue"22 export imgname="mondorescue" 23 23 fi 24 dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg | cut -d' ' -f2-`24 export dirimg=`grep nfs-server-path /tmp/mondo-restore.cfg | cut -d' ' -f2-` 25 25 if [ "$dirimg" = "" ]; then 26 dirimg="/"26 export dirimg="/" 27 27 fi 28 28 … … 31 31 echo $i | grep -qi ping= && ipcount=`echo $i | cut -d= -f2` 32 32 echo $i | grep -qi ipconf= && ipconf=`echo $i | cut -d= -f2` 33 echo $i | grep -qi nfsmount= && nfsmount=`echo $i | cut -d= -f2`34 echo $i | grep -qi prefix= && imgname=`echo $i | cut -d= -f2`33 echo $i | grep -qi nfsmount= && export nfsmount=`echo $i | cut -d= -f2` 34 echo $i | grep -qi prefix= && export imgname=`echo $i | cut -d= -f2` 35 35 done 36 36 … … 73 73 mount -t nfs -o nolock $nfsmount /tmp/isodir 74 74 75 LogIt "Mounting NFS image $ imgname-1.iso in $dirimg on /mnt/cdrom in loopback"76 losetup /dev/loop7 /tmp/isodir/$dirimg/$ imgname-1.iso75 LogIt "Mounting NFS image ${imgname}-1.iso in $dirimg on /mnt/cdrom in loopback" 76 losetup /dev/loop7 /tmp/isodir/$dirimg/${imgname}-1.iso 77 77 mount -o ro -t iso9660 /dev/loop7 /mnt/cdrom -
branches/stable/mondo/mondo/mondorestore/mondo-rstr-tools.c
r799 r801 1044 1044 strcpy(bkpinfo->prefix,STD_PREFIX); 1045 1045 } 1046 /* We need to override prefix value in PXE mode as it's 1047 * already done in start-nfs */ 1048 if (strstr(call_program_and_get_last_line_of_output 1049 ("cat /proc/cmdline"), "pxe")) { 1050 strcpy(bkpinfo->prefix,getenv("imgname")); 1051 } 1052 1046 1053 } else if (!strcmp(value, "tape")) { 1047 1054 bkpinfo->backup_media_type = tape; … … 1151 1158 log_msg(2, "nfs_remote_dir is %s", bkpinfo->nfs_remote_dir); 1152 1159 } 1160 /* We need to override values in PXE mode as it's 1161 * already done in start-nfs */ 1162 if (strstr(call_program_and_get_last_line_of_output 1163 ("cat /proc/cmdline"), "pxe")) { 1164 strcpy(bkpinfo->nfs_mount,getenv("nfsmount")); 1165 strcpy(bkpinfo->nfs_remote_dir,getenv("dirimg")); 1166 } 1153 1167 } else if (bkpinfo->backup_media_type == iso) { 1154 1168 /* Patch by Conor Daly 23-june-2004 … … 1202 1216 } else { 1203 1217 log_msg(1, 1204 "You backed up to disk, then burned some CDs. Naughty monkey!");1218 "You backed up to disk, then burned some CDs."); 1205 1219 } 1206 1220 }
Note:
See TracChangeset
for help on using the changeset viewer.