Ignore:
Timestamp:
Mar 7, 2015, 2:41:11 PM (5 years ago)
Author:
Bruno Cornec
Message:

Backports from 3.2 (rev 3336-3359):

  • Improve kernel 3.14+ detection for initramfs
  • Fix installation of parted2fdisk under rootfs by removing useless -s option of install
  • Remove usage of internal function basename in parted2fdisk use File::Basename instead
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/parted2fdisk.pl

    r3336 r3360  
    44#
    55# parted2fdisk: fdisk like interface for parted
    6 # [developped for mindi/mondo http://www.mondorescue.org]
     6# [developed for mindi/mondo http://www.mondorescue.org]
    77#
    88# Aims to be architecture independant (i386/ia64)
    99# Tested on ia64 with RHAS 2.1 - Mandrake 9.0 - RHEL 3.0 - SLES 10
    1010#
    11 # Copyright B. Cornec 2000-2013
     11# Copyright B. Cornec 2000-2015
    1212# Provided under the GPL v2
    1313
    1414use strict;
     15use File::Basename;
    1516
    1617
     
    1920=head1 NAME
    2021
    21 parted2fdisk is a fdisk lie command using parted internally.
     22parted2fdisk is a fdisk like command using parted internally.
    2223
    2324=head1 DESCRIPTION
    2425
    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).
     26parted2fdisk 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).
    2627
    2728=head1 SYNOPSIS
     
    9697
    9798my $fdisk = "/sbin/fdisk";
     99$fdisk = "/usr/sbin/fdisk" if (not -x "/sbin/fdisk");
    98100my $parted = "/sbin/parted";
     101$parted = "/usr/sbin/parted" if (not -x "/sbin/parted");
    99102
    100103my $i;
     
    156159        "linux-swap" => "82",
    157160        "lvm" => "8e",
     161        "raid" => "fd",
    158162        "" => "",
    159163    );
     
    435439        "linux-swap" => "Linux swap",
    436440        "lvm" => "Linux LVM",
     441        "raid" => "RAID Linux auto",
    437442        "fat16" => "fat16",
    438443        "fat32" => "fat32",
     
    479484
    480485# This will return MB
    481 get_parted ($device,$start,$end,\%type);
     486get_parted($device,$start,$end,\%type);
    482487
    483488while (($n,$d) = each %type) {
     
    675680}
    676681
    677 
    678 # Based on Version 2.4  27-Sep-1996  Charles Bailey  bailey@genetics.upenn.edu
    679 # in Basename.pm
    680 
    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 
    692682sub myexit {
    693683
Note: See TracChangeset for help on using the changeset viewer.