From cd10cef218c39951b63e75a2ccb9617e12839ac4 Mon Sep 17 00:00:00 2001 From: evanstucker-hates-2fa Date: Tue, 4 Oct 2016 09:19:26 -0700 Subject: [PATCH] Update shell.html.md Putting sleep after the reboot didn't work for me. It would just hang indefinitely. There's a better way, and it's "pause_before". --- website/source/docs/provisioners/shell.html.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/website/source/docs/provisioners/shell.html.md b/website/source/docs/provisioners/shell.html.md index 0f1ba10cb..4f26dbb75 100644 --- a/website/source/docs/provisioners/shell.html.md +++ b/website/source/docs/provisioners/shell.html.md @@ -159,12 +159,14 @@ scripts. The amount of time the provisioner will wait is configured using Sometimes, when executing a command like `reboot`, the shell script will return and Packer will start executing the next one before SSH actually quits and the -machine restarts. For this, put a long `sleep` after the reboot so that SSH will -eventually be killed automatically: +machine restarts. For this, put use "pause_before" to make Packer wait before executing the next script: ``` {.text} -reboot -sleep 60 +{ + "type": "shell", + "script": "script.sh", + "pause_before": "10s" +} ``` Some OS configurations don't properly kill all network connections on reboot,