|
|
|
@ -2250,6 +2250,14 @@ sub checksystem{
|
|
|
|
|
"vfat" => "/usr/sbin/mkfs.vfat -F 32 -n",
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
my %fsid = ( "ext2" => "83",
|
|
|
|
|
"ext3" => "83",
|
|
|
|
|
"ext4" => "83",
|
|
|
|
|
"jfs" => "83",
|
|
|
|
|
"reiserfs" => "83",
|
|
|
|
|
"xfs" => "83",
|
|
|
|
|
"vfat" => "b" );
|
|
|
|
|
|
|
|
|
|
if($formatrun{$data{'format'}} && (-e "/sbin/mkfs.$data{'format'}" || -e "/usr/sbin/mkfs.$data{'format'}")){
|
|
|
|
|
$data{formatrun} = $formatrun{$data{'format'}};
|
|
|
|
|
}else{
|
|
|
|
@ -2264,6 +2272,7 @@ sub checksystem{
|
|
|
|
|
else{ $data{NOMES} = ""; printmes("\n".gettext('Error')."! ".gettext('Formatting utility not found').".\n"); return ""; }
|
|
|
|
|
$data{formatrun} = $formatrun{$data{'format'}};
|
|
|
|
|
}
|
|
|
|
|
$data{disktypeid} = $fsid{$data{'format'}};
|
|
|
|
|
printmes(" ".gettext('File system')); printmes(": $data{'format'}\n");
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
@ -3127,6 +3136,15 @@ sub extract{
|
|
|
|
|
printmes(gettext('Error')); printmes("! ");
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
# проверим нужно ли менять id для раздела
|
|
|
|
|
my $changeid=1;
|
|
|
|
|
foreach(`fdisk -l`) {
|
|
|
|
|
if(m/^$data{partitions_dev}5\s+[*]?\s+\d+\s+\d+\s+\d+\s+$data{disktypeid}/) {
|
|
|
|
|
$changeid=0;
|
|
|
|
|
last;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
system("echo -e \"t\n5\n$data{disktypeid}\nw\n\" | fdisk $data{partitions_dev} &>/dev/null") if $changeid;
|
|
|
|
|
printmes(gettext('done').".\n");
|
|
|
|
|
|
|
|
|
|
printmes(" ".gettext('Create a mount point "home" and "share"')); printmes("... ");
|
|
|
|
@ -3166,7 +3184,23 @@ sub extract{
|
|
|
|
|
printmes("\n"); printmes(gettext('Error')); printmes("! ");
|
|
|
|
|
printmes(gettext('Volume formatting failed')); printmes(".\n");
|
|
|
|
|
return "";
|
|
|
|
|
} }
|
|
|
|
|
}
|
|
|
|
|
#установим соответствующий id для раздела
|
|
|
|
|
if( $data{rootinstall} =~ m|^(/dev/[^/0-9]+)([0-9]?[0-9]?)$| ) {
|
|
|
|
|
|
|
|
|
|
my $device = $1;
|
|
|
|
|
my $devicenumber = $2;
|
|
|
|
|
# проверим нужно ли менять id для раздела
|
|
|
|
|
my $changeid=1;
|
|
|
|
|
foreach(`fdisk -l`) {
|
|
|
|
|
if(m/^$data{rootinstall}\s+[*]?\s+\d+\s+\d+\s+\d+\s+$data{disktypeid}/) {
|
|
|
|
|
$changeid=0;
|
|
|
|
|
last;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
system("echo -e \"t\n${devicenumber}\n$data{disktypeid}\nw\n\" | fdisk ${device} &>/dev/null") if $changeid;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
printmes(gettext('done').".\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|