Changeset 2696 in MondoRescue for branches/2.2.10/mondo/src
- Timestamp:
- Jan 25, 2011, 10:34:40 AM (13 years ago)
- Location:
- branches/2.2.10/mondo/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2508 r2696 497 497 if (strstr(bkpinfo->netfs_proto, "sshfs")) { 498 498 mr_asprintf(tmp1, "sshfs %s", bkpinfo->netfs_mount); 499 } else if (strstr(bkpinfo->netfs_proto, "nfs")) { 500 mr_asprintf(tmp1, "mount %s", bkpinfo->netfs_mount); 499 501 } else { 500 mr_asprintf(tmp1, "mount %s", bkpinfo->netfs_mount); 502 log_to_screen("Protocol %s not supported yet for network backups.\n", bkpinfo->netfs_proto); 503 fatal_error("Bad Protocol\n"); 501 504 } 502 505 i = system(tmp1); -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2643 r2696 1271 1271 1272 1272 1273 /** 1274 * Mount the CD-ROM or USB device at /mnt/cdrom. 1275 * @param bkpinfo The backup information structure. Fields used: 1276 * - @c bkpinfo->backup_media_type 1277 * - @c bkpinfo->disaster_recovery 1278 * - @c bkpinfo->isodir 1279 * - @c bkpinfo->media_device 1280 * @return 0 for success, nonzero for failure. 1281 */ 1282 int mount_media() 1283 { 1284 char *mount_cmd = NULL; 1285 int i, res; 1286 #ifdef __FreeBSD__ 1287 char mdd[32]; 1288 char *mddev = mdd; 1289 #endif 1290 1291 if (bkpinfo->backup_media_type == tape || bkpinfo->backup_media_type == udev) { 1292 log_msg(8, "Tape/udev. Therefore, no need to mount a media."); 1293 return 0; 1294 } 1295 1296 if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) { 1297 log_msg(2, "mount_media() - media already mounted. Fair enough."); 1298 return (0); 1299 } 1300 1301 if (bkpinfo->media_device == NULL) { 1302 fatal_error("No media device at that point"); 1303 } 1304 1305 if (bkpinfo->backup_media_type == netfs) { 1306 log_msg(2, "Mounting for Network thingy"); 1307 log_msg(2, "isodir = %s", bkpinfo->isodir); 1308 if (!strcmp(bkpinfo->isodir, "/") && am_I_in_disaster_recovery_mode()) { 1309 mr_free(bkpinfo->isodir); 1310 mr_asprintf(bkpinfo->isodir, "/tmp/isodir"); 1311 log_msg(1, "isodir is being set to %s", bkpinfo->isodir); 1312 } 1313 if ((bkpinfo->isodir == NULL) || (bkpinfo->netfs_remote_dir == NULL) || (bkpinfo->prefix == NULL)) { 1314 fatal_error("Unable to prepare the iso filename"); 1315 } 1316 #ifdef __FreeBSD__ 1317 mr_asprintf(mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir, 1318 bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number); 1319 mddev = make_vn(mount_cmd); 1320 mr_free(mount_cmd); 1321 1322 mr_asprintf(mount_cmd, "mount_cd9660 -r %s " MNT_CDROM, mddev); 1323 #else 1324 mr_asprintf(mount_cmd, "mount %s/%s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number, MNT_CDROM); 1325 #endif 1326 1327 } else if (bkpinfo->backup_media_type == iso) { 1328 #ifdef __FreeBSD__ 1329 mr_sprintf(mount_cmd, "%s/%s-%d.iso", bkpinfo->isodir, 1330 bkpinfo->prefix, g_current_media_number); 1331 mddev = make_vn(mount_cmd); 1332 mr_free(mount_cmd); 1333 1334 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM); 1335 #else 1336 mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number, MNT_CDROM); 1337 #endif 1338 } else if (bkpinfo->backup_media_type == usb) { 1339 mr_asprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM); 1340 } else if (strstr(bkpinfo->media_device, "/dev/")) { 1341 #ifdef __FreeBSD__ 1342 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM); 1343 #else 1344 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM); 1345 #endif 1346 } else { 1347 mr_free(bkpinfo->media_device); 1348 if (bkpinfo->disaster_recovery && does_file_exist("/tmp/CDROM-LIVES-HERE")) { 1349 bkpinfo->media_device = last_line_of_file(MINDI_CACHE"/CDROM-LIVES-HERE"); 1350 } else { 1351 bkpinfo->media_device = find_cdrom_device(TRUE); 1352 } 1353 1354 #ifdef __FreeBSD__ 1355 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM); 1356 #else 1357 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM); 1358 #endif 1359 } 1360 1361 log_msg(2, "(mount_media) --- command = %s", mount_cmd); 1362 for (i = 0; i < 2; i++) { 1363 res = run_program_and_log_output(mount_cmd, FALSE); 1364 if (!res) { 1365 break; 1366 } else { 1367 log_msg(2, "Failed to mount device."); 1368 sleep(5); 1369 sync(); 1370 } 1371 } 1372 mr_free(mount_cmd); 1373 1374 if (res) { 1375 log_msg(2, "Failed, despite %d attempts", i); 1376 } else { 1377 log_msg(2, "Mounted media drive OK"); 1378 } 1379 return (res); 1380 } 1381 /************************************************************************** 1382 *END_MOUNT_CDROM * 1383 **************************************************************************/ 1273 1384 1274 1385 … … 1316 1427 // BERLIOS --- I'm tempted to do something about this... 1317 1428 // Why unmount and remount again and again? 1318 log_msg(3, "Remounting CD");1319 1429 g_ISO_restore_mode = TRUE; 1320 if (is_this_device_mounted(MNT_CDROM)) { 1321 run_program_and_log_output("umount " MNT_CDROM, 5); 1322 } 1323 mr_asprintf(tmp, "mkdir -p %s/isodir &> /dev/null", bkpinfo->tmpdir); 1324 (void)system(tmp); 1325 mr_free(tmp); 1326 1327 if (((bkpinfo->isodir == NULL) && (bkpinfo->netfs_remote_dir == NULL)) || (bkpinfo->prefix == NULL)) { 1328 fatal_error("Unable to prepare ISO file name. Please report to dev team"); 1329 } 1330 if (bkpinfo->netfs_remote_dir) { 1331 // NETFS 1332 mr_asprintf(tmp, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, cd_number_i_want); 1333 } else { 1334 // ISO 1335 mr_asprintf(tmp, "%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix, cd_number_i_want); 1336 } 1337 if (!does_file_exist(tmp)) { 1338 mr_free(tmp); 1339 if (bkpinfo->netfs_remote_dir) { 1340 // NETFS 1341 mr_asprintf(tmp, "%s/isodir/%s/%s-%d.iso", bkpinfo->tmpdir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, cd_number_i_want); 1342 } else { 1343 // ISO 1344 mr_asprintf(tmp, "%s/isodir/%s-%d.iso", bkpinfo->tmpdir, bkpinfo->prefix, cd_number_i_want); 1345 } 1346 if (does_file_exist(tmp)) { 1347 log_msg(1, "FIXME - hacking bkpinfo->isodir from '%s' to %s/isodir", bkpinfo->isodir, bkpinfo->tmpdir); 1348 mr_free(bkpinfo->isodir); 1349 mr_asprintf(bkpinfo->isodir, "%s/isodir", bkpinfo->tmpdir); 1350 } 1351 } 1352 log_msg(3, "Mounting %s at %s", tmp, MNT_CDROM); 1353 if (mount_CDROM_here(tmp, MNT_CDROM)) { 1354 mr_free(tmp); 1355 fatal_error("Mommy!"); 1356 } 1357 mr_free(tmp); 1430 if (!is_this_device_mounted(MNT_CDROM)) { 1431 log_msg(3, "Mounting media"); 1432 g_current_media_number = cd_number_i_want; 1433 mount_media(); 1434 } 1358 1435 } 1359 1436 if ((res = what_number_cd_is_this()) != cd_number_i_want) { … … 1947 2024 case -1: 1948 2025 /* we need to add a space after token to be sure our strstr test works correctly */ 1949 mr_asprintf(tmp1," %s ",token);2026 mr_asprintf(tmp1," %s ",token); 1950 2027 if (mode == 'E') { 1951 2028 /* Add the token if not already in the list */ 1952 mr_asprintf(tmp," %s ",bkpinfo->exclude_paths);2029 mr_asprintf(tmp," %s ",bkpinfo->exclude_paths); 1953 2030 if (strstr(tmp,tmp1) == NULL) { 1954 mr_strcat(bkpinfo->exclude_paths, " 2031 mr_strcat(bkpinfo->exclude_paths, "%s", tmp1); 1955 2032 } 1956 2033 } else { 1957 2034 /* Add the token if not already in the list */ 1958 mr_asprintf(tmp," %s ",bkpinfo->include_paths);2035 mr_asprintf(tmp," %s ",bkpinfo->include_paths); 1959 2036 if (strstr(tmp,tmp1) == NULL) { 1960 mr_strcat(bkpinfo->include_paths, " 2037 mr_strcat(bkpinfo->include_paths, "%s", tmp1); 1961 2038 } 1962 2039 } -
branches/2.2.10/mondo/src/common/libmondo-filelist.c
r2651 r2696 452 452 } 453 453 log_msg(8, "Analyzing %s", file_to_analyze); 454 tmp = mr_stresc(file_to_analyze, " `$\\\"(){}[]'*?&|!#~", '\\');454 tmp = mr_stresc(file_to_analyze, " `$\\\"(){}[]'*?&|!#~", '\\'); 455 455 mr_asprintf(strtmp, syscall_sprintf, tmp); 456 456 mr_free(tmp); … … 477 477 478 478 if (g_getfacl != NULL) { 479 mr_asprintf(command, "touch %s", facl_fname);479 mr_asprintf(command, "touch \"%s\"", facl_fname); 480 480 run_program_and_log_output(command, 8); 481 481 mr_free(command); 482 482 483 483 retval = 484 gen_aux_list(filelist, "getfacl --all-effective -P %s", facl_fname);484 gen_aux_list(filelist, "getfacl --all-effective -P \"%s\"", facl_fname); 485 485 } 486 486 return (retval); … … 494 494 495 495 if (g_getfattr != NULL) { 496 mr_asprintf(command, "touch %s", fattr_fname);496 mr_asprintf(command, "touch \"%s\"", fattr_fname); 497 497 run_program_and_log_output(command, 8); 498 498 mr_free(command); -
branches/2.2.10/mondo/src/common/libmondo-fork.c
r2607 r2696 369 369 370 370 if (!does_file_exist(lockfile)) { 371 log_to_screen("Waiting for external binary to start");371 log_to_screen("Waiting for '%s' to start",command); 372 372 for (i = 0; i < 60 && !does_file_exist(lockfile); sleep(1), i++) { 373 373 log_msg(3, "Waiting for lockfile %s to exist", lockfile); -
branches/2.2.10/mondo/src/common/libmondo-mountlist.c
r2517 r2696 331 331 /* OK, continue with main loop */ 332 332 amount_allocated += mountlist->el[pos].size / 1024L; 333 334 /* This should only happen at the end but not tested now */ 335 if (amount_allocated > physical_drive_size) { 336 // Used to be +1, but what if you're 1 MB too high? 337 mr_asprintf(tmp, " %ld MB over-allocated on %s.",amount_allocated - physical_drive_size, drive); 338 log_it(tmp); 339 340 /* Do we have more than 1 MB per partition ? */ 341 if (amount_allocated - physical_drive_size <= curr_part_no) { 342 /* Probably a rouding error, just passing over 343 * by reducing the last partition if possible */ 344 amount_allocated -= mountlist->el[pos].size / 1024L; 345 mountlist->el[pos].size = (mountlist->el[pos].size - curr_part_no*1024L); 346 amount_allocated += mountlist->el[pos].size / 1024L; 347 } else { 348 mr_strcat(flaws_str, "%s", tmp); 349 res++; 350 } 351 mr_free(tmp); 352 } 333 353 prev_part_no = curr_part_no; 334 354 } -
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2635 r2696 376 376 } 377 377 378 log_msg(1, " Foo");378 log_msg(1, "Post-param"); 379 379 if (bkpinfo->backup_media_type == tape) { 380 log_msg(1, " Bar");380 log_msg(1, "Tape"); 381 381 if (bkpinfo->media_device == NULL) { 382 382 return(1); … … 498 498 mr_asprintf(extra_cdrom_params, "blank=fast "); 499 499 } 500 tmp = find_home_of_exe("cdrecord"); 501 if (tmp) { 502 mr_asprintf(cdr_exe, "cdrecord"); 500 if (extra_cdrom_params == NULL) { 501 // If not initialized earlier, do it now 502 mr_asprintf(extra_cdrom_params, " "); 503 } 504 if (find_home_of_exe("cdrecord")) { 505 strcpy(cdr_exe, "cdrecord"); 506 } else if (find_home_of_exe("dvdrecord")) { 507 strcpy(cdr_exe, "dvdrecord"); 503 508 } else { 504 509 mr_free(tmp); … … 1181 1186 1182 1187 if (!strcmp(tmp,"")) { 1183 if ((strstr(tmp, "LABEL=") || strstr(tmp,"UUID="))) {1188 if ((strstr(tmp, "LABEL=") != NULL) || (strstr(tmp,"UUID=")!= NULL)) { 1184 1189 if (!run_program_and_log_output("mount /boot", 5)) { 1185 1190 strcpy(g_boot_mountpt, "/boot"); -
branches/2.2.10/mondo/src/include/my-stuff.h
r2635 r2696 119 119 #define MAX_TAPECATALOG_ENTRIES 16384 ///< The maximum number of entries in the tape catalog. 120 120 #define MAX_MOUNTLIST_ENTRIES 8192 ///< The maximum number of entries in the mountlist. 121 #define MAX_STR_LEN 384///< The maximum length of almost all @p char buffers in Mondo.121 #define MAX_STR_LEN 512 ///< The maximum length of almost all @p char buffers in Mondo. 122 122 /// Note: Make this divisible by eight to avoid aligment issues 123 123 /// on 64bit platforms like ia64. -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools-EXT.h
r2623 r2696 7 7 extern int iso_fiddly_bits(bool nuke_me_please); 8 8 extern void kill_petris(void); 9 extern int mount_media();10 9 extern int mount_all_devices(struct mountlist_itself *, bool); 11 10 extern void protect_against_braindead_sysadmins(void); -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2644 r2696 43 43 extern void kill_anything_like_this(char *str); 44 44 extern int skip_obdr(void); 45 extern int mount_media(); 45 46 extern int set_tape_block_size_with_mt(long internal_tape_block_size); 46 47 … … 460 461 /************************************************************************** 461 462 *END_MOUNT_ALL_DEVICES * 462 **************************************************************************/463 464 465 /**466 * Mount the CD-ROM or USB device at /mnt/cdrom.467 * @param bkpinfo The backup information structure. Fields used:468 * - @c bkpinfo->backup_media_type469 * - @c bkpinfo->disaster_recovery470 * - @c bkpinfo->isodir471 * - @c bkpinfo->media_device472 * @return 0 for success, nonzero for failure.473 */474 int mount_media() {475 476 char *mount_cmd = NULL;477 int i, res;478 #ifdef __FreeBSD__479 char mdd[32];480 char *mddev = mdd;481 #endif482 483 if (bkpinfo->backup_media_type == tape || bkpinfo->backup_media_type == udev) {484 log_msg(8, "Tape/udev. Therefore, no need to mount a media.");485 return 0;486 }487 488 if (!run_program_and_log_output("mount | grep -F "MNT_CDROM, FALSE)) {489 log_msg(2, "mount_media() - media already mounted. Fair enough.");490 return (0);491 }492 493 if (bkpinfo->media_device == NULL) {494 fatal_error("No media device at that point");495 }496 497 if (bkpinfo->backup_media_type == netfs) {498 log_msg(2, "Mounting for Network thingy");499 log_msg(2, "isodir = %s", bkpinfo->isodir);500 if (!strcmp(bkpinfo->isodir, "/") && am_I_in_disaster_recovery_mode()) {501 mr_free(bkpinfo->isodir);502 mr_asprintf(bkpinfo->isodir, "/tmp/isodir");503 log_msg(1, "isodir is being set to %s", bkpinfo->isodir);504 }505 if ((bkpinfo->isodir == NULL) || (bkpinfo->netfs_remote_dir == NULL) || (bkpinfo->prefix == NULL)) {506 fatal_error("Unable to prepare the iso filename");507 }508 #ifdef __FreeBSD__509 mr_asprintf(mount_cmd, "/mnt/isodir/%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number);510 mddev = make_vn(mount_cmd);511 mr_free(mount_cmd);512 513 mr_asprintf(mount_cmd, "mount_cd9660 -r %s "MNT_CDROM, mddev);514 #else515 mr_asprintf(mount_cmd, "mount %s/%s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);516 #endif517 518 } else if (bkpinfo->backup_media_type == iso) {519 #ifdef __FreeBSD__520 mr_asprintf(mount_cmd, "%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number);521 mddev = make_vn(mount_cmd);522 mr_free(mount_cmd);523 524 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", mddev, MNT_CDROM);525 #else526 mr_asprintf(mount_cmd, "mount %s/%s-%d.iso -t iso9660 -o loop,ro %s", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number, MNT_CDROM);527 #endif528 } else if (bkpinfo->backup_media_type == usb) {529 mr_asprintf(mount_cmd, "mount -t vfat %s %s", bkpinfo->media_device, MNT_CDROM);530 } else if (strstr(bkpinfo->media_device, "/dev/")) {531 #ifdef __FreeBSD__532 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM);533 #else534 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM);535 #endif536 } else {537 mr_free(bkpinfo->media_device);538 if (bkpinfo->disaster_recovery && does_file_exist(MINDI_CACHE"/CDROM-LIVES-HERE")) {539 bkpinfo->media_device = last_line_of_file(MINDI_CACHE"/CDROM-LIVES-HERE");540 } else {541 bkpinfo->media_device = find_cdrom_device(TRUE);542 }543 544 #ifdef __FreeBSD__545 mr_asprintf(mount_cmd, "mount_cd9660 -r %s %s", bkpinfo->media_device, MNT_CDROM);546 #else547 mr_asprintf(mount_cmd, "mount %s -t iso9660 -o ro %s", bkpinfo->media_device, MNT_CDROM);548 #endif549 }550 551 log_msg(2, "(mount_media) --- command = %s", mount_cmd);552 for (i = 0; i < 2; i++) {553 res = run_program_and_log_output(mount_cmd, FALSE);554 if (!res) {555 break;556 } else {557 log_msg(2, "Failed to mount device.");558 sleep(5);559 sync();560 }561 }562 mr_free(mount_cmd);563 564 if (res) {565 log_msg(2, "Failed, despite %d attempts", i);566 } else {567 log_msg(2, "Mounted media drive OK");568 }569 return (res);570 }571 /**************************************************************************572 *END_MOUNT_CDROM *573 463 **************************************************************************/ 574 464 -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.h
r2623 r2696 7 7 int iso_fiddly_bits(bool nuke_me_please); 8 8 void kill_petris(void); 9 int mount_media();10 9 int mount_device(char *, char *, char *, bool); 11 10 int mount_all_devices(struct mountlist_itself *, bool); -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2623 r2696 50 50 extern int partition_everything(struct mountlist_itself *mountlist); 51 51 extern int handle_incoming_parameters(int argc, char *argv[]); 52 extern int mount_media(); 52 53 53 54 /** … … 2485 2486 2486 2487 mvaddstr_and_log_it(g_currentY, 0, "Preparing to read your archives"); 2488 mount_media(); 2487 2489 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2488 mount_media();2489 2490 mvaddstr_and_log_it(g_currentY++, 0, 2490 2491 "Restoring OS and data from streaming media"); … … 2504 2505 mvaddstr_and_log_it(g_currentY++, 0, 2505 2506 "Restoring OS and data from CD/USB "); 2506 mount_media();2507 2507 resA = restore_all_tarballs_from_CD(filelist); 2508 2508 resB = restore_all_biggiefiles_from_CD(filelist); -
branches/2.2.10/mondo/src/restore-scripts/mondo/grub-MR
r2635 r2696 103 103 fi 104 104 105 # For some OpenSuSE 106 res=1 107 if [ "$MNT_RESTORING" ] ; then 108 if [ -x $MNT_RESTORING/usr/sbin/grub-install.unsupported ]; then 109 echo "Now I'll use grub-install.unsupported in chroot" >> $LOGFILE 110 chroot $MNT_RESTORING /usr/sbin/grub-install.unsupported $1 >> $LOGFILE 2>> $LOGFILE 111 res=$? 112 echo "grub-install.unsupported in chroot returned $res" >> $LOGFILE 113 fi 114 else 115 if [ -x /usr/sbin/grub-install.unsupported ]; then 116 echo "Now I'll use grub-install.unsupported locally" >> $LOGFILE 117 /usr/sbin/grub-install.unsupported $1 >> $LOGFILE 2>> $LOGFILE 118 res=$? 119 echo "grub-install.unsupported returned $res" >> $LOGFILE 120 fi 121 fi 122 [ "$res" -eq "0" ] && exit 0 123 105 124 echo "Now I'll use grub-install" >> $LOGFILE 106 125 if [ "$MNT_RESTORING" ] ; then 107 chroot $MNT_RESTORING grub-install $1 2>&1 | tee -a$LOGFILE126 chroot $MNT_RESTORING grub-install $1 >> $LOGFILE 2>> $LOGFILE 108 127 res=$? 109 128 else 110 grub-install $1 2>&1 | tee -a$LOGFILE129 grub-install $1 >> $LOGFILE 2>> $LOGFILE 111 130 res=$? 112 131 fi 113 132 echo "grub-install returned $res" >> $LOGFILE 114 [ "$res" -eq "0" ] && exit 0115 116 # For some OpenSuSE117 echo "Now I'll use grub-install.unsupported" >> $LOGFILE118 if [ "$MNT_RESTORING" ] ; then119 chroot $MNT_RESTORING grub-install.unsupported $1 2>&1 | tee -a $LOGFILE120 res=$?121 else122 grub-install.unsupported $1 2>&1 | tee -a $LOGFILE123 res=$?124 fi125 echo "grub-install.unsupported returned $res" >> $LOGFILE126 133 [ "$res" -eq "0" ] && exit 0 127 134 … … 172 179 echo "Now I'll use grub-install.patched" >> $LOGFILE 173 180 cp -f `which grub-install.patched` /mnt/RESTORING/sbin 174 chroot /mnt/RESTORING grub-install.patched $1 2>&1 | tee -a$LOGFILE181 chroot /mnt/RESTORING grub-install.patched $1 >> $LOGFILE 2>> $LOGFILE 175 182 res=$? 176 183 echo "grub-install.patched returned $res" >> $LOGFILE
Note:
See TracChangeset
for help on using the changeset viewer.