Changeset 1107 in MondoRescue for branches/stable/mondo/src/common/libmondo-tools.c
- Timestamp:
- Feb 8, 2007, 12:09:34 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-tools.c
r1095 r1107 229 229 } 230 230 } 231 // log_msg(1, "tmp = '%s'", tmp);231 // mr_msg(1, "tmp = '%s'", tmp); 232 232 d = atof(tmp); 233 233 #endif 234 log_msg(1, "g_kernel_version = %f", d);234 mr_msg(1, "g_kernel_version = %f", d); 235 235 return (d); 236 236 } … … 430 430 1024; 431 431 432 log_msg(1, "Foo");432 mr_msg(1, "Foo"); 433 433 if (bkpinfo->backup_media_type == tape) { 434 log_msg(1, "Bar");434 mr_msg(1, "Bar"); 435 435 sprintf(tmp, "mt -f %s status", bkpinfo->media_device); 436 log_msg(1, "tmp = '%s'", tmp);436 mr_msg(1, "tmp = '%s'", tmp); 437 437 if (run_program_and_log_output(tmp, 3)) { 438 438 fatal_error … … 548 548 } 549 549 } 550 log_msg(2, "call_make_iso (DVD res) is ... %s",550 mr_msg(2, "call_make_iso (DVD res) is ... %s", 551 551 bkpinfo->call_make_iso); 552 552 } // end of DVD code … … 791 791 int i; 792 792 793 log_msg(1, "Hi");793 mr_msg(1, "Hi"); 794 794 assert(bkpinfo != NULL); 795 795 memset((void *) bkpinfo, 0, sizeof(struct s_bkpinfo)); … … 1102 1102 } else if (strstr(value, "/dev/") && strstr(value, "t0") 1103 1103 && !strcmp(label, "media-dev")) { 1104 log_msg(2, "FYI, I shan't read new value for %s - already got %s",1104 mr_msg(2, "FYI, I shan't read new value for %s - already got %s", 1105 1105 label, value); 1106 1106 return (0); … … 1184 1184 1185 1185 if (!g_autofs_exe[0]) { 1186 log_msg(3, "No autofs detected.");1186 mr_msg(3, "No autofs detected."); 1187 1187 } else { 1188 log_msg(3, "%s --- autofs detected", g_autofs_exe);1188 mr_msg(3, "%s --- autofs detected", g_autofs_exe); 1189 1189 // FIXME -- only disable it if it's running --- sprintf(tmp, "%s status", autofs_exe); 1190 1190 sprintf(tmp, "%s stop", g_autofs_exe); … … 1206 1206 1207 1207 if (!g_autofs_stopped || !g_autofs_exe[0]) { 1208 log_msg(3, "No autofs detected.");1208 mr_msg(3, "No autofs detected."); 1209 1209 return; 1210 1210 } … … 1227 1227 char command[MAX_STR_LEN]; 1228 1228 1229 log_msg(1, "Started sub");1230 log_msg(4, "About to set g_boot_mountpt[0] to '\\0'");1229 mr_msg(1, "Started sub"); 1230 mr_msg(4, "About to set g_boot_mountpt[0] to '\\0'"); 1231 1231 g_boot_mountpt[0] = '\0'; 1232 log_msg(4, "Done. Great. Seeting command to something");1232 mr_msg(4, "Done. Great. Seeting command to something"); 1233 1233 strcpy(command, 1234 1234 "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[ ]/boot[ ]\" | tr -s ' ' '\t' | cut -f1 | head -n1"); 1235 log_msg(4, "Cool. Command = '%s'", command);1235 mr_msg(4, "Cool. Command = '%s'", command); 1236 1236 strcpy(tmp, call_program_and_get_last_line_of_output(command)); 1237 log_msg(4, "tmp = '%s'", tmp);1237 mr_msg(4, "tmp = '%s'", tmp); 1238 1238 if (tmp[0]) { 1239 1239 log_it("/boot is at %s according to /etc/fstab", tmp); … … 1241 1241 if (!run_program_and_log_output("mount /boot", 5)) { 1242 1242 strcpy(g_boot_mountpt, "/boot"); 1243 log_msg(1, "Mounted /boot");1243 mr_msg(1, "Mounted /boot"); 1244 1244 } else { 1245 1245 log_it("...ignored cos it's a label :-)"); … … 1247 1247 } else { 1248 1248 sprintf(command, "mount | grep -E '^%s'", tmp); 1249 log_msg(3, "command = %s", command);1249 mr_msg(3, "command = %s", command); 1250 1250 if (run_program_and_log_output(command, 5)) { 1251 1251 strcpy(g_boot_mountpt, tmp); … … 1257 1257 if (run_program_and_log_output(tmp, 5)) { 1258 1258 g_boot_mountpt[0] = '\0'; 1259 log_msg(1, "Plan B");1259 mr_msg(1, "Plan B"); 1260 1260 if (!run_program_and_log_output("mount /boot", 5)) { 1261 1261 strcpy(g_boot_mountpt, "/boot"); 1262 log_msg(1, "Plan B worked");1262 mr_msg(1, "Plan B worked"); 1263 1263 } else { 1264 log_msg(1,1264 mr_msg(1, 1265 1265 "Plan B failed. Unable to mount /boot for backup purposes. This probably means /boot is mounted already, or doesn't have its own partition."); 1266 1266 } … … 1269 1269 } 1270 1270 } 1271 log_msg(1, "Ended sub");1271 mr_msg(1, "Ended sub"); 1272 1272 } 1273 1273 … … 1280 1280 char tmp[MAX_STR_LEN]; 1281 1281 1282 log_msg(3, "starting");1282 mr_msg(3, "starting"); 1283 1283 if (g_boot_mountpt[0]) { 1284 1284 sprintf(tmp, "umount %s", g_boot_mountpt); … … 1287 1287 } 1288 1288 } 1289 log_msg(3, "leaving");1289 mr_msg(3, "leaving"); 1290 1290 } 1291 1291 … … 1336 1336 1337 1337 /** 1338 * The standard log_debug_msg() ( log_msg() also due to a macro). Writes some describing1338 * The standard log_debug_msg() (mr_msg() also due to a macro). Writes some describing 1339 1339 * information to the logfile. 1340 1340 */ … … 1444 1444 for(i=0;list_of_arrays[i];i++) 1445 1445 { 1446 log_msg(5, "Allocating %d", i);1446 mr_msg(5, "Allocating %d", i); 1447 1447 ppcurr = list_of_arrays[i]; 1448 1448 if (mal) … … 1456 1456 } 1457 1457 } 1458 log_msg(5, "Returning");1458 mr_msg(5, "Returning"); 1459 1459 */ 1460 1460 } … … 1490 1490 ("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99")); 1491 1491 if (g_magicdev_command[0]) { 1492 log_msg(1, "g_magicdev_command = '%s'", g_magicdev_command);1492 mr_msg(1, "g_magicdev_command = '%s'", g_magicdev_command); 1493 1493 paranoid_system("killall magicdev"); 1494 1494 }
Note:
See TracChangeset
for help on using the changeset viewer.