Исправление поддержки lzma-сжатия для initrd

master
root 15 years ago
parent 641dfd602a
commit 3874bc5d30

@ -6363,13 +6363,14 @@ sub initrd_clean{
}
# извлечем из squash образа конфигурацию ядра
my $curkernel;
if($data{scratch_ws}){
unsquash("/usr/src/linux");
my $curkernel = `readlink $chroot$data{scratch_ws}/usr/src/linux`;
$curkernel = `readlink $chroot$data{scratch_ws}/usr/src/linux`;
chomp($curkernel);
unsquash("/usr/src/${curkernel}/.config") if $curkernel;
}else{
my $curkernel = `readlink $chroot/usr/src/linux`;
$curkernel = `readlink $chroot/usr/src/linux`;
chomp($curkernel);
}
# проверим поддерживается ли ядром сжатие lzma и есть ли в наличии утилита lzma

@ -82,14 +82,14 @@ checkrun() {
#не запустим если загрузка не в Scrach режиме
if ! mount | grep /mnt/scratch &>/dev/null
then
echo "This program only works in the system, installed by Calculate with the option '--scratch'."
echo "This program only works in the system, installed by Calculate with the option '--build'."
exit;
fi
#не запустим второй раз
if mount | grep "/dev/pts on /mnt/builder/dev/pts " &>/dev/null
then
if [ `ps ax | grep -v grep | grep -c "/bin/bash /usr/bin/scratch"` -gt 3 ];
if [ `ps ax | grep -v grep | grep -c "/bin/bash /usr/bin/cl-builder"` -gt 3 ];
then
echo "This program is already run."
exit;

Loading…
Cancel
Save