Changeset 3563 in MondoRescue for branches/3.0-mindi-2.1/mindi/parted2fdisk.pl


Ignore:
Timestamp:
Apr 11, 2016, 7:43:30 PM (8 years ago)
Author:
Bruno Cornec
Message:

Many additional backports from 3.2 and 3.0 future

  • Improved support for systemd
  • Launch start-netfs when a network conf is detected in the conf file to avoid an error later on in automatic mode
File:
1 edited

Legend:

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

    r3143 r3563  
    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;
     
    152155        "ext4" => "83",
    153156        "xfs" => "83",
     157        "btrfs" => "83",
    154158        "reiserfs" => "83",
    155159        "linux-swap" => "82",
    156160        "lvm" => "8e",
     161        "raid" => "fd",
    157162        "" => "",
    158163    );
     
    434439        "linux-swap" => "Linux swap",
    435440        "lvm" => "Linux LVM",
     441        "raid" => "RAID Linux auto",
    436442        "fat16" => "fat16",
    437443        "fat32" => "fat32",
     
    478484
    479485# This will return MB
    480 get_parted ($device,$start,$end,\%type);
     486get_parted($device,$start,$end,\%type);
    481487
    482488while (($n,$d) = each %type) {
     
    674680}
    675681
    676 
    677 # Based on Version 2.4  27-Sep-1996  Charles Bailey  bailey@genetics.upenn.edu
    678 # in Basename.pm
    679 
    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 
    691682sub myexit {
    692683
Note: See TracChangeset for help on using the changeset viewer.