Changeset 1086 in MondoRescue for trunk/mondo/src/common/libmondo-tools.c
- Timestamp:
- Feb 2, 2007, 11:21:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/common/libmondo-tools.c
r1081 r1086 232 232 } 233 233 } 234 // log_msg(1, "tmp = '%s'", tmp);234 // mr_msg(1, "tmp = '%s'", tmp); 235 235 d = atof(tmp); 236 236 #endif 237 log_msg(1, "g_kernel_version = %f", d);237 mr_msg(1, "g_kernel_version = %f", d); 238 238 return (d); 239 239 } … … 368 368 1024; 369 369 370 log_msg(1, "Foo");370 mr_msg(1, "Foo"); 371 371 if (bkpinfo->backup_media_type == tape) { 372 log_msg(1, "Bar");372 mr_msg(1, "Bar"); 373 373 mr_asprintf(&tmp, "mt -f %s status", bkpinfo->media_device); 374 log_msg(1, "tmp = '%s'", tmp);374 mr_msg(1, "tmp = '%s'", tmp); 375 375 if (run_program_and_log_output(tmp, 3)) { 376 376 fatal_error … … 496 496 mr_free(command); 497 497 } 498 log_msg(2, "call_make_iso (DVD res) is ... %s",498 mr_msg(2, "call_make_iso (DVD res) is ... %s", 499 499 bkpinfo->call_make_iso); 500 500 } // end of DVD code … … 739 739 int i = 0; 740 740 741 log_msg(1, "Hi");741 mr_msg(1, "Hi"); 742 742 743 743 assert(bkpinfo != NULL); … … 1058 1058 else if (strstr(value, "/dev/") && strstr(value, "t0") 1059 1059 && !strcmp(label, "media-dev")) { 1060 log_msg(2, "FYI, I shan't read new value for %s - already got %s",1060 mr_msg(2, "FYI, I shan't read new value for %s - already got %s", 1061 1061 label, value); 1062 1062 return (0); … … 1114 1114 char *command; 1115 1115 1116 log_msg(1, "Started sub");1117 log_msg(4, "Setting command to something");1116 mr_msg(1, "Started sub"); 1117 mr_msg(4, "Setting command to something"); 1118 1118 mr_asprintf(&command, 1119 1119 "grep -v ':' /etc/fstab | grep -vE '^#.*$' | grep -E \"[ ]/boot[ ]\" | tr -s ' ' '\t' | cut -f1 | head -n1"); 1120 log_msg(4, "Cool. Command = '%s'", command);1120 mr_msg(4, "Cool. Command = '%s'", command); 1121 1121 tmp = call_program_and_get_last_line_of_output(command); 1122 1122 mr_free(command); 1123 1123 1124 log_msg(4, "tmp = '%s'", tmp);1124 mr_msg(4, "tmp = '%s'", tmp); 1125 1125 if (tmp) { 1126 1126 log_it("/boot is at %s according to /etc/fstab", tmp); … … 1129 1129 mr_free(g_boot_mountpt); 1130 1130 mr_asprintf(&g_boot_mountpt, "/boot"); 1131 log_msg(1, "Mounted /boot");1131 mr_msg(1, "Mounted /boot"); 1132 1132 } else { 1133 1133 log_it("...ignored cos it's a label :-)"); … … 1135 1135 } else { 1136 1136 mr_asprintf(&command, "mount | grep -E '^%s'", tmp); 1137 log_msg(3, "command = %s", command);1137 mr_msg(3, "command = %s", command); 1138 1138 if (run_program_and_log_output(command, 5)) { 1139 1139 mr_free(g_boot_mountpt); … … 1151 1151 mr_asprintf(&g_boot_mountpt, " "); 1152 1152 */ 1153 log_msg(1, "Plan B");1153 mr_msg(1, "Plan B"); 1154 1154 if (!run_program_and_log_output("mount /boot", 5)) { 1155 1155 mr_free(g_boot_mountpt); 1156 1156 mr_asprintf(&g_boot_mountpt, "/boot"); 1157 log_msg(1, "Plan B worked");1157 mr_msg(1, "Plan B worked"); 1158 1158 } else { 1159 log_msg(1,1159 mr_msg(1, 1160 1160 "Plan B failed. Unable to mount /boot for backup purposes. This probably means /boot is mounted already, or doesn't have its own partition."); 1161 1161 } … … 1167 1167 } 1168 1168 mr_free(tmp); 1169 log_msg(1, "Ended sub");1169 mr_msg(1, "Ended sub"); 1170 1170 } 1171 1171 … … 1178 1178 char *tmp; 1179 1179 1180 log_msg(3, "starting");1180 mr_msg(3, "starting"); 1181 1181 if (g_boot_mountpt != NULL) { 1182 1182 mr_asprintf(&tmp, "umount %s", g_boot_mountpt); … … 1186 1186 mr_free(tmp); 1187 1187 } 1188 log_msg(3, "leaving");1188 mr_msg(3, "leaving"); 1189 1189 } 1190 1190 … … 1291 1291 ("ps ax | grep -w magicdev | grep -v grep | tr -s '\t' ' '| cut -d' ' -f6-99"); 1292 1292 if (g_magicdev_command) { 1293 log_msg(1, "g_magicdev_command = '%s'", g_magicdev_command);1293 mr_msg(1, "g_magicdev_command = '%s'", g_magicdev_command); 1294 1294 paranoid_system("killall magicdev"); 1295 1295 }
Note:
See TracChangeset
for help on using the changeset viewer.