sys-apps/calculate-toolkit: update

pull/2/head^2
Alexander Tratsevskiy 2 years ago
parent 96282f716b
commit 6f6fa69d0e

@ -30,4 +30,5 @@ PATCHES=(
"${FILESDIR}"/${P}-restore-init.patch
"${FILESDIR}"/${P}-skipcom.patch
"${FILESDIR}"/${P}-fix-ccg.patch
"${FILESDIR}"/${P}-check_mkdir.patch
)

@ -0,0 +1,58 @@
diff --git a/cl-lxc b/cl-lxc
index 003ccd9..ce6faea 100755
--- a/cl-lxc
+++ b/cl-lxc
@@ -323,17 +323,17 @@ check_vars(){
if [ ! -e $path_lxc ]
then
printf $"No operation specified. Call %s to create a container.\n" \
- "'$program_name -c $name_lxc'" >&2
+ "'$program_name --create $name_lxc'" >&2
exit 1
elif [ ! -d $path_lxc_prepare ]
then
printf $"No operation specified. Call %s to prepare an update image for the container.\n" \
- "'$program_name -p $name_lxc'" >&2
+ "'$program_name --prepare $name_lxc'" >&2
exit 1
elif [ -d $path_lxc_prepare ]
then
printf $"No operation specified. Call %s to update the container.\n" \
- "'$program_name -u $name_lxc'" >&2
+ "'$program_name --upgrade $name_lxc'" >&2
exit 1
else
print_help "usage" >&2
@@ -534,10 +534,13 @@ update_prepare() {
ebegin $"Creating mount points"
for mount_point in $(grep '^lxc.mount.entry' $path_work/$name_upgrading/config | awk {'print $4'})
do
- mkdir -p "$path_lxc/rootfs/$mount_point"
+ if [ ! -e "$path_lxc/rootfs/$mount_point" ]
+ then
+ mkdir -p "$path_lxc/rootfs/$mount_point"
+ fi
done
eend
-exit
+
ebegin $"Starting container"
lxc-start $name_lxc
# ожидание первоначальной настройки контейнера
@@ -551,6 +554,7 @@ exit
einfo $"Launching package update"
lxc-attach $name_lxc -- cl-update -f
rm -rf "$path_lxc/rootfs/var/calculate/{tmp/*,templates/*}"
+ find $path_lxc/rootfs/etc/init.d -type l -name net.* -exec unlink {} \;
cd $path_lxc/rootfs/etc/runlevels/boot
ln -s /etc/init.d/calculate .
cd - &>/dev/null
@@ -582,7 +586,7 @@ exit
[ $diff_ == 1 ] && diff_pkg
- einfo $"Image for update ready. Now you can run '$program_name -u $name_upgrading' to update."
+ einfo $"Image for update ready. Now you can run '$program_name --upgrade $name_upgrading' to update."
return
}
Loading…
Cancel
Save