[CRIU] [PATCH 2/2] scripts: call readlink in CT context in systemd-autofs-restart.sh

Eugene Kolomeetz klm at virtuozzo.com
Wed May 25 08:06:19 PDT 2016


Now readlink is called in host context, this is obviously wrong.

Signed-off-by: Eugene Kolomeetz <klm at virtuozzo.com>
---
 scripts/systemd-autofs-restart.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/systemd-autofs-restart.sh b/scripts/systemd-autofs-restart.sh
index 959886c..477f486 100755
--- a/scripts/systemd-autofs-restart.sh
+++ b/scripts/systemd-autofs-restart.sh
@@ -37,7 +37,7 @@ fi
 JOIN_CT="$NS_ENTER -t $CRTOOLS_INIT_PID -m -u -p"
 
 # Skip container, if it's not systemd based
-[ $($JOIN_CT basename -- $(readlink /proc/1/exe)) == "systemd" ] || exit 0
+[ $($JOIN_CT basename -- $($JOIN_CT readlink /proc/1/exe)) == "systemd" ] || exit 0
 
 AUTOFS_SERVICES="proc-sys-fs-binfmt_misc.automount"
 
-- 
1.7.6



More information about the CRIU mailing list