[Devel] [PATCH libvzctl] scripts: vz-rst -- Add action scripts for AutoFS sake

Igor Sukhih igor at virtuozzo.com
Sat Apr 16 01:58:37 PDT 2016


On 04/15/2016 09:22 PM, Cyrill Gorcunov wrote:

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"

The only question is the systemd-autofs-restart.sh script is safe 
enougth to call on any distro (non systemd)

--
   Igor


More information about the Devel mailing list