[Devel] [PATCH libvzctl] scripts: vz-rst -- Add action scripts for AutoFS sake
Cyrill Gorcunov
gorcunov at virtuozzo.com
Fri Apr 15 11:22:21 PDT 2016
Will need it to restore AutoFS.
https://jira.sw.ru/browse/PSBM-46249
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
Igor, Stas, take a look please. The criu-2.1.0.4-vz7
will install systemd-autofs-restart.sh into
/usr/libexec/criu/scripts/ directory. So we
will pass it into actions script.
Untested yet so please review.
scripts/vz-rst.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/vz-rst.in b/scripts/vz-rst.in
index 6dc2765..c3e17ab 100755
--- a/scripts/vz-rst.in
+++ b/scripts/vz-rst.in
@@ -67,6 +67,12 @@ fi
# Setup default log name if not explicitly specified
[ -z "$VE_RESTORE_LOG_PATH" ] && VE_RESTORE_LOG_PATH="restore.log"
+# AutoFS actions
+autofs_actions_path=/usr/libexec/criu/scripts/systemd-autofs-restart.sh
+if [ -f "$autofs_actions_path" ]; then
+ autofs_actions="--action-script $autofs_actions_path"
+fi
+
criu restore -v$CRIU_LOGLEVEL \
--file-locks \
--tcp-established \
@@ -82,6 +88,7 @@ criu restore -v$CRIU_LOGLEVEL \
--pidfile $VE_PIDFILE \
--cgroup-root /$VEID \
$ext_mount_map \
+ $autofs_actions \
$veth_args
if [ $? -eq 0 ]; then
--
2.5.5
More information about the Devel
mailing list