Changeset 3360 in MondoRescue for branches/3.0/mindi/parted2fdisk.pl
- Timestamp:
- Mar 7, 2015, 2:41:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/parted2fdisk.pl
r3336 r3360 4 4 # 5 5 # parted2fdisk: fdisk like interface for parted 6 # [develop ped for mindi/mondo http://www.mondorescue.org]6 # [developed for mindi/mondo http://www.mondorescue.org] 7 7 # 8 8 # Aims to be architecture independant (i386/ia64) 9 9 # Tested on ia64 with RHAS 2.1 - Mandrake 9.0 - RHEL 3.0 - SLES 10 10 10 # 11 # Copyright B. Cornec 2000-201 311 # Copyright B. Cornec 2000-2015 12 12 # Provided under the GPL v2 13 13 14 14 use strict; 15 use File::Basename; 15 16 16 17 … … 19 20 =head1 NAME 20 21 21 parted2fdisk is a fdisk li e command using parted internally.22 parted2fdisk is a fdisk like command using parted internally. 22 23 23 24 =head1 DESCRIPTION 24 25 25 parted2fdisk behaves like a fdisk command, but dialog internally with parted in order to manipulate partiion tables, which allow it to support GPT partition format as well as MBR, contrary to fdisk. It aimed at providing compatible external interface wti fdisk. Developed initialy for ia64 Linux, but is also useful now on x86 systems using GPT partition format (for large HDDs).26 parted2fdisk behaves like the fdisk command, but dialog internally with parted in order to manipulate partition tables, which allow it to support GPT partition format as well as MBR, contrary to fdisk. It aims at providing compatible external interface with fdisk. Developed initialy for ia64 Linux, it is also useful now on x86 systems using GPT partition format (for large HDDs). 26 27 27 28 =head1 SYNOPSIS … … 96 97 97 98 my $fdisk = "/sbin/fdisk"; 99 $fdisk = "/usr/sbin/fdisk" if (not -x "/sbin/fdisk"); 98 100 my $parted = "/sbin/parted"; 101 $parted = "/usr/sbin/parted" if (not -x "/sbin/parted"); 99 102 100 103 my $i; … … 156 159 "linux-swap" => "82", 157 160 "lvm" => "8e", 161 "raid" => "fd", 158 162 "" => "", 159 163 ); … … 435 439 "linux-swap" => "Linux swap", 436 440 "lvm" => "Linux LVM", 441 "raid" => "RAID Linux auto", 437 442 "fat16" => "fat16", 438 443 "fat32" => "fat32", … … 479 484 480 485 # This will return MB 481 get_parted 486 get_parted($device,$start,$end,\%type); 482 487 483 488 while (($n,$d) = each %type) { … … 675 680 } 676 681 677 678 # Based on Version 2.4 27-Sep-1996 Charles Bailey bailey@genetics.upenn.edu679 # in Basename.pm680 681 sub basename {682 683 my($fullname) = shift;684 685 my($dirpath,$basename);686 687 ($dirpath,$basename) = ($fullname =~ m#^(.*/)?(.*)#s);688 689 return($basename);690 }691 692 682 sub myexit { 693 683
Note:
See TracChangeset
for help on using the changeset viewer.