- Timestamp:
- Apr 29, 2014, 9:23:09 PM (11 years ago)
- Location:
- branches/3.2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi/rootfs/usr/sbin/find-and-mount-cdrom
r3216 r3271 7 7 for device in /dev/hd? /dev/scd? /dev/rcd? /dev/sr? /dev/cd? /dev/ide/*/*/*/*/cd /dev/scsi/*/*/*/*/cd; do 8 8 [ ! "$SECOND_TRY" ] && LogIt "Trying $device" 9 if [ "`grep "using-cdstream yes" /tmp/mondo -restore.cfg 2> /dev/null`" ]; then9 if [ "`grep "using-cdstream yes" /tmp/mondorestore.cfg 2> /dev/null`" ]; then 10 10 pwd=`pwd` 11 11 cd $GROOVY … … 76 76 fi 77 77 [ "$1" = "--second-try" ] && exit 1; 78 if [ "`grep "using-cdstream yes" /tmp/mondo -restore.cfg 2> /dev/null`" ] ; then78 if [ "`grep "using-cdstream yes" /tmp/mondorestore.cfg 2> /dev/null`" ] ; then 79 79 LogIt "Because you are using cdstream, I won't try to mount CD." 80 80 exit 0 -
branches/3.2/mindi/rootfs/usr/sbin/hack-cfg-if-necessary
r3216 r3271 16 16 LogIt "OK, we've found /mnt/cdrom/archives/*; great." 17 17 18 if ! grep "backup-media-type iso" /tmp/mondo -restore.cfg 2> /dev/null ; then18 if ! grep "backup-media-type iso" /tmp/mondorestore.cfg 2> /dev/null ; then 19 19 LogIt "Config file is fine, BTW." 20 20 exit 0 21 21 fi 22 22 23 LogIt "Re-jigging mondo -restore.cfg because you backed up to ISOs and then burned them to CDs" 124 sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondo -restore.cfg23 LogIt "Re-jigging mondorestore.cfg because you backed up to ISOs and then burned them to CDs" 1 24 sed -i 's/backup-media-type iso/backup-media-type cdr/' /tmp/mondorestore.cfg 25 25 LogIt "Done re-jigging. Yay." 26 26 exit 0 -
branches/3.2/mindi/rootfs/usr/sbin/post-init
r3216 r3271 62 62 63 63 mondoopt="" 64 if [ "`grep -i 'obdr ' /tmp/mondo -restore.cfg 2> /dev/null`" ]; then64 if [ "`grep -i 'obdr ' /tmp/mondorestore.cfg 2> /dev/null`" ]; then 65 65 mondoopt="$mondoopt -o -d $TAPEDEV" 66 66 fi … … 77 77 mondorestore $mondoopt -Z nuke 78 78 elif [ "$expert" ] ; then 79 if [ "`grep tapedev /tmp/mondo -restore.cfg 2> /dev/null`" ] ; then79 if [ "`grep tapedev /tmp/mondorestore.cfg 2> /dev/null`" ] ; then 80 80 LogIt "-------------------TAPE MODE-------------------" 1 81 81 loc=`which mondorestore 2> /dev/null` … … 90 90 fi 91 91 fi 92 elif [ "`grep using-cdstream /tmp/mondo -restore.cfg 2> /dev/null`" ] ; then92 elif [ "`grep using-cdstream /tmp/mondorestore.cfg 2> /dev/null`" ] ; then 93 93 LogIt "------------------CDSTREAM MODE------------------" 1 94 94 loc=`which mondorestore 2> /dev/null` -
branches/3.2/mindi/rootfs/usr/sbin/start-netfs
r3261 r3271 11 11 12 12 # Get info from config file 13 ipdev=`grep netfs-dev /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`14 hwaddr=`grep netfs-client-hwaddr /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`15 ipaddress=`grep netfs-client-ipaddr /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`16 ipnetmask=`grep netfs-client-netmask /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`17 ipbroadcast=`grep netfs-client-broadcast /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`18 ipgateway=`grep netfs-client-defgw /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`19 proto=`grep netfs-proto /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`20 iproute=`grep netfs-route /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`13 ipdev=`grep netfs-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 14 hwaddr=`grep netfs-client-hwaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 15 ipaddress=`grep netfs-client-ipaddr /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 16 ipnetmask=`grep netfs-client-netmask /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 17 ipbroadcast=`grep netfs-client-broadcast /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 18 ipgateway=`grep netfs-client-defgw /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 19 proto=`grep netfs-proto /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 20 iproute=`grep netfs-route /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 21 21 ipconf="" 22 22 pre="" 23 23 post="" 24 export netfsmount=`grep netfs-server-mount /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`25 export imgname=`grep iso-prefix /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`24 export netfsmount=`grep netfs-server-mount /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 25 export imgname=`grep iso-prefix /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 26 26 if [ "$imgname" = "" ]; then 27 27 export imgname="mondorescue" 28 28 fi 29 export dirimg=`grep netfs-server-path /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`29 export dirimg=`grep netfs-server-path /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 30 30 if [ "$dirimg" = "" ]; then 31 31 export dirimg="/" … … 70 70 71 71 # If same system, map to the right MAC address 72 hwaddr_found=`ifconfig $ipdev | /bin/grep HWaddr | awk '{print $NF}'` 73 if [ "$hwaddr" != "$hwaddr_found" ]; then 74 ipdev_new=`ifconfig -a | /bin/grep $hwaddr | awk '{print $1}'` 75 if [ "$ipdev_new" != "" ]; then 76 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)" 77 ipdev=$ipdev_new 78 else 79 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address" 72 if [ "$hwaddr" != "" ]; then 73 hwaddr_found=`ifconfig $ipdev | grep HWaddr | awk '{print $NF}'` 74 if [ "$hwaddr" != "$hwaddr_found" ]; then 75 ipdev_new=`ifconfig -a | grep $hwaddr | awk '{print $1}'` 76 if [ "$ipdev_new" != "" ]; then 77 LogIt "Interface $ipdev changed to $ipdev_new (MAC: $hwaddr)" 78 ipdev=$ipdev_new 79 else 80 LogIt "NOTE: Interface $ipdev kept despite it doesn't match the $hwaddr MAC address" 81 fi 80 82 fi 81 83 fi … … 118 120 elif [ "$proto" != "" ]; then 119 121 if [ -x /sbin/rpcbind ]; then 120 "Starting rpcbind daemon..."122 echo "Starting rpcbind daemon..." 121 123 /sbin/rpcbind -w & 122 124 fi -
branches/3.2/mindi/rootfs/usr/sbin/start-usb
r3216 r3271 7 7 8 8 # Get info from config file 9 MRUSBDEV=`grep usb-dev /tmp/mondo -restore.cfg 2> /dev/null | cut -d' ' -f2-`9 MRUSBDEV=`grep usb-dev /tmp/mondorestore.cfg 2> /dev/null | cut -d' ' -f2-` 10 10 11 11 # info from cmdline are predominent -
branches/3.2/mondo/src/common/libmondo-devices.c
r3263 r3271 2327 2327 paranoid_fclose(fin); 2328 2328 } else { 2329 if (does_file_exist("/tmp/mondo -restore.cfg")) {2330 read_cfg_var("/tmp/mondo -restore.cfg", "media-dev", bkpinfo->media_device);2329 if (does_file_exist("/tmp/mondorestore.cfg")) { 2330 read_cfg_var("/tmp/mondorestore.cfg", "media-dev", bkpinfo->media_device); 2331 2331 } 2332 2332 } -
branches/3.2/mondo/src/common/libmondo-filelist.c
r3238 r3271 698 698 699 699 strcpy(val_sz,""); 700 mr_asprintf(cfg_fname, "%s/mondo -restore.cfg", bkpinfo->tmpdir);700 mr_asprintf(cfg_fname, "%s/mondorestore.cfg", bkpinfo->tmpdir); 701 701 read_cfg_var(cfg_fname, "last-filelist-number", val_sz); 702 702 mr_free(cfg_fname); -
branches/3.2/mondo/src/common/libmondo-stream.c
r3194 r3271 871 871 // FIXME 872 872 } 873 mr_asprintf(tmp, "tar -zxf %s ./tmp/mondo -restore.cfg 2> /dev/null", outfname);873 mr_asprintf(tmp, "tar -zxf %s ./tmp/mondorestore.cfg 2> /dev/null", outfname); 874 874 paranoid_system(tmp); 875 875 mr_free(tmp); 876 876 877 paranoid_system("cp -f tmp/mondo -restore.cfg . 2> /dev/null");877 paranoid_system("cp -f tmp/mondorestore.cfg . 2> /dev/null"); 878 878 if (chdir(old_cwd)) { 879 879 // FIXME -
branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c
r3263 r3271 29 29 30 30 /** 31 * The mondo -restore.cfg stub (appended to the directory where all.tar.gz was unpacked).31 * The mondorestore.cfg stub (appended to the directory where all.tar.gz was unpacked). 32 32 */ 33 #define MONDO_CFG_FILE_STUB "tmp/mondo -restore.cfg"33 #define MONDO_CFG_FILE_STUB "tmp/mondorestore.cfg" 34 34 /** 35 35 * The i-want-my-lvm stub … … 170 170 171 171 /** 172 * Extract @c mondo -restore.cfg and @c mountlist.txt from @p ramdisk_fname.172 * Extract @c mondorestore.cfg and @c mountlist.txt from @p ramdisk_fname. 173 173 * @param bkpinfo The backup information structure. @c tmpdir is the only field used. 174 174 * @param ramdisk_fname The filename of the @b compressed ramdisk to look in. … … 180 180 181 181 /** 182 * Keep trying to get mondo -restore.cfg from the archive, until the user gives up.182 * Keep trying to get mondorestore.cfg from the archive, until the user gives up. 183 183 */ 184 184 void get_cfg_file_from_archive_or_bust() … … 628 628 /** 629 629 * Fill out @p bkpinfo based on @p cfg_file. 630 * @param cfg_file The mondo -restore.cfg file to read into @p bkpinfo.630 * @param cfg_file The mondorestore.cfg file to read into @p bkpinfo. 631 631 * @param bkpinfo The backup information structure to fill out with information 632 632 * from @p cfg_file. … … 2022 2022 2023 2023 /** 2024 * Extract mondo -restore.cfg and the mountlist from the tape inserted2024 * Extract mondorestore.cfg and the mountlist from the tape inserted 2025 2025 * to the ./tmp/ directory. 2026 2026 * @param dev The tape device to read from. … … 2157 2157 mr_free(tmp); 2158 2158 2159 if (!does_file_exist("tmp/mondo -restore.cfg")) {2159 if (!does_file_exist("tmp/mondorestore.cfg")) { 2160 2160 log_to_screen("Cannot find config info on media"); 2161 2161 return (1); … … 2236 2236 } 2237 2237 2238 log_to_screen("Recovered mondo -restore.cfg");2238 log_to_screen("Recovered mondorestore.cfg"); 2239 2239 if (!does_file_exist(MOUNTLIST_FNAME_STUB)) { 2240 2240 log_to_screen("...but not mountlist.txt - a pity, really...");
Note:
See TracChangeset
for help on using the changeset viewer.