Since CRIU-2.4 the pidfile is written into file on lazy fasion.
So we have to use @CRTOOLS_INIT_PID variable instead.

https://jira.sw.ru/browse/PSBM-50551

Signed-off-by: Cyrill Gorcunov <gorcu...@openvz.org>
---
 scripts/vz-rst-action.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/vz-rst-action.in b/scripts/vz-rst-action.in
index d302d8b..41eefb9 100755
--- a/scripts/vz-rst-action.in
+++ b/scripts/vz-rst-action.in
@@ -28,7 +28,7 @@ exec 1>&2
 restore_devices()
 {
        local s d t major minor old dir device
-       local pid=$(cat $VE_PIDFILE)
+       local pid=$CRTOOLS_INIT_PID
 
        root=/proc/$pid/root
 
@@ -70,7 +70,7 @@ fi
 set -e
 case "$CRTOOLS_SCRIPT_ACTION" in
 "setup-namespaces")
-       pid=$(cat $VE_PIDFILE)
+       pid=$CRTOOLS_INIT_PID
        ln -s /proc/$pid/ns/net $VE_NETNS_FILE
 
        if [ -n "$VEID" ]; then
-- 
2.7.4

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to