[Devel] [PATCH libvzctl 1/2] scripts: vz-rst-action -- Use env variable instead of pidfile value

Cyrill Gorcunov gorcunov at openvz.org
Tue Aug 2 11:11:07 PDT 2016


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 <gorcunov at 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



More information about the Devel mailing list