|
|
|
@ -3150,7 +3150,7 @@ sub extract{
|
|
|
|
|
#перенесем информацию из ISO для scratch
|
|
|
|
|
if($data{scratch}){
|
|
|
|
|
printmes(" ".gettext('Extract grub from squashfs')); printmes("... ");
|
|
|
|
|
if(system("$data{path} unsquashfs -n -d $data{mount}$data{scratch} -f $data{mount}/livecd.squashfs /boot /etc/init.d/root &>/dev/null")){
|
|
|
|
|
if(system("$data{path} unsquashfs -n -d $data{mount}$data{scratch} -f $data{mount}/livecd.squashfs /boot &>/dev/null")){
|
|
|
|
|
printmes("\n\n".gettext('Error')."! ");
|
|
|
|
|
beep();
|
|
|
|
|
return "";
|
|
|
|
@ -3650,19 +3650,26 @@ sub profile{
|
|
|
|
|
#сохраним обработанный файл в директории установки
|
|
|
|
|
my $fname = $allocation; $fname=~m/^(.*\/)([^\/]+)$/;
|
|
|
|
|
|
|
|
|
|
if($data{pass} eq 'install' && $data{scratch} &&
|
|
|
|
|
(substr($2,0,1) eq "~" || substr($2,0,1) eq "^")
|
|
|
|
|
){
|
|
|
|
|
#извлечем файл для объединения
|
|
|
|
|
unsquash(substr($1.substr($2,1), length($data{'chroot'}.$data{scratch})));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(substr($2,0,1) eq "^"){
|
|
|
|
|
#допишем в конец файла без значка
|
|
|
|
|
open(C, ">>".$1.substr($2,1)); print C @conf; close(C);
|
|
|
|
|
}elsif(substr($2,0,1) eq "~"){
|
|
|
|
|
if($data{pass} eq 'install' && $data{scratch}){
|
|
|
|
|
#извлечем файл для объединения
|
|
|
|
|
unsquash(substr($1.substr($2,1), length($data{'chroot'}.$data{scratch})));
|
|
|
|
|
}
|
|
|
|
|
#подменим переменные конфигурационного файла новыми значениями
|
|
|
|
|
open(C, $1.substr($2,1)); my (@original) = <C>; close(C); #считаем оригинальный файл
|
|
|
|
|
my @save = substitution([@original], [@conf]);
|
|
|
|
|
open(C, ">".$1.substr($2,1)); print C @save; close(C);
|
|
|
|
|
}elsif(substr($2,-5) eq ".diff"){
|
|
|
|
|
if($data{pass} eq 'install' && $data{scratch}){
|
|
|
|
|
#извлечем файл для объединения
|
|
|
|
|
unsquash(substr($allocation, length($data{'chroot'}.$data{scratch}),-5));
|
|
|
|
|
}
|
|
|
|
|
my $root = $1;
|
|
|
|
|
my $patch = $2;
|
|
|
|
|
my $file = substr($2,0,-5);
|
|
|
|
|