You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/sys-apps/calculate-toolkit/files/calculate-toolkit-0.3.1-fix...

53 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

diff --git a/cl-lxc b/cl-lxc
index eb23499..5d42270 100755
--- a/cl-lxc
+++ b/cl-lxc
@@ -253,6 +253,15 @@ set_vars(){
then
lxc_profile=$(file $path_work/$lxc_/rootfs$num_cur/etc/portage/make.profile | \
awk -F '/profiles/' '{ print $2 }' | awk -F '/' '{ print $1 }')
+ # совместимость со старыми системами
+ case "$lxc_profile" in
+ CCS|CDS)
+ lxc_profile=scratch
+ ;;
+ CCG)
+ lxc_profile=games
+ ;;
+ esac
else
lxc_profile=scratch
fi
@@ -285,7 +294,6 @@ debug_vars(){
num_cur = $num_cur
num_next = $num_next
lxc_profile = $lxc_profile
-
EOF
}
@@ -379,7 +387,7 @@ create_base(){
2>>/var/log/calculate/cl-lxc-error.log >/dev/null || {
eend $? || true
eerror $"Failed to run lxc-create" >&2
- rm -rf $path_cache
+ rm -rf $path_def/scratch
exit $?
}
eend
@@ -658,11 +666,11 @@ update_prepare(){
cp ${path_work}/${name_upgrading}/rootfs${num_cur}/etc/calculate/calculate.env \
$path_lxc/rootfs/etc/calculate
else
- local lxc_host=$(grep localhost ${path_work}/${name_upgrading}/rootfs/etc/hosts | awk '{print $2}')
+ local lxc_host=$(grep localhost ${path_work}/${name_upgrading}/rootfs${num_cur}/etc/hosts | awk '{print $2}')
local os_install_net_hostname=${lxc_host%%.*}
local os_install_net_domain=${lxc_host#*.}
- local os_install_locale_lang=$(grep 'LANG=' ${path_work}/${name_upgrading}/rootfs/etc/env.d/02locale)
- local os_install_clock_timezone=$(cat ${path_work}/${name_upgrading}/rootfs/etc/timezone)
+ local os_install_locale_lang=$(grep 'LANG=' ${path_work}/${name_upgrading}/rootfs${num_cur}/etc/env.d/02locale)
+ local os_install_clock_timezone=$(cat ${path_work}/${name_upgrading}/rootfs${num_cur}/etc/timezone)
cat <<- EOF > $path_lxc/rootfs/etc/calculate/calculate.env
# Parameters for firststart.start