Changeset 3563 in MondoRescue for branches/3.0-mindi-2.1/mindi/parted2fdisk.pl
- Timestamp:
- Apr 11, 2016, 7:43:30 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0-mindi-2.1/mindi/parted2fdisk.pl
r3143 r3563 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; … … 152 155 "ext4" => "83", 153 156 "xfs" => "83", 157 "btrfs" => "83", 154 158 "reiserfs" => "83", 155 159 "linux-swap" => "82", 156 160 "lvm" => "8e", 161 "raid" => "fd", 157 162 "" => "", 158 163 ); … … 434 439 "linux-swap" => "Linux swap", 435 440 "lvm" => "Linux LVM", 441 "raid" => "RAID Linux auto", 436 442 "fat16" => "fat16", 437 443 "fat32" => "fat32", … … 478 484 479 485 # This will return MB 480 get_parted 486 get_parted($device,$start,$end,\%type); 481 487 482 488 while (($n,$d) = each %type) { … … 674 680 } 675 681 676 677 # Based on Version 2.4 27-Sep-1996 Charles Bailey bailey@genetics.upenn.edu678 # in Basename.pm679 680 sub basename {681 682 my($fullname) = shift;683 684 my($dirpath,$basename);685 686 ($dirpath,$basename) = ($fullname =~ m#^(.*/)?(.*)#s);687 688 return($basename);689 }690 691 682 sub myexit { 692 683
Note:
See TracChangeset
for help on using the changeset viewer.