Changeset 196 in MondoRescue for branches/2.05/mondo
- Timestamp:
- Dec 14, 2005, 12:04:21 AM (19 years ago)
- Location:
- branches/2.05/mondo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.05/mondo/ChangeLog
r195 r196 23 23 - disable x11 build by default (Bruno Cornec) 24 24 - remove sbminst (Bruno Cornec/Andree Leidenfrost) 25 - use parted2fdisk everywhere (Bruno Cornec) 25 26 26 27 v2.05 (2005-11-19) -
branches/2.05/mondo/mondo/common/libmondo-devices.c
r161 r196 2748 2748 2749 2749 sprintf(list_drives_cmd, 2750 // "parted2fdisk 2751 "fdisk -l 2>/dev/null | grep \"/dev/.*:\" | tr -s ':' ' ' | tr -s ' ' '\n' | grep /dev/; echo %s", 2750 "parted2fdisk -l 2>/dev/null | grep \"/dev/.*:\" | tr -s ':' ' ' | tr -s ' ' '\n' | grep /dev/; echo %s", 2752 2751 where_is_root_mounted()); 2753 2752 log_it("list_drives_cmd = %s", list_drives_cmd); … … 2904 2903 malloc_string(fdisk); 2905 2904 log_msg(0, "Looking for partition table format type"); 2906 // BERLIOS: Do that temporarily: we need to put back parted2fdisk everywhere 2907 #ifdef __IA64__ 2908 sprintf(fdisk, "/usr/local/bin/fdisk"); 2909 if (stat(fdisk, &buf) != 0) { 2910 #endif 2911 sprintf(fdisk, "/sbin/fdisk"); 2912 #ifdef __IA64__ 2913 } 2914 #endif 2905 sprintf(fdisk, "/sbin/parted2fdisk"); 2915 2906 log_msg(1, "Using %s", fdisk); 2916 2907 sprintf(command, "%s -l %s | grep 'EFI GPT'", fdisk, drive); -
branches/2.05/mondo/mondo/common/libmondo-files.c
r192 r196 1189 1189 char nfs_client_ipaddr[MAX_STR_LEN]; 1190 1190 char nfs_client_netmask[MAX_STR_LEN]; 1191 char nfs_client_broadcast[MAX_STR_LEN]; 1191 1192 char nfs_client_defgw[MAX_STR_LEN]; 1192 1193 char nfs_server_ipaddr[MAX_STR_LEN]; … … 1222 1223 call_program_and_get_last_line_of_output(command)); 1223 1224 sprintf(command, 1225 "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\\n' | head -n1 | tr -s '\t' ' ' | cut -d' ' -f8 | cut -d':' -f2"); 1226 strcpy(nfs_client_broadcast, 1227 call_program_and_get_last_line_of_output(command)); 1228 sprintf(command, 1224 1229 "route -n | grep '^0.0.0.0' | awk '{printf $2}'"); 1225 1230 strcpy(nfs_client_defgw, … … 1239 1244 } 1240 1245 fprintf(fout, "ifconfig lo 127.0.0.1 # config loopback\n"); 1241 fprintf(fout, "ifconfig %s %s netmask %s # config client\n", nfs_dev,1242 nfs_client_ipaddr, nfs_client_netmask );1246 fprintf(fout, "ifconfig %s %s netmask %s broadcast %s # config client\n", nfs_dev, 1247 nfs_client_ipaddr, nfs_client_netmask, nfs_client_broadcast); 1243 1248 fprintf(fout, "route add default gw %s # default route\n", nfs_client_defgw); 1244 1249 fprintf(fout, "ping -c 1 %s # ping server\n", nfs_server_ipaddr); … … 1262 1267 sprintf(tmp, "%s/NFS-CLIENT-NETMASK", bkpinfo->tmpdir); 1263 1268 write_one_liner_data_file(tmp, nfs_client_netmask); 1269 sprintf(tmp, "%s/NFS-CLIENT-BROADCAST", bkpinfo->tmpdir); 1270 write_one_liner_data_file(tmp, nfs_client_broadcast); 1264 1271 sprintf(tmp, "%s/NFS-CLIENT-DEFGW", bkpinfo->tmpdir); 1265 1272 write_one_liner_data_file(tmp, nfs_client_defgw); -
branches/2.05/mondo/mondo/common/libmondo-tools.c
r182 r196 1220 1220 } 1221 1221 1222 if (!run_program_and_log_output(" fdisk -l | grep -i raid", 1)1222 if (!run_program_and_log_output("parted2fdisk -l | grep -i raid", 1) 1223 1223 && !does_file_exist("/etc/raidtab")) { 1224 1224 log_to_screen -
branches/2.05/mondo/mondo/mondorestore/mondo-prep.c
r128 r196 1525 1525 #else 1526 1526 make_hole_for_file(FDISK_LOG); 1527 #ifdef __IA64__ 1528 sprintf(tmp, "parted2fdisk %s >> %s 2>> %s", drivename, FDISK_LOG, 1529 FDISK_LOG); 1530 #else 1531 sprintf(tmp, "fdisk %s >> %s 2>> %s", drivename, FDISK_LOG, FDISK_LOG); 1532 #endif 1527 sprintf(tmp, "parted2fdisk %s >> %s 2>> %s", drivename, FDISK_LOG, FDISK_LOG); 1533 1528 pout_to_fdisk = popen(tmp, "w"); 1534 1529 if (!pout_to_fdisk) { 1535 log_to_screen("Cannot call fdisk to configure %s", drivename);1530 log_to_screen("Cannot call parted2fdisk to configure %s", drivename); 1536 1531 paranoid_free(device_str); 1537 1532 paranoid_free(format); -
branches/2.05/mondo/mondo/restore-scripts/mondo/grub-MR
r139 r196 166 166 line=`cat /proc/mdstat | grep $base | head -n1` 167 167 echo "mbrpart was $mbrpart" 168 mbrpart=` fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' \168 mbrpart=`parted2fdisk -l | grep /dev/ | head -n1 | tr ':' ' ' \ 169 169 | cut -d' ' -f2` 170 170 echo "mbrpart is $mbrpart" -
branches/2.05/mondo/mondo/restore-scripts/mondo/make-me-bootable
r30 r196 31 31 boot_drv=$drive 32 32 boot_part=$partno 33 # if [ "$mountpt" = "/" ] || [ "$mountpt" = "/boot" ] || [ "$format" = "vfat" ] ; then34 # LogIt "Making $i bootable (drive=$drive, partno=$partno)"35 # echo -e -n "a\n$partno\nw\n" | fdisk $drive >> $LOGFILE 2>> $LOGFILE36 # HAVE_ACTIVE="true"37 33 fi 38 34 fi
Note:
See TracChangeset
for help on using the changeset viewer.